Difference between revisions of "GetSecondsPassed"
Jump to navigation
Jump to search
imported>SnakeChomp (Create using function template) |
imported>Geckbot m (Robot: Automated text replacement (-\[\[Category:(.*?)\(GECK 1.0\)\]\] +Category:\1(GECK 1.1))) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 21: | Line 21: | ||
*[[SetGlobalTimeMultiplier]] will affect the return value of this function in the same way it affects the speed of the game. | *[[SetGlobalTimeMultiplier]] will affect the return value of this function in the same way it affects the speed of the game. | ||
*Each script has | *Each script has its own independent tracking of when GetSecondsPassed was last called. | ||
*Calling this function multiple times in | *Calling this function multiple times in the same script in the same frame will return the same values for each call. | ||
*This function is unreliable in a ScriptEffect during sleep/wait/fast travel. Use [[ScriptEffectElapsedSeconds]] instead. | *This function is unreliable in a ScriptEffect during sleep/wait/fast travel. Use [[ScriptEffectElapsedSeconds]] instead. | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Functions (GECK 1.1)]] | |||
[[Category:Time Functions]] | [[Category:Time Functions]] | ||
[[Category:Time Functions (GECK 1.1)]] |
Latest revision as of 12:34, 15 August 2009
< [[::Category:Functions|Category:Functions]]
A function included in the GECK version 1.1.0.36.
Description
Returns the number of real life seconds that have passed since this function was last called by the calling script.
Syntax
(seconds:float) GetSecondsPassed
Example
float timer begin gamemode if timer < 5 set timer to timer + GetSecondsPassed else ;5 seconds have passed, do something special set timer to 0 endif end
Notes
- SetGlobalTimeMultiplier will affect the return value of this function in the same way it affects the speed of the game.
- Each script has its own independent tracking of when GetSecondsPassed was last called.
- Calling this function multiple times in the same script in the same frame will return the same values for each call.
- This function is unreliable in a ScriptEffect during sleep/wait/fast travel. Use ScriptEffectElapsedSeconds instead.