missionStart: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofpr |Game name=
| ofpr


|1.80|Game version=
|1.80


|gr1= Mission Information |GROUP1=
|gr1= Mission Information


| Returns date and time when mission started in format <tt>[year, month, day, hour, minute, second]</tt> in MP, which differs from [[date]] format only by seconds. In SP returns <tt>[0,0,0,0,0,0]</tt>.
| Returns date and time when mission started in format <tt>[year, month, day, hour, minute, second]</tt> in MP, which differs from [[date]] format only by seconds. In SP returns <tt>[0,0,0,0,0,0]</tt>.
<br><br>
<br><br>
{{Informative | Because this command returns the time of the actual start of the mission, it might not be available in ''pre-init'' or ''init'', but is guaranteed to be available in ''post-init'' when [[time]] > 0}} |Description=
{{Informative | Because this command returns the time of the actual start of the mission, it might not be available in ''pre-init'' or ''init'', but is guaranteed to be available in ''post-init'' when [[time]] > 0}}


| [[missionStart]] |Syntax=
| [[missionStart]]


|x1= <code>[[setDate]] ([[missionStart]] [[select]] [0,5]);</code> |Example 1=
|x1= <code>[[setDate]] ([[missionStart]] [[select]] [0,5]);</code>


|x2= Set real date: <code>//postInit = 1;
|x2= Set real date: <code>//postInit = 1;
Line 19: Line 19:
[[waitUntil]] {[[time]] > 0};
[[waitUntil]] {[[time]] > 0};
[[setDate]] ([[missionStart]] [[select]] [0,5]);
[[setDate]] ([[missionStart]] [[select]] [0,5]);
};</code> |Example 2=
};</code>


| [[Array]] - real local date and time (similar to [[date]] format but with seconds)|Return value=
| [[Array]] - real local date and time (similar to [[date]] format but with seconds)


| [[date]], [[time]], [[daytime]], [[serverTime]], [[setDate]], [[systemTime]], [[systemTimeUTC]] |See also=
| [[date]], [[time]], [[daytime]], [[serverTime]], [[setDate]], [[systemTime]], [[systemTimeUTC]]
}}
}}



Revision as of 01:04, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns date and time when mission started in format [year, month, day, hour, minute, second] in MP, which differs from date format only by seconds. In SP returns [0,0,0,0,0,0].

Because this command returns the time of the actual start of the mission, it might not be available in pre-init or init, but is guaranteed to be available in post-init when time > 0
Groups:
Mission Information

Syntax

Syntax:
missionStart
Return Value:
Array - real local date and time (similar to date format but with seconds)

Examples

Example 1:
setDate (missionStart select [0,5]);
Example 2:
Set real date: //postInit = 1; if (isServer) then { waitUntil {time > 0}; setDate (missionStart select [0,5]); };

Additional Information

See also:
datetimedaytimeserverTimesetDatesystemTimesystemTimeUTC

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

Bottom Section