copyMap: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=copyMap |version=1.4.0.1 |description= Function creates a copy of an specified map, with the new map name. Returns the name of the new map. May only be u...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(7 intermediate revisions by 4 users not shown)
Line 2: Line 2:
|name=copyMap
|name=copyMap
|version=1.4.0.1
|version=1.4.0.1
|trusted=true
|description=
|description=
Function creates a copy of an specified map, with the new map name. Returns the name of the new map. May only be used by a trusted macro.
Creates a copy of an specified map, with the new map name. Returns the name of the new map.
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
copyMap(existingMapName, newMapName)
copyMap(existingMapName, newMapName)
</source>
</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.}}
{{param|newMapName|A string containing the name of the new copy.}}
{{param|newMapName|A string containing the name of the new copy.}}
|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h:copyMap("BaseMap","Tower")]
[h:copyMap("BaseMap","Tower")]
[h:setMapVisible(1,"Tower")]
[h:setMapVisible(1,"Tower")]
</source>
</syntaxhighlight>
 
}}
}}
[[Category:Map Function]]

Latest revision as of 23:59, 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

copyMap(existingMapName, newMapName)

Parameters

  • existingMapName - The name of the existing map you wish to copy.
  • newMapName - A string containing the name of the new copy.

Examples

[h:copyMap("BaseMap","Tower")]
[h:setMapVisible(1,"Tower")]