restoreFoW: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
mNo edit summary
(Added mapname parameter. Cleanup.)
Line 10: Line 10:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
restoreFoW()
restoreFoW()
restoreFoW(mapname)
</source>
</source>


This function resets all FoW for the current map. 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|none|This function has no parameters.}}
{{param|mapname|Optional map name.}}


''Example:''<source lang="mtmacro">
|example=
[h:restoreFoW()]
<source lang="mtmacro">
</source><br />
<!-- Restore all Fog of War on current map -->
[h: restoreFoW()]
<!-- Restore all Fog of War on named map -->
[h: restoreFoW("Skull Mountain")]
</source>


|also=
|also=

Revision as of 12:32, 1 August 2019

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(mapname)

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

  • mapname - Optional map name.

Example

<!-- Restore all Fog of War on current map -->
[h: restoreFoW()]
<!-- Restore all Fog of War on named map -->
[h: restoreFoW("Skull Mountain")]

See Also