Select Page


The brand new scripting documentation is located here:

Clock is a special Object type that has access to clock related functionality like timer, stopwatch, and the time. Once you have a reference to an Object you can call these functions like this: obj.Clock.pauseStart().

Member Variables

TypeVariable NameDescription
boolpausedIf the Clock’s timer is paused. Setting this value will pause or resume the timer.


Return ValueFunction NameDescription
intgetValue()Returns the current value in stopwatch or timer mode as the number of seconds. Returns 0 if the current time is displayed. This is the same as calling getValue() on the Object reference.
boolpauseStart()Toggle function for pausing and resuming a stopwatch or timer on the Clock. This function does nothing if the current time is displayed.
boolsetValue(int seconds)Switches the clock to timer mode if it is not already in timer mode and sets the timer to the given value in seconds. Calling this function when the Clock is already in timer mode will reset the timer to the value and stop the timer. This is the same as calling setValue() on the Object reference.
boolshowCurrentTime()Switches the Clock back to displaying the current time. Any current timer or stopwatch will be lost. If the Clock is already displaying the current time, this function does nothing.
boolstartStopwatch()Switches the Clock to stopwatch mode and begins the stopwatch from 0. If the Clock is already in stopwatch mode, this will reset the stopwatch back to 0 and begin.