restoreFoW: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=restoreFoW |proposed=false |trusted=true |version=1.4.1.3 |description=resets all FoW for the map, duplicates the FoW reset when you import a new map san...")
 
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 4: Line 4:
|trusted=true
|trusted=true
|version=1.4.1.3
|version=1.4.1.3
|description=resets all FoW for the map, duplicates the FoW reset when you import a new map sans dialog
|description=
Resets all fog of war (FoW) for the map.


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
restoreFoW()
restoreFoW()
</source>
restoreFoW(mapRef)
</syntaxhighlight>


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|mapRef|Optional.  Name or ID of the map.}}


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


|also=
|also=
[[Introduction_to_Lights_and_Sights#Fog_of_War ]], {{func|toggleFoW}}, {{func|drawVBL}}
[[Introduction_to_Lights_and_Sights#Fog_of_War]], {{func|toggleFoW}}
}}
}}
[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]
[[Category:FoW Function]]
[[Category:FoW]]

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")]

See Also