The joystick There are some events associated with joysticks. But to have full control over the joysticks there is a whole set of functions to deal with joysticks. GameMaker supports up to two joysticks.
So all of these functions take a joystick id as argument. Joystickexists(id) Returns whether joystick id (1 or 2) exists. Joystickname(id) Returns the name of the joystick joystickaxes(id) Returns the number of axes of the joystick. Joystickbuttons(id) Returns the number of buttons of the joystick. Joystickhaspov(id) Returns whether the joystick has point-of-view capabilities. Joystickdirection(id) Returns the keycode (vknumpad1 to vknumpad9) corresponding to the direction of joystick id (1 or 2). Joystickcheckbutton(id,numb) Returns whether the joystick button is pressed (numb in the range 1-32).
Joystick_check_button(joystick number, button number) – Checks if the given joystick’s given button is currently pressed. For movement controls on joysticks and for further information on all of these events and actions please consult the Game Maker 8 manual.
Joystickxpos(id) Returns the position (-1 to 1) of the x-axis of joystick id. Joystickypos(id) Returns the joysticks y-position. Joystickzpos(id) Returns the joysticks z-position (if it has a z-axis).
Joystickrpos(id) Returns the joysticks rudder position (or fourth axis). Joystickupos(id) Returns the joysticks u-position (or fifth axis).
Joystickvpos(id) Returns the joysticks v-position (or sixth axis). Joystickpov(id) Returns the joysticks point-of view position. This is an angle between 0 and 360 degrees. 0 is forwards, 90 to the right, 180 backwards and 270 to the left. When no point-of-view direction is pressed by the user -1 is returned.