Please help with a simple rapid fire
7 posts
• Page 1 of 1
Please help with a simple rapid fire
Hi guys, I recently buy my T2 and need some guidance, I know nothing about programing but i will try to learn.
I need a rapid fire that spam Xbox button X when that said button is pressed and stop when pressed a second time.
Also maybe you guys can add a way to activate/deactivate this with the xbox view button, if active uses the rapid fire, deactivated uses the normal behaviour of the button, thanks in advance and sorry for my bad english.
I need a rapid fire that spam Xbox button X when that said button is pressed and stop when pressed a second time.
Also maybe you guys can add a way to activate/deactivate this with the xbox view button, if active uses the rapid fire, deactivated uses the normal behaviour of the button, thanks in advance and sorry for my bad english.
-
mikehell - Staff Sergeant
- Posts: 14
- Joined: Sun Jan 12, 2020 5:51 am
Re: Please help with a simple rapid fire
- Code: Select all
#include <xb1.gph>
bool toggle;
bool spam_x;
main {
if(event_active(XB1_VIEW)) toggle = !toggle;
if(toggle && event_active(XB1_X)) spam_x = !spam_x;
if(spam_x) combo_run(x);
}
combo x {
set_val(XB1_X, 100);
wait(60);
set_val(XB1_X, 0);
wait(60);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Please help with a simple rapid fire
It works nicely, in case I need change toogle for keep pressing what do I need to change?
-
mikehell - Staff Sergeant
- Posts: 14
- Joined: Sun Jan 12, 2020 5:51 am
Re: Please help with a simple rapid fire
mikehell wrote:It works nicely, in case I need change toogle for keep pressing what do I need to change?
You want to hold view then tap x?
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Please help with a simple rapid fire
Sorry if I didn't explain better, I mean instead of press X to activate and second press to deactivate just hold X for activate and release X for deactivate.
-
mikehell - Staff Sergeant
- Posts: 14
- Joined: Sun Jan 12, 2020 5:51 am
Re: Please help with a simple rapid fire
mikehell wrote:Sorry if I didn't explain better, I mean instead of press X to activate and second press to deactivate just hold X for activate and release X for deactivate.
- Code: Select all
#include <xb1.gph>
main {
if(get_val(XB1_X)) combo_run(x);
}
combo x {
set_val(XB1_X, 100);
wait(60);
set_val(XB1_X, 0);
wait(60);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Please help with a simple rapid fire
Muchas gracias!
Thank you!
Thank you!
-
mikehell - Staff Sergeant
- Posts: 14
- Joined: Sun Jan 12, 2020 5:51 am
7 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 154 guests