Help looping combo with calls

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

Help looping combo with calls

Postby Poonz » Wed Jan 08, 2020 3:55 pm

Hey i need help looping this combo any help would be greatly appreciated thank you
Code: Select all
main {
 
    if(get_val(SWITCH_L)){combo_run(MonthS);}
 
    if(get_val(SWITCH_UP)){combo_stop(MonthS);}
    }
combo Repeat {
combo_run(MonthS)
}   
combo MonthS {
call(Watt5);
call(Watt5);
call(Watt5);
call(Watt5);
call(Watt5);
call(Watt5);
call(WattFarm);
call(Repeat);
}
User avatar
Poonz
Corporal
Corporal
 
Posts: 4
Joined: Tue Jan 07, 2020 10:28 am

Re: Help looping combo with calls

Postby Mad » Wed Jan 08, 2020 6:51 pm

Code: Select all
int toggle;
 
main {
    if(event_press(SWITCH_L)) toggle=!toggle; // on/off
 
    if(toggle) combo_run(MonthS);
}
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: Help looping combo with calls

Postby Poonz » Wed Jan 08, 2020 10:00 pm

Mad wrote:
Code: Select all
int toggle;
 
main {
    if(event_press(SWITCH_L)) toggle=!toggle; // on/off
 
    if(toggle) combo_run(MonthS);
}

ITS ALIVE!!! but in all seriousness thanks a lot its works flawlessly
User avatar
Poonz
Corporal
Corporal
 
Posts: 4
Joined: Tue Jan 07, 2020 10:28 am

Re: Help looping combo with calls

Postby Mad » Wed Jan 08, 2020 10:02 pm

Poonz wrote:ITS ALIVE!!! but in all seriousness thanks a lot its works flawlessly

No problem :smile0517:
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 83 guests