bringToFront

From RPTools Wiki
Revision as of 17:05, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "source>" to "syntaxhighlight>")
Jump to navigation Jump to search

bringToFront() Function

Introduced in version 1.3b48
Adjust the z order (or draw order) of the Token so that is is drawn after all other Tokens on the same Map Layer, this has the effect of making the Token appear to be in front of the other Tokens as it will obscure other Tokens on the same Map Layer in the same location.

Usage

<source lang="mtmacro" line> bringToFront() bringToFront(id) bringToFront(id, mapname) </syntaxhighlight> Parameter

  • id - The token id or name of the token to effect, 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.

Examples

<source lang="mtmacro" line>

[h: bringToFront()] </syntaxhighlight>


<source lang="mtmacro" line> [h: bringToFront("Hero")]

</syntaxhighlight>

See Also

Version Changes

  • 1.3b51 - Added id parameter option.
  • 1.5.4 - Added mapname parameter option.