setBarVisible: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page SetBarVisible to setBarVisible: Converting page titles to lowercase) |
No edit summary |
||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setBarVisible(name, value) | setBarVisible(name, value) | ||
setBarVisible(name, value, id) | setBarVisible(name, value, id) | ||
setBarVisible(name, value, id, mapname) | setBarVisible(name, value, id, mapname) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 20: | Line 20: | ||
|examples= | |examples= | ||
Make "health" [[Token:bar|bar]] for the [[Current Token]] visible. | Make "health" [[Token:bar|bar]] for the [[Current Token]] visible. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setBarVisible("Health", 1)] | [h: setBarVisible("Health", 1)] | ||
</ | </syntaxhighlight> | ||
Hide "health" [[Token:bar|bar]] for the [[Current Token]]. | Hide "health" [[Token:bar|bar]] for the [[Current Token]]. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setBarVisible("Health", 0)] | [h: setBarVisible("Health", 0)] | ||
</ | </syntaxhighlight> | ||
|also= | |also= |
Revision as of 21:08, 14 March 2023
setBarVisible() Function
• Introduced in version 1.3b46
Sets if the specified bar for the Current Token is visible or not. If the value is non zero then the bar is visible, if it is 0 it is not visible.
Usage
setBarVisible(name, value)
setBarVisible(name, value, id)
setBarVisible(name, value, id, mapname)
Parameters
bar
- A string that contains the name of the bar that has its visibility set.value
- The visibility value of the bar, either 0 or 1.id
- The tokenid
of the token which has its bar visibility set, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
mapname
- The name of the map to find the token. Defaults to the current map.
Examples
Make "health" bar for the Current Token visible.
[h: setBarVisible("Health", 1)]
Hide "health" bar for the Current Token.
[h: setBarVisible("Health", 0)]
See Also
Version Changes
- 1.5.7 - Added
id
andmapname
parameter options.