Multi Timers
2015.11.14
by Shaz
Introduction
This plugin allows you to have multiple timers running at once, with no timer display, to execute any command after counting down
How to use
Add to your plugins folder (name is irrelevant but I use MultiTimers.js). There are no parameters to set.
Plugin commands are:
AddTimer key seconds command
DeleteTimer key
HasTimer key switchId
TimeLeft key variableId
key is any text/number string without spaces, that uniquely identifies the timer, and can be used later to cancel/delete it, see if it is running, and how much time is left. Using the same key in subsequent AddTimer plugin commands replaces the existing timer with the newest one.
seconds is the number of seconds for the timer to count down.
command is the command to run after countdown completes. This can be any command to run, but would normally be turning a switch on or off, setting a self switch, or changing a variable.
switchId is the switch id to be turned on if there is a timer with the specified key.
variableId is the variable id to be set to the number of seconds remaining on the timer. If there is no timer with the specified key, the variable will be set to 0.
Keywords that can be used anywhere in the plugin command are:
<thismap> - current map's id
<thisevent> - current event's id
\setSS - set a self switch - format is \setss([map, event, 'A'], true)
\ss - the value of a self switch - format is \ss([map, event, 'A'])
\setS - set a switch - format is \sets(switchId, true)
\s - the value of a switch - format is \s(switchId)
\setV - set a variable - format is \setv(variableId, value)
\v - the value of a variable - format is \v(variableId)
See plugin documentation for examples
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- if you need help setting or checking a timer, post below and I'll help you with the plugin command
- let me know if you can think of other keywords that might be useful - I couldn't really come up with much
2015.11.14
by Shaz
Introduction
This plugin allows you to have multiple timers running at once, with no timer display, to execute any command after counting down
How to use
Add to your plugins folder (name is irrelevant but I use MultiTimers.js). There are no parameters to set.
Plugin commands are:
AddTimer key seconds command
DeleteTimer key
HasTimer key switchId
TimeLeft key variableId
key is any text/number string without spaces, that uniquely identifies the timer, and can be used later to cancel/delete it, see if it is running, and how much time is left. Using the same key in subsequent AddTimer plugin commands replaces the existing timer with the newest one.
seconds is the number of seconds for the timer to count down.
command is the command to run after countdown completes. This can be any command to run, but would normally be turning a switch on or off, setting a self switch, or changing a variable.
switchId is the switch id to be turned on if there is a timer with the specified key.
variableId is the variable id to be set to the number of seconds remaining on the timer. If there is no timer with the specified key, the variable will be set to 0.
Keywords that can be used anywhere in the plugin command are:
<thismap> - current map's id
<thisevent> - current event's id
\setSS - set a self switch - format is \setss([map, event, 'A'], true)
\ss - the value of a self switch - format is \ss([map, event, 'A'])
\setS - set a switch - format is \sets(switchId, true)
\s - the value of a switch - format is \s(switchId)
\setV - set a variable - format is \setv(variableId, value)
\v - the value of a variable - format is \v(variableId)
See plugin documentation for examples
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- if you need help setting or checking a timer, post below and I'll help you with the plugin command
- let me know if you can think of other keywords that might be useful - I couldn't really come up with much
Last edited by a moderator:



