multiple assignment - scripting help
3 posts
• Page 1 of 1
multiple assignment - scripting help
hey scripters!
I just got the titan one and was setting it up for my switch.
I wanted to set up buttons to use the analog stick, so it looked like this
remap XB360_A -> SWITCH_LY;
remap XB360_B -> SWITCH_LX;
remap XB360_Y -> SWITCH_LX;
remap XB360_X -> SWITCH_LY;
and to get the other direction I got this
set_val(XB360_A, inv(get_val(XB360_A)));
set_val(XB360_B, inv(get_val(XB360_B)));
but unfortunately I can just map 1 button to 1 axis.. so its whether AB or XY.
Any ideas?
I just got the titan one and was setting it up for my switch.
I wanted to set up buttons to use the analog stick, so it looked like this
remap XB360_A -> SWITCH_LY;
remap XB360_B -> SWITCH_LX;
remap XB360_Y -> SWITCH_LX;
remap XB360_X -> SWITCH_LY;
and to get the other direction I got this
set_val(XB360_A, inv(get_val(XB360_A)));
set_val(XB360_B, inv(get_val(XB360_B)));
but unfortunately I can just map 1 button to 1 axis.. so its whether AB or XY.
Any ideas?
-
LeDoeh - Private First Class
- Posts: 2
- Joined: Mon Apr 19, 2021 12:39 pm
Re: multiple assignment - scripting help
Try this:
- Code: Select all
main {
set_val(XB360_A, 0);
set_val(XB360_X, 0);
set_val(XB360_B, 0);
set_val(XB360_Y, 0);
if(get_val(XB360_A)) set_val(SWITCH_LY, -100);
if(get_val(XB360_X)) set_val(SWITCH_LY, 100);
if(get_val(XB360_B)) set_val(SWITCH_LX, -100);
if(get_val(XB360_Y)) set_val(SWITCH_LX, 100);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: multiple assignment - scripting help
Thanks I will try that soon!
I was wondering if I could make a shift modifier - so when holding another button to give the buttons another output!?
so for example using the same buttons for the right stick, when holding down another button..
would be this just another "If" logic combined with event pressed?
I was wondering if I could make a shift modifier - so when holding another button to give the buttons another output!?
so for example using the same buttons for the right stick, when holding down another button..
would be this just another "If" logic combined with event pressed?
-
LeDoeh - Private First Class
- Posts: 2
- Joined: Mon Apr 19, 2021 12:39 pm
3 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 79 guests