Joystick_load - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Loads the joystick connected with the given index and returns whether or not it was successful. Joysticks 0 and 1 are loaded by default to emulate Game Maker, this function lets you load more than that or see if more are connected.

Parameters

Parameter Data Type Description
id integer The index of the joystick, must be equal to or larger than 0.

Return Values

boolean: Returns whether or not the joystick was successfully loaded.

Example Call

// demonstrates loading a third joystick
if (joystick_load(2)) {
  // joystick was loaded
} else {
  // joystick must not have been connected
}

NOTOC