Wait
Wait an amount of time before continuing
Description
'wait [time]'The wait action pauses script execution for a specified amount of time or until the player interacts. Once the time has passed (or the player clicks), the game automatically continues to the next statement.
Action ID: Wait
Reversible: Yes
Requires User Interaction: Optional (required if no time specified)
Parameters
time
number
Yes
The time in milliseconds to wait before continuing.
Behavior
With Time Parameter
When a time value is provided, the game:
Blocks all user interaction
Waits for the specified duration
Automatically advances to the next statement
In this example, after the first dialog is shown and the player clicks to continue, the game waits for 5 seconds (5000 milliseconds) before showing the next dialog.
Without Time Parameter
When no time is provided, the game pauses and waits for user interaction:
This is useful for creating pause points where you want the player to manually advance.
Time Conversion
The wait action accepts time in milliseconds. Common conversions:
1 second
1000
5 seconds
5000
10 seconds
10000
1 minute
60000
0.5 seconds
500
Error Handling
If an invalid (non-numeric) time value is provided, the engine will display an error:
The error message will indicate the invalid time value and the location in your script.
Examples
Dramatic Pause
Scene Transition Delay
Timed Event Sequence
Technical Details
During a timed wait, the
blockglobal is set totrue, preventing user interactionWhen the time elapses,
blockis set back tofalseThe action uses
setTimeoutinternally for timing
Related Actions
Last updated
Was this helpful?