script request

GPC1 script programming for Titan One. Code examples, questions, requests.

script request

Postby sagemoderaul2 » Thu Jul 09, 2020 10:04 pm

hi could someone write me a script where (ps4 controller) if i press once on right dpad it turns on rapid r1 (while holding) and rapid right dpad continuosly (dpad is the cross in the controller) and pressing right dpad again turns off the script.
so it would be something like this
press right dpad once turn on script
rapid fire R1 (while holding r1)
rapid right dpad continuosly
press right dpad a second time turns script off.
thank you guys and sorry for the bother.
User avatar
sagemoderaul2
Private First Class
Private First Class
 
Posts: 3
Joined: Fri Nov 10, 2017 7:06 am

Re: script request

Postby Mad » Fri Jul 10, 2020 12:56 am

Hi,

Try this:
Code: Select all
int toggle;
 
main {
    if(event_press(PS4_RIGHT)) {
        toggle = !toggle;
    }
 
    if(toggle && get_val(PS4_R1)) {
        combo_run(rapid);
    }
}
 
combo rapid {
    set_val(PS4_R1, 100);
    set_val(PS4_RIGHT, 100);
    wait(60);
    set_val(PS4_R1, 0);
    set_val(PS4_RIGHT, 0);
    wait(60);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: script request

Postby sagemoderaul2 » Fri Jul 10, 2020 1:12 am

THANKS Mad
User avatar
sagemoderaul2
Private First Class
Private First Class
 
Posts: 3
Joined: Fri Nov 10, 2017 7:06 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 48 guests