sleep vs uiSleep: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
t = [[diag_tickTime]] + 5; | t = [[diag_tickTime]] + 5; | ||
[[waitUntil]] {[[diag_tickTime]] >= t};</code> | [[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. | 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. |
Revision as of 14:38, 29 May 2015
sleep vs. uiSleep
The workings of sleep could be compared to:
//sleep 5;
t = time + 5;
waitUntil {time >= t};
The workings of uiSleep could be compared to:
//uiSleep 5;
t = diag_tickTime + 5;
waitUntil {diag_tickTime >= t};
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.