setTokenHeight: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setTokenHeight(size, id) | setTokenHeight(size, id) | ||
</ | setTokenHeight(size, id, mapname) | ||
</syntaxhighlight> | |||
'''Parameters''' | '''Parameters''' | ||
{{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 height. Defaults to the [[Current Token]].}}{{TrustedParameter}} | {{param|id|The token {{code|id}} of the token to set its height. Defaults to the [[Current Token]].}}{{TrustedParameter}} | ||
{{param|mapname|The name of the map to find the token. Defaults to the current map.}} | |||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r: setTokenHeight(300, "Dragon")] | [r: setTokenHeight(300, "Dragon")] | ||
[r: setTokenHeight(150, "Dragon")] | [r: setTokenHeight(150, "Dragon")] | ||
</ | </syntaxhighlight> | ||
|changes= | |||
{{change|1.5.4|Added {{code|mapname}} parameter option.}} | |||
|also= | |also= |
Latest revision as of 20:30, 14 March 2023
setTokenHeight() Function
• Introduced in version 1.3b91
Sets the token's image height in pixels (boundary size).
Usage
setTokenHeight(size, id)
setTokenHeight(size, id, mapname)
Parameters
size
- grid size of the tokenid
- The tokenid
of the token to set its height. 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: setTokenHeight(300, "Dragon")]
[r: setTokenHeight(150, "Dragon")]
See Also
Version Changes
- 1.5.4 - Added
mapname
parameter option.