prevInitiative: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page prevInitiative to PrevInitiative without leaving a redirect: Converting page title to first-letter uppercase) |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|version=1.8 | |version=1.8 | ||
|description= | |description= | ||
Restores the initiative to the previous [[Introduction to Tokens|Token]] in the [[Initiative Panel]], returning to the previous round if necessary. Only the [[GM]] or a trusted macro can call this function. This function returns the offset into the [[Initiative Panel]] (starting at 0) of the [[Introduction to Tokens|Token]] that will receive Initiative. '''Note''': neither this function nor the corresponding UI button will allow the Initiative to fall back any further than the first token in the first round. | Restores the initiative to the previous [[Introduction to Tokens|Token]] in the [[Initiative Panel]], returning to the previous round if necessary. Only the [[Introduction to Game Hosting#Server Options and Settings|GM]] or a trusted macro can call this function. This function returns the offset into the [[Initiative Panel]] (starting at 0) of the [[Introduction to Tokens|Token]] that will receive Initiative. '''Note''': neither this function nor the corresponding UI button will allow the Initiative to fall back any further than the first token in the first round. | ||
* This function triggers the {{code|[[onInitiativeChangeRequest]]}} (and {{code|[[onInitiativeChange]]}}) events, so it is possible that the change will be blocked. See the [[Guide to Initiative Events]] for more details. This function will return the offset of the token that has initiative after this function completes, whether the change proceeded as requested or not. | * This function triggers the {{code|[[onInitiativeChangeRequest]]}} (and {{code|[[onInitiativeChange]]}}) events, so it is possible that the change will be blocked. See the [[Guide to Initiative Events]] for more details. This function will return the offset of the token that has initiative after this function completes, whether the change proceeded as requested or not. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
prevInitiative() | prevInitiative() | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
{{func|nextInitiative}} | {{func|nextInitiative}} |
Latest revision as of 23:59, 9 May 2023
prevInitiative() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.8
Restores the initiative to the previous Token in the Initiative Panel, returning to the previous round if necessary. Only the GM or a trusted macro can call this function. This function returns the offset into the Initiative Panel (starting at 0) of the Token that will receive Initiative. Note: neither this function nor the corresponding UI button will allow the Initiative to fall back any further than the first token in the first round.
- This function triggers the
onInitiativeChangeRequest
(andonInitiativeChange
) events, so it is possible that the change will be blocked. See the Guide to Initiative Events for more details. This function will return the offset of the token that has initiative after this function completes, whether the change proceeded as requested or not.
Usage
prevInitiative()
See Also
Version Changes
- 1.8 - Added function.