From RPTools Wiki
Jump to navigation Jump to search

getTokenOpacity() Function

Introduced in version
Returns the opacity value of the corresponding token.


getTokenOpacity(tokenRef, mapname)


  • tokenRef - OPTIONAL: Either the token id or Token Name of the token for which you want to retrieve the opacity, defaults to the Current Token.

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

  • mapname - OPTIONAL: The name of the map to find the token. Defaults to the current map.
Token IDs are unique, but Token Names can be duplicated. Using Token Name when more than one token has the same name can produce unexpected results.


The opacity for the Dragon token is: [r: getTokenOpacity("Dragon")]
[h, token("Dragon"): opacity = getTokenOpacity()]

Version Changes

  • 1.5.4 - Added mapname parameter option.