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 |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[sleep]] pauses the waiting when the game is paused, where [[uiSleep]] does not. | |||
{| class="wikitable" | |||
< | ! [[sleep]] | ||
! [[uiSleep]] | |||
|- | |||
| <sqf> | |||
< | // sleep 5; | ||
_t = time + 5; | |||
waitUntil { time >= _t }; | |||
When simulation is interrupted, [[time]] freezes, but not [[ | </sqf> | ||
| <sqf> | |||
// uiSleep 5; | |||
_t = uiTime + 5; | |||
waitUntil { uiTime >= _t }; | |||
</sqf> | |||
|} | |||
When the simulation is interrupted, [[time]] freezes, but not [[uiTime]]. Also [[time]] at the start of in ''init.sqf'' is often reported as 0, even if the mission has already started. |