joystick_name(id)

From ENIGMA

Jump to: navigation, search

Description

Gets the name of the given joystick device and returns the result, or an empty string it the joystick does not exist.

Parameters

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

Return Values

string: Returns the name of the connected joystick device, or an empty string if it does not exist.

Example Call

// demonstrates obtaining the name of player 1's joystick device
if (joystick_exists(0)) {
  var name;
  name = joystick_name(0);
  show_message(name + " is connected.");
} else {
  show_message("Joystick is not connected");
}
Personal tools
Namespaces
Variants
Actions
Navigation
ENIGMA
Other
Toolbox