setMapVisible: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setMapVisible |version=1.4.0.1 |description= Sets a maps visibility to players to {{true}} or {{false}}. If no map is specified the current map is select...")
 
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 2: Line 2:
|name=setMapVisible
|name=setMapVisible
|version=1.4.0.1
|version=1.4.0.1
|trusted=true
|description=
|description=
Sets a maps visibility to players to {{true}} or {{false}}. If no map is specified the current map is selected. May only be used by a trusted macro.
Sets a maps visibility to players to {{true}} or {{false}}. If no map is specified the current map is selected.
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setMapVisible(visible)
setMapVisible(visible)
setMapVisible(visible, mapName)
setMapVisible(visible, mapRef)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|visible|Whether or not the map can be seen by players, {{true}} or {{false}}.}}
{{param|visible|Whether or not the map can be seen by players, {{true}} or {{false}}.}}
{{param|mapName|A string containing the name of the Map.}}
{{param|mapRef|The Name or ID of the map.}}
|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
</source>
[r:setMapVisible(1)]
[r:setMapVisible(1, "Grasslands")]
</syntaxhighlight>
}}
}}
[[Category:Map Function]]

Latest revision as of 23:59, 14 March 2023

setMapVisible() Function

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

Introduced in version 1.4.0.1
Sets a maps visibility to players to true(1) or false(0). If no map is specified the current map is selected.

Usage

setMapVisible(visible)
setMapVisible(visible, mapRef)

Parameters

  • visible - Whether or not the map can be seen by players, true(1) or false(0).
  • mapRef - The Name or ID of the map.

Examples

[r:setMapVisible(1)]
[r:setMapVisible(1, "Grasslands")]