removeFromInitiative: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Unifying Current Token red link.)
(Documentation was incomplete and didn't included any parameter. Version change date may be incorrect, I guess parameters were added in the same version than with addToInitiative() and other functions)
Line 2: Line 2:
|name=removeFromInitiative
|name=removeFromInitiative
|description=
|description=
Removes the [[Current Token]] from the [[Initiative:Initiative Panel|Initiative Panel]].
Removes the [[Current Token]] from the [[Initiative:Initiative Panel|Initiative Panel]]. Additional parameters allow you to specify the token.
      
      
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: removeFromInitiative(num, num, ...)]
removeFromInitiative()
removeFromInitiative(id)
removeFromInitiative(id, mapname)
</source>
</source>
'''Parameters'''
{{param|id|The token {{code|id}} of the token to be removed from the initiative.  Defaults to the [[Current Token]]. {{TrustedParameter}} }}
{{param|mapname|The name of the map to find the token.  Defaults to the current map.}}
* {{code|return}} - Returns 1 if removed from the initiative, 0 if did not.
|example=
To remove the token with the name "Dragon" in current map from the [[Initiative:initiative panel|initiative panel]].
<source lang="mtmacro" line>
[h: removeFromInitiative("Dragon")]
</source>
|also=
[[addToInitiative | addToInitiative()]] [[removeAllFromInitiative | removeAllFromInitiative()]] [[removeAllNPCsFromInitiative | removeAllNPCsFromInitiative()]] [[removeAllPCsFromInitiative | removeAllPCsFromInitiative()]]
|changes=
{{change|1.5.7|Added {{code|id}} and {{code|mapname}} parameter options.}}
}}
}}
[[Category:Initiative Function]]
[[Category:Initiative Function]]

Revision as of 23:03, 11 May 2020

removeFromInitiative() Function

Removes the Current Token from the Initiative Panel. Additional parameters allow you to specify the token.

Usage

removeFromInitiative()
removeFromInitiative(id)
removeFromInitiative(id, mapname)

Parameters

  • id - The token id of the token to be removed from the initiative. Defaults to the Current Token.

     Note: This parameter can only be used in a Trusted Macro

  • mapname - The name of the map to find the token. Defaults to the current map.
  • return - Returns 1 if removed from the initiative, 0 if did not.

Example

To remove the token with the name "Dragon" in current map from the initiative panel.
[h: removeFromInitiative("Dragon")]

See Also

Version Changes

  • 1.5.7 - Added id and mapname parameter options.