Script:starttimer: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{ScriptCommandPage |description=start a stopwatch |context=any |parameters= stopwatch string The stopwatch to start - one of <code>timer1</code>, <code>timer2</code>, <code>t...") |
mNo edit summary |
||
Line 4: | Line 4: | ||
|parameters= | |parameters= | ||
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. | |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. | ||
}} | }} |
Revision as of 00:37, 17 April 2020
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.
Usage
starttimer <stopwatch>
Context: Any Entity
Parameters:
Parameter | Type | Description |
---|---|---|
stopwatch |
string |
The stopwatch to start - one of timer1 , timer2 , timer1 or timer4 |