exposePCOnlyArea: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: {{MacroFunction | name=exposePCOnlyArea | version=1.3b76 | description= {{stub}} Exposes FOW where PC tokens can see and establishes FOW where not. | usage= <source lang="mtmacro"> exp...)
 
m (Text replacement - "source>" to "syntaxhighlight>")
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
| name=exposePCOnlyArea
| name=exposePCOnlyArea
| version=1.3b76
| version=1.3b76
|trusted=true
| description=
| description=
{{stub}}
Clears Fog of War (FOW) where PC tokens can see and establishes/restores FOW everywhere they cannot.  This works the same as the hotkey Meta-Shift-O.  Note that the keystroke may be different for locales other than U.S. English.
Exposes FOW where PC tokens can see and establishes FOW where not.


This function is often used in combination with the [[onTokenMove]] event.
| usage=
| usage=
<source lang="mtmacro">
<syntaxhighlight lang="mtmacro">
exposePCOnlyArea()
exposePCOnlyArea()
</source>
exposePCOnlyArea(mapRef)
</syntaxhighlight>


'''Parameters'''
{{param|mapRef|Optional.  Name or ID of the map. }}


or
|example=
<syntaxhighlight lang="mtmacro" line>
<!-- Expose areas that can be seen by PC tokens on current map. -->
[h: exposePCOnlyArea()]
<!-- Expose areas that can be seen by PC tokens on named map. -->
[h: exposePCOnlyArea("Cliffs of Insanity")]
</syntaxhighlight>


<source lang="mtmacro" >
exposePCOnlyArea(mapname)
</source>
}}
}}
[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]
[[Category:FoW]]

Latest revision as of 23:59, 14 March 2023

exposePCOnlyArea() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b76
Clears Fog of War (FOW) where PC tokens can see and establishes/restores FOW everywhere they cannot. This works the same as the hotkey Meta-Shift-O. Note that the keystroke may be different for locales other than U.S. English. This function is often used in combination with the onTokenMove event.

Usage

exposePCOnlyArea()
exposePCOnlyArea(mapRef)

Parameters

  • mapRef - Optional. Name or ID of the map.

Example

<!-- Expose areas that can be seen by PC tokens on current map. -->
[h: exposePCOnlyArea()]
<!-- Expose areas that can be seen by PC tokens on named map. -->
[h: exposePCOnlyArea("Cliffs of Insanity")]