addToInitiative: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) m (Unifying Current Token red link.) |
Lmarkus001 (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: addToInitiative()] | [h: addToInitiative()] | ||
[H: addToInitiative( AllowDuplicates, value ) ] | |||
</source> | </source> | ||
'''Parameters''' | |||
* {{code|AllowDuplicates}} - If false (default) then will not add the token if it is already in the initiative list.. | |||
* {{code|value}} - The initiative value to set. | |||
|example= | |||
The following example shows how to add a [[Current Token]] to the [[Initiative:initiative panel|initiative panel]], set | The following example shows how to add a [[Current Token]] to the [[Initiative:initiative panel|initiative panel]], set | ||
its initiative and then sort the [[Initiative:initiative panel|initiative panel]]. Normally you would not sort the [[Initiative:initiative panel|initiative panel]] every time you add a [[Current Token]] but its done here to show you how it is done. | its initiative and then sort the [[Initiative:initiative panel|initiative panel]]. Normally you would not sort the [[Initiative:initiative panel|initiative panel]] every time you add a [[Current Token]] but its done here to show you how it is done. |
Revision as of 18:32, 27 October 2009
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
addToInitiative() Function
Adds the Current Token to the initiative panel.
This function will not assign any initiative value to the tokens, you can use the setInitiative() function
to set the initiative value of tokens.Usage
[h: addToInitiative()]
[H: addToInitiative( AllowDuplicates, value ) ]
Parameters
AllowDuplicates
- If false (default) then will not add the token if it is already in the initiative list..value
- The initiative value to set.
Example
The following example shows how to add a Current Token to the initiative panel, set
its initiative and then sort the initiative panel. Normally you would not sort the initiative panel every time you add a Current Token but its done here to show you how it is done.
[h: addToInitiative()]
[h: setInitiative(1d20)]
[h: sortInitiative()]