currentToken: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Text replacement - "source>" to "syntaxhighlight>")
m (Text replacement - "<source" to "<syntaxhighlight")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
currentToken()
currentToken()
</syntaxhighlight>
</syntaxhighlight>
Line 14: Line 14:
|examples=
|examples=
Get the Token ID of the [[Current Token]].
Get the Token ID of the [[Current Token]].
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r:id = currentToken()]
[r:id = currentToken()]
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 23:59, 14 March 2023

currentToken() Function

Introduced in version 1.3b48
Returns the id of the Current Token. In most cases this will return the same as getImpersonated() function. The difference is when it is called in a [token():] or after a call to the switchToken() function, in both these cases it will return the id of the token being operated on, while getImpersonated() will return the id of the impersonated token.

Usage

currentToken()

Parameters

None.

Examples

Get the Token ID of the Current Token.
[r:id = currentToken()]

See Also

Version Changes

  • 1.3b51 - No longer a trusted function.