So this object lets you make a simple countdown or stopwatch and is script-able with 3 global methods/variables.
I made a tutorial on using it as well as added a short tutorial inside the script (or see bottom of this post).
Download the object here:
You can start it from any script using global.startTimer(seconds, type)
-the types are strings: 'stopwatch' or 'countdown'
-time must be in seconds and is a number
You can stop the timer at any time using global.stopTimer(callback)
Callback is optional and can accept up to 5 parameters
Example callback to start timer again: global.stopTimer(global.startTimer, 10, 'stopwatch')
GETTING CURRENT TIME:
To get the current time of the object use global.timerSeconds
CHECKING IF TIMER IS RUNNING OR FINISHED:
global.timerActive returns boolean (true or false)
Please sign in to leave a comment.