setTokenWidth: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 11: Line 11:
setTokenWidth(size)
setTokenWidth(size)
setTokenWidth(size, id)
setTokenWidth(size, id)
setTokenWidth(size, id, mapname)
</source>
</source>


Line 16: Line 17:
{{param|size|grid size of the token}}
{{param|size|grid size of the token}}
{{param|id|The token {{code|id}} of the token to set its width.  Defaults to the [[Current token]].}}{{TrustedParameter}}
{{param|id|The token {{code|id}} of the token to set its width.  Defaults to the [[Current token]].}}{{TrustedParameter}}
{{param|mapname|The name of the map to find the token.  Defaults to the current map.}}


|example=
|example=
Line 23: Line 25:
</source>
</source>


|changes=
{{change|1.5.4|Added {{code|mapname}} parameter option.}}


|also=
|also=

Revision as of 20:54, 15 August 2019

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.