Init.joy

From AGI Wiki
Revision as of 23:24, 8 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''init.joy''' command calibrates the joystick, if one is connected. == Syntax == init.joy(); == Remarks == The joystick is disabled by default when...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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:

<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)

See Also

System Commands