Script:starttimer: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
Line 5: Line 5:
stopwatch string The stopwatch to start - one of <code>timer1</code>, <code>timer2</code>, <code>timer1</code> or <code>timer4</code>
stopwatch string The stopwatch to start - one of <code>timer1</code>, <code>timer2</code>, <code>timer1</code> or <code>timer4</code>
|intro=Once started a the number of milliseconds of simulation time elapsed since the {{Command|starttimer}} call can be retrieved using the <code>^#timer1</code>, <code>^#timer2</code>, <code>^#timer3</code> and <code>^#timer4</code> [[Script:Variables#System variables|system variables]] respectively. Timers can be stopped again using {{Command|stoptimer}}. Stopped timers will always return a value of 0 elapsed milliseconds. {{Command|starttimer}} can be called again (without {{Command|stoptimer}}) to reset the stopwatch's start time.
|intro=Once started a the number of milliseconds of simulation time elapsed since the {{Command|starttimer}} call can be retrieved using the <code>^#timer1</code>, <code>^#timer2</code>, <code>^#timer3</code> and <code>^#timer4</code> [[Script:Variables#System variables|system variables]] respectively. Timers can be stopped again using {{Command|stoptimer}}. Stopped timers will always return a value of 0 elapsed milliseconds. {{Command|starttimer}} can be called again (without {{Command|stoptimer}}) to reset the stopwatch's start time.
To run a script command after a specific time use the {{Command|timer}} command.
}}
}}

Latest revision as of 07:19, 24 July 2022

The starttimer script command is used to start a stopwatch for an entity. Once started a the number of milliseconds of simulation time elapsed since the starttimer call can be retrieved using the ^#timer1, ^#timer2, ^#timer3 and ^#timer4 system variables respectively. Timers can be stopped again using stoptimer. Stopped timers will always return a value of 0 elapsed milliseconds. starttimer can be called again (without stoptimer) to reset the stopwatch's start time.

To run a script command after a specific time use the timer command.

Usage

starttimer <stopwatch>

Context: Any Entity

Parameters:

ParameterTypeDescription
stopwatch string The stopwatch to start - one of timer1, timer2, timer1 or timer4