setTokenPortrait: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
setTokenPortrait(assetId) | setTokenPortrait(assetId) | ||
setTokenPortrait(assetId, id) | setTokenPortrait(assetId, id) | ||
setTokenPortrait(assetId, id, | setTokenPortrait(assetId, id, mapRef) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="mtmacro" line> | <syntaxhighlight lang="mtmacro" line> | ||
setTokenPortrait(tokenImageName) | setTokenPortrait(tokenImageName) | ||
setTokenPortrait(tokenImageName, id) | setTokenPortrait(tokenImageName, id) | ||
setTokenPortrait(tokenImageName, id, | setTokenPortrait(tokenImageName, id, mapRef) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set the portrait, defaults to the [[Current Token]]. }} | {{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set the portrait, defaults to the [[Current Token]]. }} | ||
{{param| | {{param|mapRef|OPTIONAL: The Name or ID of the map to find the token. Defaults to the current map.}} | ||
|changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | |changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | ||
}} | }} | ||
[[Category:Token Function]] | [[Category:Token Function]] |
Latest revision as of 23:59, 21 April 2023
setTokenPortrait() Function
• Introduced in version 1.3b77
Sets the portrait image for the for the Current Token. The image can come from several sources. It can be an Asset ID (like from tblImage() or getTokenImage()), or a Image Token.
Usage
setTokenPortrait(assetId)
setTokenPortrait(assetId, id)
setTokenPortrait(assetId, id, mapRef)
setTokenPortrait(tokenImageName)
setTokenPortrait(tokenImageName, id)
setTokenPortrait(tokenImageName, id, mapRef)
Parameters
id
- OPTIONAL: The tokenid
of the token for which you want to set the portrait, defaults to the Current Token.mapRef
- OPTIONAL: The Name or ID of the map to find the token. Defaults to the current map.
Version Changes
- 1.5.4 - Added
mapname
parameter option.