Joy Axis hit?
BlitzMax Forums/BlitzMax Programming/Joy Axis hit?
| ||
I'm currently setting up my game to support both keyboard and joypad control and so far it’s working flawlessly, save for one thing... If for example I need to call Keyhit(KEY_UP), I can't see any obvious equivalent command for the joypad, only JoyY()=-1 which is effectively the same as KeyDown(KEY_UP). Does anyone have any idea of an easy way to make a JoyAxisHit() command that will only register the joystick movement once? Thanks! |
| ||
Isn't it Joyhit (pub.freejoy 1.08)? |
| ||
As far as I am aware, Joyhit just works for jostick buttons, not the axis :( |
| ||
|
| ||
Awesome! Thanks very much, that's got it sorted :) |
| ||
Actually, this doesn't work correctly... the if Statements only work for the positive values (whichever comes first in the code)....curious. Any ideas on how I can fix that? |
| ||
Maybe just call joyxhit() once, store the returned value and use that in the if statement. xret = joyxhit() if xret = 1... if xret = -1... |