getStateImage: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Initial write-up.)
 
(Copied example over from previous article that was overlooked due to being orphaned.)
Line 16: Line 16:
* {{code|state}} - The name of the state which has its image asset returned.
* {{code|state}} - The name of the state which has its image asset returned.
* {{code|size}} - The size that the state image will be resized to; this is the height of the final size.
* {{code|size}} - The size that the state image will be resized to; this is the height of the final size.
|example=
To display the image for the "Dead" [[Token:state | token state]] use.
<source lang="mtmacro" line>
<img src='[r:getStateImage("Dead")]'></img>
</source>


}}
}}
[[Category:State Function]]
[[Category:State Function]]

Revision as of 14:06, 25 March 2009

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

getStateImage() Function

Introduced in version 1.3b40
Gets the image for a state, the state must be one of the image types for this to work.

Usage

getStateImage(state)
getStateImage(state, size)

Parameters

  • state - The name of the state which has its image asset returned.
  • size - The size that the state image will be resized to; this is the height of the final size.

Example

To display the image for the "Dead" token state use.
<img src='[r:getStateImage("Dead")]'></img>