JOYDOWN |
Top Previous Next |
Syntax INT = JOYDOWN(button as INT,OPT device as INT) Description Tests a button on a joystick device. Parameters button - Zero based button number to test. device - Optional device number. Default is 0 or the first joystick attached to the system Return value TRUE if the button is down, FALSE otherwise. Remarks A screen must be open or DirectInput initialized manually before using this function. This function is non-blocking and is suitable for use in game loops. Example usage IF JOYDOWN(1) THEN fire_missle = TRUE |