Pause

From AGI Wiki
Revision as of 07:02, 15 April 2019 by Andrew Korson (talk | contribs) (Created page with "The '''pause''' command pauses the game until the player presses ENTER or ESC key. == Syntax == pause(); == Remarks == A message box is displayed that says "Game paused. P...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The pause command pauses the game until the player presses ENTER or ESC key.

Syntax

pause();

Remarks

A message box is displayed that says "Game paused. Press Enter to continue." Pressing ENTER or ESC will dismiss the window and the game will continue. Reserved flag f15 (no pause windows) and reserved variable v21 (window close time) affect the pause window the same as any other message box. This means if you set f15 and then use pause, the message box will be displayed, but the game won't actually pause.

Possible Errors

None.

Example

Code:

<syntaxhighlight lang="agi"> pause(); [ equivalent print command: print(" Game paused.\n"

     "Press Enter to continue.");

</syntaxhighlight>

Technical Information

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

See Also

System Commands