GetSecondsPassed
Revision as of 18:37, 27 April 2006 by imported>JustTim (revert. this example is absolutely correct. timer is meant to count backwards! you have to set timer to the desired amount of seconds)
Syntax:
GetSecondsPassed
Returns the number of seconds passed since the last game frame (in float). Extremely useful for running a timer within a script.
Example:
float timer begin gamemode if timer > 0 set timer to timer - GetSecondsPassed else ; time's up! Do something. endif end