Prevent.input

From AGI Wiki
Revision as of 00:16, 27 December 2013 by Andrew Branscom (talk | contribs) (Created page with "The '''prevent.input''' command hides the input prompt and prevents the player from entering input. <code>prevent.input();</code> After a call to <code>prevent.input</code>,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The prevent.input command hides the input prompt and prevents the player from entering input.

prevent.input();

After a call to prevent.input, any text that the player enters is ignored. Note that this command has no effect on controllers. To show the input prompt again and allow user input, use the accept.input command.

 

 

Parameter

This command does not take any parameters.

 

Possible errors

None known.

 

Example

The following code will prevent the user from entering any input while ego is moving across the screen. Note that re-enabling user input after the move.obj command is complete is not shown here.

Code:

<syntaxhighlight lang="agi"> if (said("walk")) {

 prevent.input();
 move.obj(ego, 100, 120, 1, f200);

} </syntaxhighlight>

 

See Also

 

Sources

Some of the text in the article is taken from the AGI Studio help file.