getVisibleMapDisplayNames: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "source>" to "syntaxhighlight>")
 
Line 8: Line 8:
<syntaxhighlight lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getVisibleMapDisplayNames()
getVisibleMapDisplayNames()
</source>
</syntaxhighlight>
<syntaxhighlight lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getVisibleMapDisplayNames(delim)
getVisibleMapDisplayNames(delim)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|delim|The delimiter to use for the [[String List]]. If the value is {{code|json}} then a [[JSON Array]] is returned.}}
{{param|delim|The delimiter to use for the [[String List]]. If the value is {{code|json}} then a [[JSON Array]] is returned.}}
Line 19: Line 19:
<syntaxhighlight lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getVisibleMapNames()]
[h: maps = getVisibleMapNames()]
</source>
</syntaxhighlight>


To get the display names of all of the player visible maps in a [[JSON Array]]
To get the display names of all of the player visible maps in a [[JSON Array]]
<syntaxhighlight lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: maps = getVisibleMapNames("json")]
[h: maps = getVisibleMapNames("json")]
</source>
</syntaxhighlight>
|also=
|also=
{{func|getMapDisplayName}} {{func|getAllMapDisplayNames}}
{{func|getMapDisplayName}} {{func|getAllMapDisplayNames}}

Latest revision as of 21:13, 14 March 2023

getVisibleMapNames() Function

Introduced in version 1.9.0
Returns the display names of all of the player visible maps as either a String List or JSON Array.

Usage

getVisibleMapDisplayNames()
getVisibleMapDisplayNames(delim)

Parameters

Examples

To get the display names of all of the player visible maps in a String List.
[h: maps = getVisibleMapNames()]

To get the display names of all of the player visible maps in a JSON Array

[h: maps = getVisibleMapNames("json")]

See Also