help with custom script

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

help with custom script

Postby tron02 » Sun Jul 25, 2021 12:45 pm

hey how do i make a custom script looking for a script when turned on all pushes Y AND B at the same time on xbox every 150ms intill turned off any help would be great! :D
User avatar
tron02
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Jul 25, 2021 12:41 pm

Re: help with custom script

Postby Mad » Sun Jul 25, 2021 9:13 pm

Welcome. :smile0201:

Hold left trigger and tap dpad up to toggle:
Code: Select all
#include <xb1.gph>
 
bool toggle;
 
main {
    if(is_active(XB1_LT) && event_active(XB1_UP)) {
        toggle = !toggle;
    }
    if(toggle) combo_run(YB);
}
combo YB {
    set_val(XB1_Y, 100);
    set_val(XB1_B, 100);
    wait(40);
    wait(150);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: help with custom script

Postby tron02 » Sun Jul 25, 2021 9:28 pm

amazing thanks you will help me alot :)
User avatar
tron02
Private First Class
Private First Class
 
Posts: 2
Joined: Sun Jul 25, 2021 12:41 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 82 guests