setTokenHeight: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setTokenHeight |proposed=false |trusted=false |version=1.3b91 |description= This function set the token's image Height in pixels (boundary size). |usage...")
 
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 5: Line 5:
|version=1.3b91
|version=1.3b91
|description=
|description=
This function set the token's image Height in pixels (boundary size).
Sets the token's image height in pixels (boundary size).


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


'''Parameters'''
'''Parameters'''
{{param|size|grid size of the token}}
{{param|size|grid size of the token}}
{{param|id|The token id of the token to set its height}}
{{param|id|The token {{code|id}} of the token to set its height.  Defaults to the [[Current Token]].}}{{TrustedParameter}}
{{param|mapRef|The Name or ID of the map to find the token.  Defaults to the current map.}}
 


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


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


|also=
|also=
{{func|setTokenWidth}},
{{func|setTokenWidth}}, {{func|getTokenHeight}}, {{func|getTokenWidth}}
{{func|getTokenHeight}},
{{func|getTokenWidth}}
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

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

Parameters

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

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

  • mapRef - The Name or ID 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.