getTokenImage: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Unifying Current Token red link.)
No edit summary
Line 13: Line 13:
<img src='[r:getTokenImage()]'></img>
<img src='[r:getTokenImage()]'></img>
</source>
</source>
To get the image of any [[Token:token|token]] using its id and the  token roll option.
<source lang="mtmacro" line>
[h, token(tokenId): imgAsset = getTokenImage()]
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 09:29, 4 May 2010

getTokenImage() Function

Returns the asset id of the image for the for the Current Token.

Usage

[h: assetId = getTokenImage(size)]

Example

To display the image for the current token.
<img src='[r:getTokenImage()]'></img>

To get the image of any token using its id and the token roll option. <source lang="mtmacro" line>

[h, token(tokenId): imgAsset = getTokenImage()]