One Button as two

GPC1 script programming for Titan One. Code examples, questions, requests.

One Button as two

Postby admaster » Wed Mar 02, 2022 4:07 pm

Hello,

I need help for the titan one, I want to when I mash the A button the X button also get mashed along with it, It's like making the A as two buttons. Also if it's possible to control the speed of the X button when mashing.

Thanks
User avatar
admaster
Private First Class
Private First Class
 
Posts: 2
Joined: Wed Mar 02, 2022 3:49 pm

Re: One Button as two

Postby Mad » Wed Mar 02, 2022 9:58 pm

This one will hold X for as long as you hold A:
Code: Select all
main { if(get_val(XB1_A)) set_val(XB1_X, 100); }

This one will spam A+X when you hold A, you can adjust the wait() times in milliseconds:
Code: Select all
main { if(get_val(XB1_A)) combo_run(myCombo); }
 
combo myCombo {
    set_val(XB1_A, 100);
    set_val(XB1_X, 100);
    wait(40);
    set_val(XB1_A, 0);
    set_val(XB1_X, 0);
    wait(40);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: One Button as two

Postby admaster » Thu Mar 03, 2022 11:09 am

Thank you so much for the code and fast reply :D
User avatar
admaster
Private First Class
Private First Class
 
Posts: 2
Joined: Wed Mar 02, 2022 3:49 pm

Re: One Button as two

Postby Scopeloc » Thu Jun 29, 2023 4:42 pm

hey since you fixed his. can i ask you for the opposite... i want 2 buttons that no matter which i push i get the same output
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 126 guests