getState: Difference between revisions
Jump to navigation
Jump to search
Dranfaelarun (talk | contribs) No edit summary |
Verisimilar (talk | contribs) m (Updated with recent version changes.) |
||
Line 1: | Line 1: | ||
{{stub}} | {{stub|Examples using current functionality.}} | ||
{{MacroFunction | {{MacroFunction | ||
|name=getState | |name=getState | ||
|version=1.3b40 | |version=1.3b40 | ||
|description= | |description= | ||
Checks if the specified [[State]] is set on a token, return {{true}} or {{false}}. | |||
|usage= | |usage= | ||
Line 10: | Line 10: | ||
getState(state) | getState(state) | ||
</source> | </source> | ||
''' | <source lang="mtmacro" line> | ||
getState(state, id) | |||
</source> | |||
'''Parameters''' | |||
{{param|state|The name of the state to check for.}} | |||
{{param|id|The token {{code|id}} of the token to check for the state, defaults to the [[Current Token]].}} | |||
|example= | |example= | ||
Line 17: | Line 21: | ||
[if(getState("Dead"), "You are dead!", "You are not dead (yet!)")] | [if(getState("Dead"), "You are dead!", "You are not dead (yet!)")] | ||
</source> | </source> | ||
|also= | |||
[[State]], | |||
[[setState|setState()]] | |||
|changes= | |||
{{change|1.3b51|Added {{code|id}} parameter option.}} | |||
}} | }} | ||
[[Category:State Function]] | [[Category:State Function]] | ||
[[Category:Token Function]] | [[Category:Token Function]] |
Revision as of 01:05, 31 March 2009
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Examples using current functionality.
getState() Function
• Introduced in version 1.3b40
Usage
getState(state)
getState(state, id)
Parameters
state
- The name of the state to check for.id
- The tokenid
of the token to check for the state, defaults to the Current Token.
Example
[if(getState("Dead"), "You are dead!", "You are not dead (yet!)")]
See Also
Version Changes
- 1.3b51 - Added
id
parameter option.