Init.joy
From AGI Wiki
Jump to navigationJump to searchThe 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:
<syntaxhighlight lang="agi"> init.joy(); [ center that joystick! </syntaxhighlight>
Technical Information
Required Interpreter Version: | Available in all AGI versions. |
Byte-Code Value: | 139 (0x8B hex) |