nextInitiative: Difference between revisions
Jump to navigation
Jump to search
m (Updating to reflect that 1.8 has been released.) |
m (Replaced source tages with syntaxhighlight) |
||
Line 1: | Line 1: | ||
{{MacroFunction | {{MacroFunction | ||
|name=nextInitiative | |name=nextInitiative | ||
|trusted=true | |trusted=true | ||
|version=1.3b41 | |version=1.3b41 | ||
|description= | |description= | ||
Advances the initiative to the next [[Introduction to Tokens|Token]] in the [[Initiative Panel]]. 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 get the Initiative. | Advances the initiative to the next [[Introduction to Tokens|Token]] in the [[Initiative Panel]]. 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 get the Initiative. | ||
* ''Since 1.8'': 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. | * ''Since 1.8'': 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= | ||
nextInitiative() | <syntaxhighlight lang="mtmacro" line> | ||
</ | nextInitiative() | ||
|also= | </syntaxhighlight> | ||
{{func|prevInitiative}} | |also= | ||
|changes= | {{func|prevInitiative}} | ||
* '''1.8''' - function now triggers the new {{code|onInitiativeChangeRequest}} and {{code|onInitiativeChange}} events | |changes= | ||
* '''1.3b41''' - Added function | * '''1.8''' - function now triggers the new {{code|onInitiativeChangeRequest}} and {{code|onInitiativeChange}} events | ||
}} | * '''1.3b41''' - Added function | ||
[[Category:Initiative Function]] | }} | ||
[[Category:Initiative Function]] |
Revision as of 18:04, 14 July 2022
nextInitiative() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.3b41
Advances the initiative to the next Token in the Initiative Panel. 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 get the Initiative.
* Since 1.8: This function triggers the
onInitiativeChangeRequest
(and 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
nextInitiative()
See Also
Version Changes
- 1.8 - function now triggers the new
onInitiativeChangeRequest
andonInitiativeChange
events
* 1.3b41 - Added function