Help with +1 in a combo then break combo when = 100
4 posts
• Page 1 of 1
Help with +1 in a combo then break combo when = 100
Hello all,
I pulled this script from a previous thread that Mad created.
What I would like to incorporate is an integer? that will gain +1 every time the combo runs . My gameplan is when the count = 100 this combo will no longer run, but a new combo will run since the count is now ==1
example
I pulled this script from a previous thread that Mad created.
What I would like to incorporate is an integer? that will gain +1 every time the combo runs . My gameplan is when the count = 100 this combo will no longer run, but a new combo will run since the count is now ==1
example
- Code: Select all
combo mlb {
wait(4000);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(60);
wait(1000);
set_val(XB1_A, 100);
wait(600);
[i] Count + 1;[/i]
- Code: Select all
#include <xb1.gph>
bool toggle;
main {
if(is_active(XB1_RT)) {
toggle = !toggle;
}
if(toggle) combo_run(mlb);
else if(mlb) combo_stop(mlb);
}
combo mlb {
wait(4000);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(60);
wait(1000);
set_val(XB1_A, 100);
wait(600);
}
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
Re: Help with +1 in a combo then break combo when = 100
- Code: Select all
#include <xb1.gph>
uint8 count;
bool toggle;
main {
if(event_active(XB1_RT)) toggle = !toggle;
if(toggle && count < 100) combo_run(mlb);
else if(mlb) combo_stop(mlb);
}
combo mlb {
wait(4000);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(60);
wait(1000);
set_val(XB1_A, 100);
wait(600);
++count;
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Help with +1 in a combo then break combo when = 100
Thank you ! Will try this now
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
Re: Help with +1 in a combo then break combo when = 100
Mad wrote:
- Code: Select all
#include <xb1.gph>
uint8 count;
bool toggle;
main {
if(event_active(XB1_RT)) toggle = !toggle;
if(toggle && count < 100) combo_run(mlb);
else if(mlb) combo_stop(mlb);
}
combo mlb {
wait(4000);
set_val(XB1_LB, 100);
set_val(XB1_B, 100);
wait(60);
wait(1000);
set_val(XB1_A, 100);
wait(600);
++count;
}
In theory would this work?
- Code: Select all
#include <xb1.gph>
uint8 count;
bool toggle;
main {
if(event_active(XB1_RT)) toggle = !toggle;
if(toggle && count < 100) combo_run(mlb);
else if(mlb) combo_stop(mlb);
if(toggle && count > 100) combo_run(mlb2);
else if(mlb2) combo_stop(mlb2);
}
combo mlb {
PLACEHOLDER;
PLACEHOLDER;
++count;
}
combo mlb2 {
PLACEHOLDER;
PLACEHOLDER;
}
-
teckx - Sergeant Major of the Army
- Posts: 194
- Joined: Tue Mar 27, 2018 1:53 pm
4 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 122 guests