Game Maker 8.2 Joystick Extension (gm82joy) documentation

by blobeee

Game Maker 8.2 has a noice Joystick extension that's basically Xin disguised as the stock joystick functions.

Quick start

Diagram of an Xbox 360 controller with example code snippets for accessing each controller input via the Game Maker 8.2 Joystick extension.

Port numbers are Zero indexed! i.e. Player 1 is id 0, Player 4 is id 3.

PlayerP1P2P3P4
Xindex0123

xin_check(index,button) button values

Button indices are also Zero indexed! i.e. Xbox A is the 0th button

valuebutton
0A
1B
2X
3Y
4LB
5RB
6Back / View
7Start / Menu
8Left stick click
9Right stick click

joystick_*pos(id) analogue axes

Right stick and LT/RT trigger axes have shuffled around slightly from the original stock/vanilla Game Maker 8.x joystick functions.

valueanalogue input
xposLeft Stick x (left/right)
yposLeft Stick y (up/down)
zposRight Stick x (left/right)
rposRight Stick y (up/down)
uposLT
vposRT

Credits

Xbox 360 controller diagram by Alphathon is licensed under CC-BY-SA 3.0, and modified by blobeee to replace labels with concise example code.

Changelog