Need assistance with simple loop script
2 posts
• Page 1 of 1
Need assistance with simple loop script
Hello im trying to get this script below working but no action is occurring when triggering it please let me know if you can assist with this,
- Code: Select all
#define LOOP 7 // loop 7 times
uint8 iLoop;
main {
if (event_active(BUTTON_13)) iLoop = LOOP; // initiate loop
if (iLoop) { // iLoop is not 0
if (!cLoop) { // combo is not running at the moment
iLoop--; // iLoop - 1
printf("starting combo cLoop, loops left: %d",iLoop); // write text to the Output Panel
combo_run(cLoop);
}
}
}
combo cLoop {
set_val(BUTTON_13,100); // press button 13
wait(50); // (press) for 50ms
set_val(BUTTON_13,0); // release button 13
wait(50); // (release) for 50ms
-
Gorphius - Master Sergeant
- Posts: 26
- Joined: Tue Nov 13, 2018 7:54 pm
Re: Need assistance with simple loop script
its working for me. the device monitor show the button pressed and the output panel is showing the text.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
2 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 241 guests