Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
No edit summary
 
No edit summary
Line 1: Line 1:
 
<center>'''UnitHealth''' ''-Documentation by [[User:Danboo|danboo]]-''</center>
 
<center>'''UnitHealth''' ''-Documentation by [[User:Danboo|danboo]]-''</center>
   
Returns the current health, in points, of the specified unit.
+
Returns the current health of the specified unit, in percentage, for:
  +
  +
*target
  +
*mouseover
  +
  +
Otherwise in points.
   
 
local health = UnitHealth(unit);
 
local health = UnitHealth(unit);
Line 29: Line 34:
 
;''Description''
 
;''Description''
   
: Returns the current health, in points, of the specified unit.
+
: Returns the current health of the specified unit, in percentage, for:
  +
  +
*target
  +
*mouseover
  +
  +
Otherwise in points.
   
 
----
 
----

Revision as of 17:50, 7 December 2004

UnitHealth -Documentation by danboo-

Returns the current health of the specified unit, in percentage, for:

  • target
  • mouseover

Otherwise in points.

local health = UnitHealth(unit);

Arguments
(String unit)
arg1
the unit's health to query

Returns
health
health
the current health of the specified unit

Example
local health = UnitHealth("player");
ChatFrame1:AddMessage('player health: ' .. health);
Result
Prints the player's health to the chat frame as 'player health: 90'.

Description
Returns the current health of the specified unit, in percentage, for:
  • target
  • mouseover

Otherwise in points.


Template:WoW API