Difference between revisions of "skipTime"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| (\[\[[a-zA-Z ]+\]\]) \|x1=" to " |r1=$1 |x1=")
m (Text replacement - " <dl class="command_description"> <dt><dt>" to " <dl class="command_description"> <dt><dt>")
Line 37: Line 37:
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">
<dd class="notedate">

Revision as of 15:47, 12 June 2021

Hover & click on the images for description


Description needed
In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.
For other games' behaviour, see Multiplayer Scripting - Join In Progress.


Syntax needed
duration: Number - Hours to skip.
A positive value will create a forward time jump, a negative value will jump backwards.
One second is roughly 0.00026 hours.
Any calculations must be enclosed in parentheses, e.g. skipTime (_seconds/3600)
Return Value:


Example 1:
skipTime 5;
Example 2:
while {true} do { skipTime 0.00333; sleep 0.1; // Smooth time transition };
Example 3:
skipTime (_timeToSkipTo - daytime + 24 ) % 24; // Skip forward to a specific time, irrespective of the current mission time

Additional Information

See also:


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
In ArmA & OFP, skipTime does not actually estimate weather changes beyond moving the clouds across the sky. Weather counters continue as if no time has passed. The setDate command can be used instead of skiptime to change the time without the visual give-away of the lower clouds jumping.
I cannot confirm this for OA 1.60 beta (85889): MP: Even though the immediate effect of skipTime is only local, the new time will propagate through the network after 30 seconds or so. Instead the date, which includes time, is synced automatically for new JIP clients - NOT for present instances. So one has to apply skipTime on all instances in MP (server + all present clients).
This command is blocking and in some cases it may take up to 1.5 seconds (probably depends on CPU) for it to calculate the changes to the environment, during which the game will microfreeze. It largely depends on weather changes, which are quite random. However one thing remains consistent, skipTime 24 hours is always almost instant. This is quite helpful when used in conjunction with commands such as setOvercast for instant and seamless effect. To try it yourself use this script: [] spawn { for "_i" from 1 to 24 do { _time = diag_tickTime; skipTime _i; diag_log [_i, diag_tickTime - _time]; sleep 3; }; }; One of the results (results will vary depending on weather conditions):
[24,0.0151367] // this is always the lowest