Difference between revisions of "MIST getDHMS"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.time.getDHMS |vNum = Mist 3.7 |desc= Returns a table formatted as {d = day, h = hours, m = minutes, s = seconds} of a given time in seconds...")
(No difference)

Revision as of 08:03, 13 April 2018


mist.time.getDHMS

Added with: Mist 3.7
Description
Returns a table formatted as {d = day, h = hours, m = minutes, s = seconds} of a given time in seconds. If no value is passed the function returns the current time of the mission.
Syntax
table mist.time.getDHMS( number time )
Valid Input Values:
93600
Return value:
table
Return example:
{d = 2, h = 2, m = 0, s = 0}
Usage Examples:
The following example would be an approximate function to determine the use of illumination flares or bombs.

 local date = mist.time.getDHMS()
 if date.h >= 21 or date.h =< 5 then
   lightBombs = true
 end

Notes:
Related Functions
getDate, getDHMS, convertToSec, milToGame

Scripting Engine

MIST Root Page