VoidExpanse/scope-timer: Difference between revisions
(Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Timer scope = Used to create and manage timers - delayed events. Timers only works inside it's script, but they'...") |
(No difference)
|
Revision as of 07:12, 18 February 2014
Timer scope
Used to create and manage timers - delayed events. Timers only works inside it's script, but they're persistent through savegames.
Visibility: Global.
List of functions
SetTimer | ||
---|---|---|
Arguments | Returns | Example |
|
int - ID of created timer |
var timer = timer.SetTimer(5, "SomeFunction", {what_to_say: "hello"}, 1); function SomeFunction( args ) { console.Print("I was told to say " + args.what_to_say); } |
Description | ||
Creates a timed event, which will be executed after "time_in_seconds" interval. Can be infinite loop. |
ClearTimer | ||
---|---|---|
Arguments | Returns | Example |
|
void |
timer.ClearTimer(5); |
Description | ||
Removes timer with specified ID. |