setCurrentInitiative: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Fixing wikilinks)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|trsuted=true
|trsuted=true
|description=
|description=
Gives the [[Initiative:Initiative|Initiative]] to the [[Token]] at the specified offset in the [[Iniatiative:Initiative Panel|Initiative Panel]]. Offsets start at 0.   
Gives the [[Introduction to Initiative|Initiative]] to the [[Token]] at the specified offset in the [[MapTool User Interface#Initiative|Initiative Panel]]. Offsets start at 0.   


To clear, specify a number that is not a valid token offset, like -1.
To clear, specify a number that is not a valid token offset, like -1.


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setCurrentInitiative(offset)]
[h: setCurrentInitiative(offset)]
</source>
</syntaxhighlight>


|examples=
|examples=
Give Initiative to the 4th [[Token]].
Give Initiative to the 4th [[Token]].
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setCurrentInitiative(3)]
[h: setCurrentInitiative(3)]
</source>
</syntaxhighlight>
Clear current initiative  (any number that is not a valid token offset will work).
Clear current initiative  (any number that is not a valid token offset will work).
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setCurrentInitiative(-1)]
[h: setCurrentInitiative(-1)]
[h: setCurrentInitiative(999)]
[h: setCurrentInitiative(999)]
</source>
</syntaxhighlight>


}}
}}
[[Category:Initiative Function]]
[[Category:Initiative Function]]

Latest revision as of 21:07, 14 March 2023

setCurrentInitiative() Function

Gives the Initiative to the Token at the specified offset in the Initiative Panel. Offsets start at 0. To clear, specify a number that is not a valid token offset, like -1.

Usage

[h: setCurrentInitiative(offset)]

Examples

Give Initiative to the 4th Token.
[h: setCurrentInitiative(3)]

Clear current initiative (any number that is not a valid token offset will work).

[h: setCurrentInitiative(-1)]
[h: setCurrentInitiative(999)]