Difference between revisions of "DCS func setFunctionTime"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
Line 55: Line 55:
 
}}
 
}}
 
[[Category:Singleton Functions|setFunctionTime]]
 
[[Category:Singleton Functions|setFunctionTime]]
 +
[[Category:Game Patch 1.2.0|setFunctionTime]]

Latest revision as of 06:44, 17 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: setFunctionTime Added with: 1.2.0
Member Of: timer
Syntax: function timer.setFunctionTime(number functionId , time modelTime )
Description: Re-Schedules an already scheduled function to run at a different time in the future.


Return Value: function
Return Example: none
Examples: The following will run a function named "main" 120 seconds from one the code would run.
 local id = timer.scheduleFunction(main, {}, timer.getTime() + 120)

If further down in the code it was decided to run the main() function sooner it could look like this

 if mustGoFaster == true then  
   timer.setFunctionTime(id, timer.getTime() + 1)
 end
Related Functions: timer Functions: getTime, getAbsTime,getTime0, scheduleFunction, removeFunction, setFunctionTime
Notes: