FANDOM


WoW API < UnitHealth

Returns the current health of the specified unit.

local health = UnitHealth(unit);

ParametersEdit

unit 
UnitId - identifies the unit to query health for

ReturnsEdit

health 
Integer - current health of the specified unit, returns 0 if the specified unit does not exist (eg. "target" given but there is no target)

ExampleEdit

Print the target's health to the chat frame:

DEFAULT_CHAT_FRAME:AddMessage( "target health ="..UnitHealth("target") )

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.