Skip to content

Wait

Wait

Pauses execution of the current script for a specified duration in milliseconds.

Properties

System

Name Explanation Type
Block Input Whether to block player input during the wait period. When enabled, the player cannot interact until the wait completes. Toggle
Duration (milliseconds) The duration to wait in milliseconds before continuing script execution. Variable or Value

Examples

Wait for One Second

This pauses script execution for 1000 milliseconds (one second).

wait(1000);
{"Data":{"Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1000","VariableIndex":0,"Metadata":null},"IsBlockingInput":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Flow.WaitCommand"}

Wait for Half a Second and Block Player Input

This pauses script execution for 500 milliseconds while preventing the player from providing any input.

wait(500, block_input);
{"Data":{"Duration":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"500","VariableIndex":0,"Metadata":null},"IsBlockingInput":true,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Flow.WaitCommand"}

Wait for a Duration Stored in a Global Variable

This pauses script execution for the number of milliseconds stored in Global Variable 0.

wait($gv[0]);
{"Data":{"Duration":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"IsBlockingInput":false,"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Flow.WaitCommand"}