setTokenOpacity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
|usage= | |usage= | ||
<source lang="mtmacro" | <source lang="mtmacro"> | ||
setTokenOpacity(value, | setTokenOpacity(value) | ||
setTokenOpacity(value, id) | |||
setTokenOpacity(value, id, mapname) | |||
</source> | </source> | ||
Line 12: | Line 14: | ||
{{param|value|The value of the opacity to set, ranging from 0 (completely transparent) to 100 (completely opaque).}} | {{param|value|The value of the opacity to set, ranging from 0 (completely transparent) to 100 (completely opaque).}} | ||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to retrieve the opacity, defaults to the [[Current Token]]. }} | {{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to retrieve the opacity, defaults to the [[Current Token]]. }} | ||
{{param|mapname|OPTIONAL: The name of the map to find the token. Defaults to the current map.}} | |||
|example= | |example= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: setTokenOpacity(50, "Dragon")] | [h: setTokenOpacity(50, "Dragon")] | ||
[h, token("Dragon"): setTokenOpacity(75)] | [h, token("Dragon"): setTokenOpacity(75)]</source> | ||
</source> | |changes={{change|1.5.4|Added {{code|mapname}} parameter option.}} | ||
}} | }} | ||
[[Category:VBL Function]] | [[Category:VBL Function]] |
Revision as of 03:45, 15 August 2019
setTokenOpacity() Function
• Introduced in version 1.4.2.0
sets the opacity value of the corresponding token.
Usage
setTokenOpacity(value)
setTokenOpacity(value, id)
setTokenOpacity(value, id, mapname)
Parameters
value
- The value of the opacity to set, ranging from 0 (completely transparent) to 100 (completely opaque).id
- OPTIONAL: The tokenid
of the token for which you want to retrieve the opacity, defaults to the Current Token.mapname
- OPTIONAL: The name of the map to find the token. Defaults to the current map.
Example
[h: setTokenOpacity(50, "Dragon")]
[h, token("Dragon"): setTokenOpacity(75)]
Version Changes
- 1.5.4 - Added
mapname
parameter option.