setTokenImage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
setTokenImage(tokenImageName, id, mapname) | setTokenImage(tokenImageName, id, mapname) | ||
</source> | </source> | ||
'''Parameters''' | |||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set the image, defaults to the [[Current Token]]. }} | {{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set the image, defaults to the [[Current Token]]. }} | ||
{{param|mapname|OPTIONAL: The name of the map to find the token. Defaults to the current map.}} | {{param|mapname|OPTIONAL: The name of the map to find the token. Defaults to the current map.}} |
Revision as of 18:30, 29 November 2019
setTokenImage() Function
• Introduced in version 1.3b48
Sets the image for the for the Current Token. The image can come from several sources. It can come from a function that returns an asset id such as tblImage() or getTokenImage(). Or it could come from a Image Token.
Usage
setTokenImage(assetId)
setTokenImage(assetId, id)
setTokenImage(assetId, id, mapname)
setTokenImage(tokenImageName)
setTokenImage(tokenImageName, id)
setTokenImage(tokenImageName, id, mapname)
Parameters
id
- OPTIONAL: The tokenid
of the token for which you want to set the image, defaults to the Current Token.mapname
- OPTIONAL: The name of the map to find the token. Defaults to the current map.
Example
[h: setTokenImage(tblImage("elfImages", 1))]
[h: setTokenImage("image:Elf-Dead")]
Version Changes
- 1.5.4 - Added
id
andmapname
parameter options.