Difference between revisions of "DCS func getAbsTime"
From DCS World Wiki - Hoggitworld.com
m (1 revision imported) |
|||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
|par4= | |par4= | ||
− | |desc= Returns the | + | |desc= Returns the game world time in seconds relative to time the mission started. Will always count up from when the mission started. If the value is above 86400 then it is the next day after the mission started. This function is useful in attaining the time of day. |
− | + | Assuming a mission started at noon the value returned would be 43200. (12*60*60). Midnight would be 0. Calling this function at 12:00:10 timer.getAbsTime will return 43210.xxx. | |
|rtnType= time | |rtnType= time | ||
Line 41: | Line 41: | ||
|examples= The following example would execute code 20 seconds after the mission has started. | |examples= The following example would execute code 20 seconds after the mission has started. | ||
− | if timer.getAbsTime() + env.mission.start_time | + | if timer.getAbsTime() + 20 > env.mission.start_time then |
doWhatever() | doWhatever() | ||
end | end | ||
Line 48: | Line 48: | ||
}} | }} | ||
[[Category:Singleton Functions|getAbsTime]] | [[Category:Singleton Functions|getAbsTime]] | ||
+ | [[Category:Game Patch 1.2.0|getAbsTime]] |