setTokenImage: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function setTokenImage== 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 [[ass...)
 
m (Applied Template:MacroFunction)
Line 1: Line 1:
==Function setTokenImage==
{{MacroFunction
 
|name=setTokenImage
|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]].


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: = setTokenImage(assetId)]
[h: = setTokenImage(assetId)]
Line 9: Line 10:
</source>
</source>


 
|example=
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setTokenImage(tblImage("elfImages", 1))]
[h: setTokenImage(tblImage("elfImages", 1))]
[h: setTokenImage("image:Elf-Dead")]
[h: setTokenImage("image:Elf-Dead")]
</source>
</source>
}}
[[Category:Token Function]]

Revision as of 04:41, 9 March 2009

setTokenImage() Function

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

[h: = setTokenImage(assetId)]
[h: = setTokenImage(tokenImageName)]

Example

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