Dolphin, the GameCube and Wii emulator - Forums
Need some help with the "Input Syntax" thingy - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Controllers (https://forums.dolphin-emu.org/Forum-controllers)
+--- Thread: Need some help with the "Input Syntax" thingy (/Thread-need-some-help-with-the-input-syntax-thingy)



Need some help with the "Input Syntax" thingy - Lazthedude - 08-03-2020

I'm not very good at programming, so this stuff is a bit confusing for me. Anyways, what I am trying to do is something like "If pressing Button 7 (right trigger on my controller), invert the control stick's vertical input. If not pressing Button 7, then work normally." So what i did was put this in the Control Stick Up section:
Code:
if(`Button 7`=false, `Axis Y-`, null), if(`Button 7`=true, `Axis Y+`, null)
And this in the Control Stick Down section:
Code:
if(`Button 7`=false, `Axis Y+`, null), if(`Button 7`=true, `Axis Y-`, null)
And this works perfectly, except for when I'm not pressing Input 1. In that case, it simply doesn't do anything.
The reason I'm even doing this is because in Mario Sunshine, when you use the Squirt Nozzle, the up and down controls are inverted, so I'm trying to make it so it's not inverted.

Thank you in advance.


RE: Need some help with the "Input Syntax" thingy - Billiard26 - 08-03-2020

Code:
(`Axis Y-` - `Axis Y+`) * (1 - 2 * `Button 7`)

Use that as your Stick's "Up" expression.
Leave your "Down" expression empty.


RE: Need some help with the "Input Syntax" thingy - Lazthedude - 08-03-2020

I don't understand that code at all but it works, so thank you!