XBOX Script to include Left Bumper AND Button A (LB-A)

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

XBOX Script to include Left Bumper AND Button A (LB-A)

Postby Trials » Thu Jul 02, 2020 9:15 pm

Just starting out, got the Titan Two today.

Having trouble making XBOX script do Left Bumper, then A along with Left Bumper. It may be producing LB then A instead of LB-A combination.


Code: Select all
main{
    if(event_active(BUTTON_8)) {
        combo_run(combo_1);}
} //main end
 
combo combo_1 {
    set_val(BUTTON_8,0); //is this necessary? tried with and without.
    wait(100);
 
    set_val(BUTTON_7, 100); LB
    wait(500);   //tried with and without wait here
    set_val(BUTTON_16, 100);
 
    //at this point I should see selection in game
    //I can see that LB was pressed, and maybe A button after, but it doesn't seem that the LB-A combination is made
 
    wait(2000);
    set_val(BUTTON_16, 0);
    wait(200);
    set_val(BUTTON_7, 0);
    wait(200);
}
User avatar
Trials
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Jul 02, 2020 8:50 pm

Re: XBOX Script to include Left Bumper AND Button A (LB-A)

Postby Mad » Thu Jul 02, 2020 9:46 pm

Welcome. :smile0201:

Try this:
Code: Select all
#include <xb1.gph>
 
main{
    if(event_active(XB1_LT)) {
        combo_run(combo_1);
    }
} //main end
 
combo combo_1 {
    set_val(XB1_LB, 100); // Initial LB press
    wait(100);
    set_val(XB1_LB, 100); // LB
    set_val(XB1_A, 100); // + A
    wait(100);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: XBOX Script to include Left Bumper AND Button A (LB-A)

Postby Trials » Thu Jul 02, 2020 10:54 pm

:smile0202: :smile0203: :joia:

Awesome, that worked! Thank you, now to change the rest of my script! :smile0517: :smile0201:
User avatar
Trials
Sergeant
Sergeant
 
Posts: 7
Joined: Thu Jul 02, 2020 8:50 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 40 guests