Finished Script- Just need Help with a Error

GPC2 script programming for Titan Two. Code examples, questions, requests.

Finished Script- Just need Help with a Error

Postby Skygliders » Wed Aug 17, 2022 1:30 pm

So I have been using this " Auto Run Script" which is working quite well.

I now want to add this "hair trigger script" to it.

Can someone help me with that? i get always an error.

here are the seperate codes: Auto RUN

Code: Select all
main {
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_run(Sprint);
    }
}
 
combo Sprint {
    set_val(BUTTON_9, 95);
    wait(50); wait(50);
}


From this Script i only want the hair trigger part.

Code: Select all
define ADS_BUTTON    = PS4_R2;
define SPRINT_BUTTON = PS4_L3;
define MOV_Y_AXIS    = PS4_LY;
 
main {
    if(!get_val(ADS_BUTTON)) {
        if(get_val(MOV_Y_AXIS) < -97) {
            combo_run(EasySprint);
        }
    }
    if(get_val(7) > 15) set_val(7, 100);
    if(get_val(4) > 15) set_val(4, 100);
}
 
combo EasySprint {
    set_val(SPRINT_BUTTON, 100);
    wait(40); wait(40);
}



Here is my version that i tried but keep getting errors with : The Auto Run part is working good. but i cant add the hair trigger part without an error.

Code: Select all
main {
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_run(Sprint);
    }
}
 
combo Sprint {
    set_val(BUTTON_9, 95);
    wait(50); wait(50);
}
 
 
 
define ADS_BUTTON = BUTTON_8;
define Shoot = BUTTON_5;
 
 
 
    if(!get_val(ADS_BUTTON))
    if(!get_val(shoot))
 
 
 
    if(get_val(0) set_val(100);
    if(get_val(0) set_val(100);
 
}
User avatar
Skygliders
Private
Private
 
Posts: 1
Joined: Sat Aug 06, 2022 7:19 pm

Re: Finished Script- Just need Help with a Error

Postby Mad » Wed Aug 17, 2022 10:12 pm

Code: Select all
main {
    if(is_active(STICK_2_X) || is_active(STICK_2_Y)) {
        combo_run(Sprint);
    }
    if(is_active(BUTTON_5)) set_val(BUTTON_5, 100);
    if(is_active(BUTTON_8)) set_val(BUTTON_8, 100);
}
 
combo Sprint {
    set_val(BUTTON_9, 95);
    wait(50); wait(50);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4532
Joined: Wed May 22, 2019 5:39 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Google [Bot] and 82 guests