getStateImage: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) (Initial write-up.) |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
|version=1.3b40 | |version=1.3b40 | ||
|description= | |description= | ||
Gets the image | Gets the [[Asset ID|asset id]] for the image of a state, the state must be one of the image types for this to work. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getStateImage(state) | getStateImage(state) | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
getStateImage(state, size) | getStateImage(state, size) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
* {{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. | |||
<syntaxhighlight lang="mtmacro" line> | |||
<img src='[r:getStateImage("Dead")]'></img> | |||
</syntaxhighlight> | |||
}} | }} | ||
[[Category:State Function]] | [[Category:State Function]] |
Latest revision as of 23:59, 14 March 2023
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 asset id for the image of 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>