Adjustable Rapid Fire Xbox

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

Adjustable Rapid Fire Xbox

Postby NightmareNM » Wed Sep 15, 2021 11:13 pm

Hello to all, I've been attempting to create an adjustable rapid fire script but so far I have been unsuccessful to making it as simple as possible so I figured I would reach out and beg for the community's assistance. This is what I am attempting to do concerning the script; I want Rapid Fire on RT but only activates when holding the LT, I want to adjust the fire rate by holding down LT and then to increase it by pressing UP and to decrease it by pressing DOWN, to activate Rapid Fire I want the command to be hold VIEW and press UP. I am just wanting a very simple script concerning the adjustable fire rate and any help would be most appreciated and thanks for taking the time to help out a fellow gamer. This is what I have currently as far as script writing goes and as you can see I am missing the script to where you can increase and decrease the fire rate:
Code: Select all
int rapid_fire;
main {
 
if(get_val(XB1_VIEW) && event_press(XB1_UP)) {
rapid_fire = !rapaid_fire;
if(rapid_fire) colorled(0,2,0,0);
else colorled(0,0,0,0);
}
if(rapid_fire && get_val(XB1_RT)) {
if(get_val(XB1_LT)) {
if(FALSE) {
combo_run(Turbo_1);
} else {
combo_run(Turbo_2);
}
} else {
}
}
 
combo Turbo_1 {
set_val(XB1_RT, 100);
wait(40);
set_val(XB1_RT, 0);
wait(40);
set_val(XB1_RT, 0);
}
 
combo Turbo_2 {
set_val(XB1_RT, 100);
wait(40);
set_val(XB1_RT, 0);
wait(40);
set_val(XB1_RT, 0);
}
 
function colorled(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d);
}
User avatar
NightmareNM
Corporal
Corporal
 
Posts: 4
Joined: Tue Oct 06, 2020 8:15 pm

Re: Adjustable Rapid Fire Xbox

Postby Mad » Thu Sep 16, 2021 4:44 am

Code: Select all
int rapid_fire;
int RF_HOLD = 40;
int RF_RELEASE = 40;
main {
    if(get_val(XB1_VIEW) && event_press(XB1_UP)) {
        rapid_fire = !rapid_fire;
        if(rapid_fire) colorled(0,2,0,0);
        else colorled(0,0,0,0);
    }
    if(rapid_fire && get_val(XB1_LT)) {
        if(event_press(XB1_UP)) RF_HOLD = RF_HOLD + 1;
        if(event_press(XB1_DOWN)) RF_RELEASE = RF_RELEASE - 1;
        if(get_val(XB1_RT)) combo_run(Turbo_1);
    }
}
 
combo Turbo_1 {
    set_val(XB1_RT, 100);
    wait(40);
    set_val(XB1_RT, 0);
    wait(40);
    set_val(XB1_RT, 0);
}
 
function colorled(a,b,c,d) {
    set_led(LED_1,a);
    set_led(LED_2,b);
    set_led(LED_3,c);
    set_led(LED_4,d);
}
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 65 guests