What are Timer Actions?
Timer Actions are utility methods that let you control the lifecycle and state of an already active timer using the integrated API.They provide developers and commands with a simple interface to:
- Pause or resume the countdown.
- Modify the remaining time dynamically.
- Stop and destroy the timer when it’s no longer needed.
VCTActions
depending on the action.
Previously,
VCTAPI
was used to execute actions, but it has been deprecated and will be removed in version 2.1.0, as it has been renamed to VCTActions
to better differentiate it.VCTEvent
, which is triggered whenever a timer-related action occurs.
This event provides all the information necessary to react appropriately in your plugin.
Available Actions
.createTimer()
Create and start a timer immediately
.pauseTimer()
Pause the currently active timer
.resumeTimer()
Resume a previously paused timer
.stopTimer()
Stop and destroy the active timer immediately
.modifyTimer()
Modify the currently active timer
There are many actions that require an active timer to work. If there is no timer when the action is called, it will fail and return
null
/false
.Not sure how to begin?
Examples
Check out the examples using API actions by clicking this card!