WoW:API UnitHealthMax: Difference between revisions
Jump to navigation
Jump to search
UnitHealthMax -Documentation by danboo-
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<center>'''UnitHealthMax''' ''-Documentation by [[User:Danboo|danboo]]-''</center> | <center>'''UnitHealthMax''' ''-Documentation by [[User:Danboo|danboo]]-''</center> | ||
Returns the | Returns the maximal health of the specified unit, in percentage, for: | ||
*target | |||
*mouseover | |||
Otherwise in points. | |||
local max_health = UnitHealthMax(unit); | local max_health = UnitHealthMax(unit); | ||
| Line 21: | Line 26: | ||
;''Example'' | ;''Example'' | ||
local max_health = UnitHealth("player"); | local max_health = UnitHealth("player"); | ||
local max_health2 = UnitHealth("target"); | |||
ChatFrame1:AddMessage('player max health: ' .. max_health); | ChatFrame1:AddMessage('player max health: ' .. max_health); | ||
ChatFrame1:AddMessage('target max health: ' .. max_health2 .. "%"); | |||
;''Result'' | ;''Result'' | ||
Prints the player's maximum health to the chat frame as 'player max health: 100' | Prints the player's maximum health to the chat frame as | ||
'player max health: 900' and 'taget max health: 100%' | |||
---- | ---- | ||
;''Description'' | ;''Description'' | ||
: Returns the | : Returns the maximal health of the specified unit, in percentage, for: | ||
*target | |||
*mouseover | |||
Otherwise in points. | |||
---- | ---- | ||
{{Template:WoW API}} | {{Template:WoW API}} | ||
Revision as of 17:58, 7 December 2004
Returns the maximal health of the specified unit, in percentage, for:
- target
- mouseover
Otherwise in points.
local max_health = UnitHealthMax(unit);
- Arguments
- (String unit)
- arg1
- the unit's max health to query
- Returns
- max_health
- max_health
- the maximum health of the specified unit
- Example
local max_health = UnitHealth("player");
local max_health2 = UnitHealth("target");
ChatFrame1:AddMessage('player max health: ' .. max_health);
ChatFrame1:AddMessage('target max health: ' .. max_health2 .. "%");
- Result
Prints the player's maximum health to the chat frame as 'player max health: 900' and 'taget max health: 100%'
- Description
- Returns the maximal health of the specified unit, in percentage, for:
- target
- mouseover
Otherwise in points.