herolab.getImage

From RPTools Wiki
Revision as of 14:47, 5 March 2019 by Phergus (talk | contribs) (New Hero Lab function.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

herolab.getImage() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.5
Returns the asset id of the image retrieved from Hero Lab for a Token. Hero Lab can store 0 to n images for a given character. The index is the order Hero Lab stores the images (not the display order in Hero lab). Index always starts at 0.

Usage

herolab.getImage(index)
herolab.getImage(index, id)

Parameters

  • index - The index of the image you wish to retrieve.
  • id - The token id of the token to name, defaults to the Current Token.

description of parameters

Example

This example doesn't really do anything.
[portraitImage = herolab.getImage(0)]
[setTokenImage(portraitImage)]

Returns:

Asset ID of requested image.

See Also

Version Changes

  • 1.5 - Added to main MapTool build.