Init.joy

From AGI Wiki
Jump to navigationJump to search

The init.joy command calibrates the joystick, if one is connected.

Syntax

init.joy();

Remarks

The joystick is disabled by default when AGI starts. If you want to allow the player to use a joystick, it must be enabled by using the init.joy command.

The init.joy command displays a message asking user to center joystick. The user then presses ENTER to enable and calibrate the joystick, or ESC to cancel, and disable joystick input.

See the Joystick Input topic for details on joystick usage in AGI.

Possible Errors

None.

Example

Code:
init.joy(); [ center that joystick!

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 139 (0x8B hex)

See Also

System Commands