setTokenWidth: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page setTokenWidth to SetTokenWidth without leaving a redirect: Converting page title to first-letter uppercase)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setTokenWidth(size)
setTokenWidth(size)
setTokenWidth(size, id)
setTokenWidth(size, id)
setTokenWidth(size, id, mapname)
setTokenWidth(size, id, mapname)
</source>
</syntaxhighlight>


'''Parameters'''
'''Parameters'''
Line 20: Line 20:


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: setTokenWidth(300, "Dragon")]
[r: setTokenWidth(300, "Dragon")]
[r: setTokenHeight(150, "Dragon")]
[r: setTokenHeight(150, "Dragon")]
</source>
</syntaxhighlight>


|changes=
|changes=

Latest revision as of 17:47, 14 March 2023

setTokenWidth() Function

Introduced in version 1.3b91
Sets the token's image width in pixels (boundary size).

Usage

setTokenWidth(size)
setTokenWidth(size, id)
setTokenWidth(size, id, mapname)

Parameters

  • size - grid size of the token
  • id - The token id of the token to set its width. Defaults to the Current Token.

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

  • mapname - The name of the map to find the token. Defaults to the current map.

Example

[r: setTokenWidth(300, "Dragon")]
[r: setTokenHeight(150, "Dragon")]

See Also

Version Changes

  • 1.5.4 - Added mapname parameter option.