Introduced in

Version:1.00

Description

Description:Suspend execution for the given time in seconds. Must be called inside of a context, which is interruptible (for example, a Script (Handle), executed by execVM or spawn).

Syntax

Syntax:sleep delay
Parameters:
  • delay: Number - Time in seconds to suspend execution.
Return Value:Nothing

Examples

Examples:
sleep 0.5;

Additional Information

See also: uiSleep, Control Structures
Multiplayer:
Problems:

Notes





Posted on December 20, 2006 - 19:53
CrashDome
Sleep suspends both SQF functions and SQF scripts. In functions, the calling script is still in suspension due to waiting for a return from the call command. The game engine will continue, however. See Function for more detail.



Posted on July 16, 2007 - 00:13
Inkompetent
For scripts called by the Init the first sleep command will suspend the script at the briefing screen at the start of a mission. The script will continue after the briefing screen, when actually "in game".
Posted on March 6, 2008 - 07:47