command to repeat script?

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

command to repeat script?

Postby Rapture » Fri Jun 08, 2018 1:58 pm

does anybody know the repeat combo command so when I activate my combo it will repeat forever until I Turn the Titan 1 off. I'm trying to avoid using gameRec option. Thanks in advance :joia:
User avatar
Rapture
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Feb 04, 2017 8:57 pm

Re: command to repeat script?

Postby Scachi » Fri Jun 08, 2018 3:51 pm

Something like that should do the trick, you can toggle on off with L3/LT, or change the name to the button you want:

Code: Select all
int onoff = FALSE;
 
main {
    if(event_press(PS4_L3)) {
        onoff = !onoff;
        if(!onoff) combo_run(RumbleFeedback);
    }
 
    if(onoff) {
        combo_run(YourCombo );
    }
}
 
combo YourCombo {
  // your combo content here
 
}
 
combo RumbleFeedback {
    set_rumble(RUMBLE_A, 100);
    wait(150);
    reset_rumble();
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: command to repeat script?

Postby Sillyasskid » Fri Jun 08, 2018 6:53 pm

Rapture wrote:does anybody know the repeat combo command so when I activate my combo it will repeat forever until I Turn the Titan 1 off
Once you activate this combo it will repeat indefinitely, like you requested.
Code: Select all
combo combo1 {
 
     ...
 
      /* Repeat combo1 */
    combo_restart(combo1);
    wait(10);
}
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am

Re: command to repeat script?

Postby Rapture » Sun Jun 10, 2018 11:00 pm

THANKS A LOT! :smile0202:
User avatar
Rapture
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Sat Feb 04, 2017 8:57 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 73 guests