setTokenImage

From RPTools Wiki
Revision as of 18:30, 29 November 2019 by Phergus (talk | contribs)
Jump to navigation Jump to search

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 token id 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 and mapname parameter options.