restoreFoW: Difference between revisions
Jump to navigation
Jump to search
(Added mapname parameter. Cleanup.) |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
restoreFoW() | restoreFoW() | ||
restoreFoW( | restoreFoW(mapRef) | ||
</ | </syntaxhighlight> | ||
This function resets all FoW for the current map or the indicated map if the optional map name is supplied. Duplicates the FoW reset available through '''Map Menu''' -> '''Restore Fog-of-War''' or when you import a new map sans dialog. | This function resets all FoW for the current map or the indicated map if the optional map name is supplied. Duplicates the FoW reset available through '''Map Menu''' -> '''Restore Fog-of-War''' or when you import a new map sans dialog. | ||
'''Parameters''' | '''Parameters''' | ||
{{param| | {{param|mapRef|Optional. Name or ID of the map.}} | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro"> | ||
<!-- Restore all Fog of War on current map --> | <!-- Restore all Fog of War on current map --> | ||
[h: restoreFoW()] | [h: restoreFoW()] | ||
<!-- Restore all Fog of War on named map --> | <!-- Restore all Fog of War on named map --> | ||
[h: restoreFoW("Skull Mountain")] | [h: restoreFoW("Skull Mountain")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= |
Latest revision as of 23:59, 14 March 2023
restoreFoW() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.4.1.3
Resets all fog of war (FoW) for the map.
Usage
restoreFoW()
restoreFoW(mapRef)
This function resets all FoW for the current map or the indicated map if the optional map name is supplied. Duplicates the FoW reset available through Map Menu -> Restore Fog-of-War or when you import a new map sans dialog.
Parameters
mapRef
- Optional. Name or ID of the map.
Example
<!-- Restore all Fog of War on current map -->
[h: restoreFoW()]
<!-- Restore all Fog of War on named map -->
[h: restoreFoW("Skull Mountain")]