Help to make this script

GPC2 script programming for Titan Two. Code examples, questions, requests.

Help to make this script

Postby jasp90 » Mon Feb 13, 2023 4:28 pm

Hi all when I play fifa a like to do a max power shot so if I press X it will shoot but if I hold it for say 5 seconds it will only register that I have pressed it for 3 second but if press it for one second it will register one second if that makes sense

So if shoot (X) it can not go over 3 seconds but I can shoot for under 3 seconds 1 second or 2 seconds or 1.5 seconds but will max out at 3 seconds


Thanks for your time

I’m on Xbox
User avatar
jasp90
Command Sergeant Major
Command Sergeant Major
 
Posts: 125
Joined: Wed Nov 26, 2014 4:06 pm

Re: Help to make this script

Postby Scachi » Mon Feb 13, 2023 5:19 pm

this is X (Cross) on Playstation, for X on Xbox change both to BUTTON_17
Code: Select all
main {
    if (time_active(BUTTON_16) > 3000) set_val(BUTTON_16, 0);
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Help to make this script

Postby jasp90 » Mon Feb 13, 2023 6:32 pm

Thank you for you time
User avatar
jasp90
Command Sergeant Major
Command Sergeant Major
 
Posts: 125
Joined: Wed Nov 26, 2014 4:06 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 67 guests