[SOLVED]Combo Toggle On And Off Switch

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

[SOLVED]Combo Toggle On And Off Switch

Postby TBFG » Tue Mar 21, 2023 5:37 am

Hey, i need some help with and on and off switch for a combo. I want some help or if somebody can i would like them to copy and paste a code that i can use to turn my combo on and off. Im new to the titan two or titan two gpc scripting(Just got mine today), and i have extensively used the device. Im getting errors with my script saying that it cannot run. So if anybody can replicate this code that i use on the zen it is much appreciated.
Code: Select all
main{
    if(get_val(XB1_UP)){
        combo_run(dont_out_auto_xb1);
    }
    if (event_press(XB1_RIGHT)) {
        if(combo_running(dont_out_auto_xb1)) {
            combo_stop(dont_out_auto_xb1);
        }
    }
}
Last edited by TBFG on Tue Mar 21, 2023 7:16 pm, edited 2 times in total.
TBFG
Private First Class
Private First Class
 
Posts: 2
Joined: Tue Mar 21, 2023 1:43 am

Re: Combo Toggle On And Off Switch

Postby Mad » Tue Mar 21, 2023 8:09 am

:smile0201:
Code: Select all
#include <xb1.gph>
main{
    if(get_val(XB1_UP)){
        combo_run(dont_out_auto_xb1);
    }
    if(event_active(XB1_RIGHT)) {
        combo_stop(dont_out_auto_xb1);
    }
}
 
combo dont_out_auto_xb1 {
    //
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am

Re: Combo Toggle On And Off Switch

Postby TBFG » Tue Mar 21, 2023 7:15 pm

Thank you man! Really appreciated your help.
TBFG
Private First Class
Private First Class
 
Posts: 2
Joined: Tue Mar 21, 2023 1:43 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: kubawaz and 121 guests