uiSleep: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma2 |Game name=
| arma2 |Game name=
Line 7: Line 6:


|gr1= Program Flow |GROUP1=
|gr1= Program Flow |GROUP1=
____________________________________________________________________________________________


| Suspend execution of script for given uitime.  uiSleep is a sleep method to delay script execution where script time/simulation time is stopped. uiSleep is basically using the system time (uiTime more specifically) and not simulation time. So in the cases where sleep command would get stuck indefinitely, uiSleep can still be used to effectively delay script execution. For example in a mission briefing or an editor or when simulation is paused in general.  |DESCRIPTION=
| Suspend execution of script for given uitime.  uiSleep is a sleep method to delay script execution where script time/simulation time is stopped. uiSleep is basically using the system time (uiTime more specifically) and not simulation time. So in the cases where sleep command would get stuck indefinitely, uiSleep can still be used to effectively delay script execution. For example in a mission briefing or an editor or when simulation is paused in general.  |DESCRIPTION=
____________________________________________________________________________________________


| '''uiSleep''' delay |SYNTAX=
| '''uiSleep''' delay |SYNTAX=
Line 17: Line 14:


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
|x1 = <code> '''uiSleep''' 0.5 </code>
|x1 = <code> '''uiSleep''' 0.5 </code>
| [[sleep]], [[waitUntil]], [[canSuspend]], [[spawn]], [[execVM]], [[Control Structures]], [[sleep vs uiSleep]] |SEEALSO=
| [[sleep]], [[waitUntil]], [[canSuspend]], [[spawn]], [[execVM]], [[Control Structures]], [[sleep vs uiSleep]] |SEEALSO=

Revision as of 05:23, 17 January 2021

Hover & click on the images for description

Description

Description:
Suspend execution of script for given uitime. uiSleep is a sleep method to delay script execution where script time/simulation time is stopped. uiSleep is basically using the system time (uiTime more specifically) and not simulation time. So in the cases where sleep command would get stuck indefinitely, uiSleep can still be used to effectively delay script execution. For example in a mission briefing or an editor or when simulation is paused in general.
Groups:
Program Flow

Syntax

Syntax:
uiSleep delay
Parameters:
delay : Number
Return Value:
Nothing

Examples

Example 1:
uiSleep 0.5

Additional Information

See also:
sleepwaitUntilcanSuspendspawnexecVMControl Structuressleep vs uiSleep

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section


Posted on March 28, 2016 - 10:40 (UTC)
R3vo
If the game is paused in SP (via ESC) the sleep command will stop working, to prevent that use uiSleep.