moveTokenToMap: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Initial write-up.)
 
No edit summary
(6 intermediate revisions by 5 users not shown)
Line 8: Line 8:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
moveTokenToMap(id, map)
moveTokenToMap(id, map, x)
moveTokenToMap(id, map, x, y)
moveTokenToMap(id, map, x, y, z)
moveTokenToMap(id, map, x, y, z)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|id|The token {{code|id}} or a [[JSON Array]] of token {{code|id}}s of the token/s to move.}}
{{param|id|The token {{code|id}} or a [[JSON Array]] of token {{code|id}}s of the token/s to move.}}
{{param|map|A string containing the name of the map that the token is moved to.}}
{{param|map|A string containing the name of the map that the token is moved to.}}
{{param|x|The {{code|X}} coordinate of the map that the token should be moved to.}}
{{param|x|The {{code|X}} coordinate of the map that the token should be moved to. Default to 0.}}
{{param|y|The {{code|Y}} coordinate of the map that the token should be moved to.}}
{{param|y|The {{code|Y}} coordinate of the map that the token should be moved to. Default to 0.}}
{{param|z|The z-order that the token should have after being moved.}}
{{param|z|The z-order that the token should have after being moved. Defaults to the largest of the map.}}


|also=
|also=
{{func|moveTokenFrom}}
{{func|moveTokenFromMap}}


}}
}}
[[Category:Token Function]][[Category:Map Function]]

Revision as of 23:02, 14 March 2023

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Examples of usage, and clearer description.

moveTokenToMap() Function

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

Introduced in version 1.3b54
Moves tokens from the current map to a specified map.

Usage

moveTokenToMap(id, map)
moveTokenToMap(id, map, x)
moveTokenToMap(id, map, x, y)
moveTokenToMap(id, map, x, y, z)

Parameters

  • id - The token id or a JSON Array of token ids of the token/s to move.
  • map - A string containing the name of the map that the token is moved to.
  • x - The X coordinate of the map that the token should be moved to. Default to 0.
  • y - The Y coordinate of the map that the token should be moved to. Default to 0.
  • z - The z-order that the token should have after being moved. Defaults to the largest of the map.


See Also