sleep vs uisleep: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "'''sleep vs. uiSleep''' The workings of sleep could be compared to: <code>//sleep 5; t = time + 5; waitUntil {time >= t};</code> The workings of uiSleep c...")
 
(Redirected page to sleep vs uiSleep)
 
Line 1: Line 1:
'''sleep vs. uiSleep'''
#REDIRECT [[sleep vs uiSleep]]
 
The workings of sleep could be compared to:
<code>//[[sleep]] 5;
t = [[time]] + 5;
[[waitUntil]] {[[time]] >= t};</code>
The workings of [[uiSleep]] could be compared to:
<code>//[[uiSleep]] 5;
t = [[diag_tickTime]] + 5;
[[waitUntil]] {[[diag_tickTime]] >= t};</code>
When simulation is interrupted, [[time]] freezes, but not [[diag_tickTime]]. Also time at the start of in ''init.sqf'' is often reported as 0, even if the mission has already started.

Latest revision as of 15:35, 29 May 2015

Redirect to: