Difference between revisions of "GetSecondsPassed"

68 bytes removed ,  12:27, 5 September 2008
Removed 'reset to zero' text and example
imported>Vswe
m (Added Search Terms)
imported>QQuix
(Removed 'reset to zero' text and example)
Line 2: Line 2:
  (seconds:float) GetSecondsPassed  
  (seconds:float) GetSecondsPassed  


Returns the number of seconds passed since the last game frame (in float). Extremely useful for running a timer within a script. Each script has its own counter for GetSecondsPassed and when the function is called, this counter is automatically reset to 0. Thus, all subsequent calls within the same frame and script will return 0.
Returns the number of seconds passed since the last game frame (in float). Extremely useful for running a timer within a script. Each script has its own counter for GetSecondsPassed. All calls within the same frame and script will return the same value.




Line 27: Line 27:
   begin gamemode
   begin gamemode
   set timer1 to getsecondspassed  ;This returns the time passed since the last frame
   set timer1 to getsecondspassed  ;This returns the time passed since the last frame
   set timer2 to getsecondspassed  ;This returns zero
   set timer2 to getsecondspassed  ;This returns the same value
   
   
   end
   end
Anonymous user