getBar: Difference between revisions
Jump to navigation
Jump to search
(New page: ==Function getBar== Returns the number padded in if it is an integer, otherwise the number is rounded down to the nearest smaller integer and that value is returned. ===Usage=== <source l...) |
No edit summary |
||
Line 1: | Line 1: | ||
==Function getBar== | ==Function getBar== | ||
Gets the value of the specified [[Token:bar|bar]] for the token. The value returned is between 0 and 1 for 0% to 100% respectively. | |||
===Usage=== | ===Usage=== | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: | [h: pct = getBar(name)] | ||
</source> | </source> | ||
===Examples=== | ===Examples=== | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[r: | [r: healthPct = getBar("health") * 100] | ||
</source> | </source> | ||
Revision as of 13:35, 1 December 2008
Function getBar
Gets the value of the specified bar for the token. The value returned is between 0 and 1 for 0% to 100% respectively.
Usage
[h: pct = getBar(name)]
Examples
[r: healthPct = getBar("health") * 100]