JoystickAxisX()

Syntax

Result = JoystickAxisX(#Joystick [, Pad [, Mode]])
Description
Returns the joystick X axis state.

Parameters

#Joystick The joystick to use. The first joystick index is 0. The number of available joysticks is returned by InitJoystick().
Pad (optional) The pad to use, if the joystick has multiple pads. The first pad index is 0.
Mode (optional) The mode can be one of the following value:
  #PB_Absolute: Returned value is either -1 (left), 0 (no movement) or 1 (right) (default)
  #PB_Relative: Returned value is between the range -1000 (left) and 1000 (right). If the gamepad
                doesn't support relative movement, the result will be -1000, 0 or 1000.

Return value

Returns the joystick X axis value, depending of the specified mode.

Remarks

ExamineJoystick() has to be called before this function is used, to update the current joystick state.

See Also

ExamineJoystick(), JoystickAxisY(), JoystickAxisZ()

Supported OS

All

<- InitJoystick() - Joystick Index - JoystickAxisY() ->