findToken: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) mNo edit summary |
Verisimilar (talk | contribs) m (Added version.) |
||
Line 2: | Line 2: | ||
|name=findToken | |name=findToken | ||
|trusted=true | |trusted=true | ||
|version=1.3b48 | |||
|description=Finds a [[Token:token|token]] on the current [[Map:map|map]] by the [[Token:token|token]] name or GM name and returns its id. If the [[Token:token|token]] is not found then an empty string "" is returned. | |description=Finds a [[Token:token|token]] on the current [[Map:map|map]] by the [[Token:token|token]] name or GM name and returns its id. If the [[Token:token|token]] is not found then an empty string "" is returned. | ||
|usage= | |usage= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
findToken(name) | |||
</source> | </source> | ||
Revision as of 13:05, 10 March 2009
findToken() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b48
Finds a token on the current map by the token name or GM name and returns its id. If the token is not found then an empty string "" is returned.
Usage
findToken(name)
Example
[h: id = findToken("Hero")]
[if (id == "", "Token not found!", "Token found")]