need help pausing combo
5 posts
• Page 1 of 1
need help pausing combo
Hello can someone show me how to pause rapid fire for 3 seconds after shotgunmode is true and after the combo goes off, basically when the combo shootthenswitch starts working I need the rapidfire to stop working for 3 secods
- Code: Select all
#pragma METAINFO("fortnite 0 build", 1, 0, "<best no recoil>")
#include <keyboard.gph>
#define XBOX BUTTON_1 //BIG XBOX BUTTON
#define VIEW BUTTON_2
#define START BUTTON_3
#define R_BUMPER BUTTON_4
#define RT BUTTON_5
#define RS BUTTON_6
#define L_BUMPER BUTTON_7
#define LT BUTTON_8
#define LS BUTTON_9
#define DUP BUTTON_10
#define DDOWN BUTTON_11
#define DLEFT BUTTON_12
#define DRIGHT BUTTON_13
#define Y_BUTTON BUTTON_14
#define B_BUTTON BUTTON_15
#define A_BUTTON BUTTON_16
#define X_BUTTON BUTTON_17
#define SHARE BUTTON_18 //NEW BUTTON
#define L_STICK_X STICK_2_X
#define L_STICK_Y STICK_2_Y
#define R_STICK_X STICK_1_X
#define R_STICK_Y STICK_1_Y
#define or ||
bool RAPIDFIRE = FALSE;
bool shotgunmode = FALSE;
main {
if(event_release(BUTTON_18)) {
RAPIDFIRE = !RAPIDFIRE;
}
if(RAPIDFIRE==TRUE && get_val(RT)) {
combo_run(rapidfire);
}
//shotgun mode
if (get_actual(BUTTON_3))
inhibit(BUTTON_3, 200);
if (event_release(BUTTON_3) && time_active(BUTTON_3) < 200) {
shotgunmode = !shotgunmode;
}
if(shotgunmode==TRUE && get_actual(RT)) {
combo_run(shootthenswitch);
}
if(event_active(Y_BUTTON)
or event_active(RT)){
shotgunmode = FALSE;
}
}
combo rapidfire {
set_val(RT, 100.0);
wait(20);
set_val(RT, 0.0);
wait(30);
}
combo shootthenswitch { //SHOTGUN MODE
wait(60);
set_val(R_BUMPER, 100.0);
wait(50);
set_val(R_BUMPER, 0.0);
wait(50);
}
-
alencroat - Lieutenant
- Posts: 320
- Joined: Sun Oct 15, 2017 5:58 pm
Re: need help pausing combo
one option:
use time_release on your shotgunmode button to check if it is released for 3000ms
another way:
create a combo "rapidfirepause" that just has a wait(3000); in it
start that combo when you start shotgunmode
only allow combo rapidfire to run when rapidfirepause is not running
use time_release on your shotgunmode button to check if it is released for 3000ms
another way:
create a combo "rapidfirepause" that just has a wait(3000); in it
start that combo when you start shotgunmode
only allow combo rapidfire to run when rapidfirepause is not running
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: need help pausing combo
ok ill try and code this, see if I know how to do this. thanks.
Trying to figure this: "only allow combo rapidfire to run when rapidfirepause is not running".
Im not sure I used this condition yet
so I added this like you said
just need to figure out how to add that last part to rapidfire
Trying to figure this: "only allow combo rapidfire to run when rapidfirepause is not running".
Im not sure I used this condition yet
so I added this like you said
- Code: Select all
if(shotgunmode==TRUE && get_actual(RT)) {
combo_run(shootthenswitch);
combo_run(rapidfirepause);
}
combo rapidfirepause {
wait(3000);
}
just need to figure out how to add that last part to rapidfire
-
alencroat - Lieutenant
- Posts: 320
- Joined: Sun Oct 15, 2017 5:58 pm
Re: need help pausing combo
if (!rapidfirepause) ....
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: need help pausing combo
oh I got it now, I just added this:
if(rapidfirepause) {
combo_stop(rapidfire);
}
and it works Thanks!!
if(rapidfirepause) {
combo_stop(rapidfire);
}
and it works Thanks!!
-
alencroat - Lieutenant
- Posts: 320
- Joined: Sun Oct 15, 2017 5:58 pm
5 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: Google [Bot] and 113 guests