Page 1 of 1

How to swap joystick logical button with hat switch

Posted: Fri Jun 16, 2023 4:14
by Orion
I am attempting to use a hat switch on my joystick to modify the logical output of the joystick. I want to press the hat switch to the left to activate one mode, and the right for another. Is there a way to do this? I have tried using Booleans and toggles, but can't figure it out.

Re: How to swap joystick logical button with hat switch

Posted: Fri Jun 16, 2023 9:32
by Victorus
Try to use Shift function.
And explain your idea more completely.

Re: How to swap joystick logical button with hat switch

Posted: Sat Jun 17, 2023 1:26
by Orion
The idea is to use a hat switch to modify the output of the trigger. For example, I can press the hat switch to the right to set the trigger to act as one button, or to the left to act as another button. I don't want to have to hold the hat switch, just toggle the state of the trigger. In terms of pure buttons, I want physical button 1 to act as logical button 1 if physical button 2 was last pressed, but to act as logical button 2 if physical button 3 was last pressed. The reason I cant use shift is because I don't want to have to hold down the hat switch. The use of this system would be to toggle that weapon the trigger fires. Then I can bind the logical buttons to the fire key bind and control what weapon is fired.

Re: How to swap joystick logical button with hat switch

Posted: Sat Jun 17, 2023 7:41
by Ron61
Use radiobuttons, look this example.