addToInitiative: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
|name=addToInitiative
|name=addToInitiative
|description=Adds the [[Token:Current Token|Current Token]] to the [[Initiative:initiative panel|initiative panel]].  
|description=Adds the [[Token:Current Token|Current Token]] to the [[Initiative:initiative panel|initiative panel]].  
This function will not assign any initiative value to the [[Token:token|token]]s, you can use the [[setInitiative | setInitiative()]] function
to set the initiative value of tokens.
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: addToInitiative()]
[h: addToInitiative()]
</source>
</source>
The following example shows how to add a [[Token:Current Token|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 [[Token:Current Token|Current Token]] but its done here to show you how it is done.
<source lang="mtmacro" line>
[h: addToInitiative()]
[h: setInitiative(1d20)]
[h: sortInitiative()]
</source>
|also=
[[setInitiative | setInitiative()]] [[addAllPCsToInitiative | addAllPCsToInitiative()]] [[addAllToInitiative | addAllToInitiative()]]
}}
}}
}}
[[Category:Initiative Function]]
[[Category:Initiative Function]]

Revision as of 09:16, 25 March 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()]

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()]


See Also


}}