exposeFOW: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
|||
Line 12: | Line 12: | ||
exposeFOW(mapName,tokens) | exposeFOW(mapName,tokens) | ||
exposeFOW(mapName,tokens, delim) | exposeFOW(mapName,tokens, delim) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|mapname|Optional map name.}} | {{param|mapname|Optional map name.}} | ||
Line 30: | Line 30: | ||
<!-- Expose FoW for indicated tokens in a JSON array on the named map. --> | <!-- Expose FoW for indicated tokens in a JSON array on the named map. --> | ||
[h: exposeFOW("Pit of Despair",'["Westley", "Count Rugen"]', "json")] | [h: exposeFOW("Pit of Despair",'["Westley", "Count Rugen"]', "json")] | ||
</ | </syntaxhighlight> | ||
| changes= | | changes= | ||
* '''1.5.4''' - Added tokens and delim parameters. | * '''1.5.4''' - Added tokens and delim parameters. |
Revision as of 17:51, 14 March 2023
exposeFOW() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b76
Clears the Fog of War (FOW) for all selected tokens on the current map according to their sight settings. An optional
mapName
parameter allows exposure on maps other than the current map. Note that unless the optional tokens
parameter is provided there must be tokens selected on the map.Usage
<source lang="mtmacro"> exposeFOW() exposeFOW(mapname) exposeFOW(mapName,tokens) exposeFOW(mapName,tokens, delim) </syntaxhighlight> Parameters
mapname
- Optional map name.tokens
- Optional delimited string list or JSON array of tokens.delim
- Delimiter for tokens parameter. Defaults to ",". Use "json" for a JSON array.
Example
<source lang="mtmacro" line>
[h: exposeFOW()] [h: exposeFOW("Pit of Despair")] [h: exposeFOW("Pit of Despair", "Westley, Count Rugen")] [h: exposeFOW("Pit of Despair", "Westley:Count Rugen", ":")])] [h: exposeFOW("Pit of Despair",'["Westley", "Count Rugen"]', "json")]
</syntaxhighlight>
Version Changes
- 1.5.4 - Added tokens and delim parameters.