getCurrentInitiative: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Text replacement - "source>" to "syntaxhighlight>")
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
|name=getCurrentInitiative
|name=getCurrentInitiative
|trusted=true
|trusted=true
|description=Gets the offset of the [[Token:token|token]] in the [[introduction to Initiative|initiative panel]] that has the [[Initiative:initiative|initiative]]. The offset starts at 0, if no token has [[Initiative:initiative|initiative]] then -1 is returned.
|description=Gets the offset of the [[Token:token|token]] in the [[Introduction to Initiative|initiative panel]] that has the [[Introduction to Initiative|initiative]]. The offset starts at 0, if no token has [[Introduction to Initiative|initiative]] then -1 is returned.


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: offset = getCurrentInitiative()]
[h: offset = getCurrentInitiative()]
</syntaxhighlight>
</syntaxhighlight>
}}
}}
[[Category:Initiative Function]]
[[Category:Initiative Function]]

Latest revision as of 23:09, 4 May 2023

getCurrentInitiative() Function

 Note: This function can only be used in a Trusted Macro

Gets the offset of the token in the initiative panel that has the initiative. The offset starts at 0, if no token has initiative then -1 is returned.

Usage

[h: offset = getCurrentInitiative()]