clearLights: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page ClearLights to clearLights: Converting page titles to lowercase) |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
Line 9: | Line 9: | ||
clearLights(id) | clearLights(id) | ||
clearLights(id, mapname) | clearLights(id, mapname) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 19: | Line 19: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: clearLights()] | [h: clearLights()] | ||
</ | </syntaxhighlight> | ||
To turn off all the lights sources on the map you could run the following script, note you will have to be the GM or run it | To turn off all the lights sources on the map you could run the following script, note you will have to be the GM or run it | ||
Line 26: | Line 26: | ||
Ok Kids lights out! | Ok Kids lights out! | ||
[h,foreach(tok, getTokens()), code: { [token(tok): clearLights()]}] | [h,foreach(tok, getTokens()), code: { [token(tok): clearLights()]}] | ||
</ | </syntaxhighlight> | ||
|changes= | |changes= |
Revision as of 17:09, 14 March 2023
clearLights() Function
• Introduced in version 1.3b48
Turns off all of the light sources for the Current Token.
Usage
<source lang="mtmacro" line> clearLights() clearLights(id) clearLights(id, mapname) </syntaxhighlight>
Parameters
id
- The tokenid
of the token for which to turn off all light sources, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
mapname
- The name of the map to find the token. Defaults to the current map.
Examples
To turn off all of the light sources for the current token.
<source lang="mtmacro" line> [h: clearLights()] </syntaxhighlight>
To turn off all the lights sources on the map you could run the following script, note you will have to be the GM or run it as part of a trusted macro. <source lang="mtmacro" line> Ok Kids lights out! [h,foreach(tok, getTokens()), code: { [token(tok): clearLights()]}]
</syntaxhighlight>Version Changes
- 1.5.4 - Added
id
andmapname
parameter options.