setTokenOpacity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
'''Parameters''' | '''Parameters''' | ||
{{param|value|The value of the opacity to set, ranging from 0. | {{param|value|The value of the opacity to set, ranging from 0.0 (completely transparent) to 1.0 (completely opaque). This must be a floating point value with leading zero if less than 1.0.}} | ||
{{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.}} | {{param|mapname|OPTIONAL: The name of the map to find the token. Defaults to the current map.}} | ||
'''Returns''' | '''Returns''' | ||
The opacity value that was set. | The opacity value that was set. | ||
'''Note''' | '''Note''' | ||
If opacity is below about 20%, it becomes increasingly difficult to see the token. At 0%, it is completely invisible, even to the Gamemaster. If you can't find it, use the Map Explorer panel. | |||
|example= | |example= |
Revision as of 03:06, 19 September 2023
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.0 (completely transparent) to 1.0 (completely opaque). This must be a floating point value with leading zero if less than 1.0.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.
Returns The opacity value that was set.
Note If opacity is below about 20%, it becomes increasingly difficult to see the token. At 0%, it is completely invisible, even to the Gamemaster. If you can't find it, use the Map Explorer panel.
Example
[h: setTokenOpacity(0.5, "Dragon")]
[h, token("Dragon"): setTokenOpacity(0.75)]
Version Changes
- 1.5.4 - Added
mapname
parameter option.