DCS func getTime: Difference between revisions

From DCS World Wiki - Hoggitworld.com
m 1 revision imported
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 13: Line 13:
|par4=
|par4=


|desc= Returns the model time in seconds. This counts time once the simulator loads. So if a mission is paused, the time this function returns still moves forward.
|desc= Returns the model time in seconds to 3 decimal places since the mission has started. This counts time once the mission starts and will pause with the game.  


|rtnType= time
|rtnType= time


|rtnExample= none
|rtnExample= 65.385


|reqType1=  
|reqType1=  
Line 38: Line 38:


|examples=  
|examples=  
 
.
  if timer.getTime() > 20 then
  if timer.getTime() > 20 then
   doWhatever()
   doWhatever()
Line 46: Line 46:
}}
}}
[[Category:Singleton Functions|getTime]]
[[Category:Singleton Functions|getTime]]
[[Category:Game Patch 1.2.0|getTime]]

Latest revision as of 02:26, 12 March 2024

Scripting Root

Envrioment: Mission Scripting
Function: getTime Added with: 1.2.0
Member Of: timer
Syntax: time timer.getTime( )
Description: Returns the model time in seconds to 3 decimal places since the mission has started. This counts time once the mission starts and will pause with the game.


Return Value: time
Return Example: 65.385
Examples: .
if timer.getTime() > 20 then
 doWhatever()
end
Related Functions: timerfunctions: getTime, getAbsTime,getTime0, scheduleFunction, removeFunction, setFunctionTime
Notes: