helppp

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

helppp

Postby CzechSniper » Fri Jul 10, 2020 7:07 pm

Basically im trying to create a script to where I can only use (button_5) if (button_8) is fully active. this is what I have so far I just have no idea how to structure it into this to where it will function how I would like
Code: Select all
main{
    if(is_active(BUTTON_8)) {
        set_val(STICK_2_X, 0);
        set_val(STICK_2_Y, 0);
        set_val(BUTTON_9, 100);
    }
}
User avatar
CzechSniper
Staff Sergeant
Staff Sergeant
 
Posts: 11
Joined: Wed Jun 24, 2020 5:17 am

Re: helppp

Postby Mad » Fri Jul 10, 2020 9:28 pm

Try this:
Code: Select all
main {
    set_val(BUTTON_5, 0);
 
    if(get_actual(BUTTON_8) >= 95f) {
        if(is_active(BUTTON_5)) {
            set_val(BUTTON_5, 100);
        }
    }
 
    if(is_active(BUTTON_8)) {
        set_val(STICK_2_X, 0);
        set_val(STICK_2_Y, 0);
        set_val(BUTTON_9, 100);
    }
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: fox5 and 74 guests