setTokenImage: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=setTokenImage
|name=setTokenImage
|version=1.3b48
|description=
|description=
Sets the image for the for the [[Token:Current Token|Current Token]]. The image can come from several sources. It can come from a function that returns an [[asset id]] such as [[Macros:Functions:tblImage |tblImage()]] or [[Macros:Functions:getTokenImage|getTokenImage()]]. Or it could come from a [[Token:Image Token|Image Token]].
Sets the image for the for the [[Token:Current Token|Current Token]]. The image can come from several sources. It can come from a function that returns an [[asset id]] such as [[Macros:Functions:tblImage |tblImage()]] or [[Macros:Functions:getTokenImage|getTokenImage()]]. Or it could come from a [[Token:Image Token|Image Token]].
Line 6: Line 7:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: = setTokenImage(assetId)]
setTokenImage(assetId)
[h: = setTokenImage(tokenImageName)]
</source>
<source lang="mtmacro" line>
setTokenImage(tokenImageName)
</source>
</source>



Revision as of 12:31, 10 March 2009

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(tokenImageName)

Example

[h: setTokenImage(tblImage("elfImages", 1))]
[h: setTokenImage("image:Elf-Dead")]