getTokenOpacity: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page GetTokenOpacity to getTokenOpacity: Converting page titles to lowercase) |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
Line 10: | Line 10: | ||
getTokenOpacity(id) | getTokenOpacity(id) | ||
getTokenOpacity(id, mapname) | getTokenOpacity(id, mapname) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 20: | Line 20: | ||
The opacity for the Dragon token is: [r: getTokenOpacity("Dragon")] | The opacity for the Dragon token is: [r: getTokenOpacity("Dragon")] | ||
[h, token("Dragon"): opacity = getTokenOpacity()] | [h, token("Dragon"): opacity = getTokenOpacity()] | ||
</ | </syntaxhighlight> | ||
|changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | |changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | ||
}} | }} | ||
[[Category:Token Function]] | [[Category:Token Function]] |
Revision as of 20:32, 14 March 2023
getTokenOpacity() Function
• Introduced in version 1.4.2.0
Returns the opacity value of the corresponding token.
Usage
<source lang="mtmacro"> getTokenOpacity() getTokenOpacity(id) getTokenOpacity(id, mapname) </syntaxhighlight>
Parameters
id
- OPTIONAL: The tokenid
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.
Example
<source lang="mtmacro" line>
The opacity for the Dragon token is: [r: getTokenOpacity("Dragon")] [h, token("Dragon"): opacity = getTokenOpacity()]
</syntaxhighlight>
Version Changes
- 1.5.4 - Added
mapname
parameter option.