copyMap: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "source>" to "syntaxhighlight>") |
|||
Line 8: | Line 8: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
copyMap(existingMapName, newMapName) | copyMap(existingMapName, newMapName) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|existingMapName|The name of the existing map you wish to copy.}} | {{param|existingMapName|The name of the existing map you wish to copy.}} | ||
Line 16: | Line 16: | ||
[h:copyMap("BaseMap","Tower")] | [h:copyMap("BaseMap","Tower")] | ||
[h:setMapVisible(1,"Tower")] | [h:setMapVisible(1,"Tower")] | ||
</ | </syntaxhighlight> | ||
}} | }} | ||
[[Category:Map Function]] | [[Category:Map Function]] |
Revision as of 17:19, 14 March 2023
copyMap() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.4.0.1
Creates a copy of an specified map, with the new map name. Returns the name of the new map.
Usage
<source lang="mtmacro" line> copyMap(existingMapName, newMapName) </syntaxhighlight> Parameters
existingMapName
- The name of the existing map you wish to copy.newMapName
- A string containing the name of the new copy.
Examples
<source lang="mtmacro" line>
[h:copyMap("BaseMap","Tower")] [h:setMapVisible(1,"Tower")]
</syntaxhighlight>