skipTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (add. MP effect)
(collated notes)
Line 9: Line 9:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Skiptime duration is in hours. The time of day and tides are adjusted, but no changes are made in any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.|= Description
| Jumps the specified number of hours forward or backward.<br>The time of day and tides are adjusted, but no changes are made to any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.|= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''skipTime''' duration |= Syntax
| '''skipTime''' duration |= Syntax


|p1= duration: [[Number]] |= Parameter 1
|p1= duration: [[Number]] - Hours to skip.<br>A positive value will create a forward time jump, a negative value will jump backwards.<br>One second is roughly 0.00026 hours.<br>Any calculations must be enclosed in parentheses, e.g. skipTime (_seconds/3600) |= Parameter 1


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
Line 22: Line 22:
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[setDate]], [[accTime]] |= See also


|mp= Even though the ''immediate'' effect of skipTime is only local, the new time will propagate through the network after 30 seconds or so.|=
|mp= Even though the ''immediate'' effect of skipTime is only local, the new time will propagate through the network after 30 seconds or so.|=
Line 33: Line 33:
<dd class="notedate"></dd>
<dd class="notedate"></dd>
<dt class="note"></dt><dd class="note">
<dt class="note"></dt><dd class="note">
Here is a very useful function - great for giving a "campaign" feel to a running battle. Try this in your init.sqs file:  
To simulate a smooth time-lapse effect (e.g. in cut-scenes), you can use the following code:
  while(true) do {
  while {true} do {skiptime 0.00333; sleep 0.1}
skiptime 0.00333   ~0.1 }
</dd>
 
This will make each day pass in around 12 minutes - great fun watching sunsets and the night sky!</dd>


<dd class="notedate"></dd>
<dd class="notedate"></dd>
<dt class="note"></dt><dd class="note">skipTime is not to be confused with [[accTime]].</dd>
<dt class="note"></dt><dd class="note">To skip forward to a specific time, irrespective of the current mission time, use:
 
  skipTime (_timeToSkipTo - [[daytime]] + 24 ) [[a % b|%]] 24
<dd class="notedate"></dd>
</dd>
<dt class="note"></dt><dd class="note">Here is a useful piece of code that will enable the mission to skip forward to any given time, irrespective of what time it happens to be in the mission:
  skipTime (_timeToSkipTo - [[daytime]] + 24 ) % 24
 
See also: [[a % b]]</dd>
 
<dd class="notedate">Posted on Feb 25, 2007</dd>
<dt class="note">'''[[User:Manny|Manny]]'''</dt><dd class="note">Note that time can also be skipped "backwards", ie. you can provide negative values and jump back in time.</dd>
 
<dd class="notedate">Posted on March 21, 2007</dd>
<dt class="note">'''[[User:granQ|granQ]]'''</dt><dd class="note">One second is roughly 0.00026.</dd>


<dd class="notedate"></dd>
<dd class="notedate"></dd>
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''</dt><dd class="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.</dd>
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''</dt><dd class="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.</dd>
<dd class="notedate">Posted on August 28, 2008</dd>
<dt class="note">'''[[User:BarmyArmy|BarmyArmy]]'''</dt><dd class="note">Always always always wrap any calculation in brackets.
skipTime seconds*3600
will acutally only do skipTime seconds,
skipTime (seconds*3600)
will achieve the desired result</dd>
<dd class="notedate"></dd>
<dt class="note">'''[[User:Jtgibson|Jtgibson]]'''</dt><dd class="note">I should point out that you should divide, not multiply, in this context.  Thus, you want
skipTime (seconds/3600)
For instance, 600 seconds&mdash;ten minutes&mdash;is (600/3600) or 1/6 hour.</dd>


<!-- Note Section END -->
<!-- Note Section END -->

Revision as of 23:45, 1 February 2010

Hover & click on the images for description

Description

Description:
Jumps the specified number of hours forward or backward.
The time of day and tides are adjusted, but no changes are made to any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.
Multiplayer:
Even though the immediate effect of skipTime is only local, the new time will propagate through the network after 30 seconds or so.
Groups:
Uncategorised

Syntax

Syntax:
skipTime duration
Parameters:
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:
Nothing

Examples

Example 1:
skipTime 5

Additional Information

See also:
setDateaccTime

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

To simulate a smooth time-lapse effect (e.g. in cut-scenes), you can use the following code: while {true} do {skiptime 0.00333; sleep 0.1}
To skip forward to a specific time, irrespective of the current mission time, use: skipTime (_timeToSkipTo - daytime + 24 ) % 24
Ceeeb
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.

Bottom Section