So I figured out how to use the Joystick 2 object, almost without any problems. The thing is, I have a custom built platform engine using fastloops and a gravity variable.
Here's the code I have which defines the speed of the jump and fall:
+Gravity of "Player" < 10
-Set Gravity to Gravity of "Player"+0.4
And here's the code which defines the minimum jump height (as you can hold down jump to jump higher):
+Repeat while "Z" is pressed (NEGATED)
+Gravity of "Player" < 0
-Set Gravity to Gravity of "Player"+1.65
This works great when I use the keyboard, but if I use a controller input instead (using the Joystick 2 object), the player's minimum jump height is higher than when using the keyboard (ie. if he player taps the jump key, he won't jump as high).
To clarify:
+Joystick 1 button 1 is changed
+Gravity of "Player" < 0
-Set Gravity to Gravity of "Player"+1.65
I've also tried the other Joystick options like this one:
+Joystick 1 button 1 is pressed (NEGATED)
That option does something different though, it barely lifts the player off the ground even when I hold down the jump button. Logically for me, this doesn't make sense as I thought a controller button would work the same way as a keyboard key.
Is it because a controller's buttons work differently than a keyboard's, or have I done something wrong with the logic shown?
Thank you in advance.