2 buttons on 1

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

2 buttons on 1

Postby ichwersonst » Sat Nov 28, 2020 11:47 am

good day

I've read it all
either I'm too stupid or the topic doesn't exist yet
there is a possibility on a controller to assign a button with 2
So when I press x it activates, for example, A and B keys
or activate A and B at the same time on an elite controller on a dumper

if the topic already exists then i apologize but i haven't found anything myself

thank you and have a nice weekend

Mischa
User avatar
ichwersonst
Private
Private
 
Posts: 1
Joined: Sat Oct 17, 2020 8:04 am

Re: 2 buttons on 1

Postby J2Kbr » Sat Nov 28, 2020 1:12 pm

Hello. Here is an example on how you can perform this operation:
Code: Select all
#include <xb1.gph>
 
main {
    // So when I press x ...
    if(get_actual(XB1_X)) {
        // ...it activates, for example, A and B keys
        set_val(XB1_A, 100.0);
        set_val(XB1_B, 100.0);
        set_val(XB1_X, 0.0);
    }
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 166 guests