getTokenOpacity: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
<source lang="mtmacro" | <source lang="mtmacro"> | ||
setTokenOpacity() | |||
setTokenOpacity(id) | |||
setTokenOpacity(id, mapname) | |||
</source> | </source> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to retrieve the opacity, defaults to the [[Current Token]].}}{{TrustedParameter}} | {{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to retrieve the opacity, defaults to the [[Current Token]].}}{{TrustedParameter}} | ||
{{param|mapname|OPTIONAL: The name of the map to find the token. Defaults to the current map.}} | |||
|example= | |example= | ||
Line 18: | Line 21: | ||
[h, token("Dragon"): opacity = getTokenOpacity()] | [h, token("Dragon"): opacity = getTokenOpacity()] | ||
</source> | </source> | ||
|changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | |||
}} | }} | ||
[[Category:VBL Function]] | [[Category:VBL Function]] |
Revision as of 03:50, 15 August 2019
getTokenOpacity() Function
• Introduced in version 1.4.2.0
Returns the opacity value of the corresponding token.
Usage
setTokenOpacity()
setTokenOpacity(id)
setTokenOpacity(id, mapname)
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
The opacity for the Dragon token is: [r: getTokenOpacity("Dragon")]
[h, token("Dragon"): opacity = getTokenOpacity()]
Version Changes
- 1.5.4 - Added
mapname
parameter option.