Wikia

WoWWiki

Watchlist Recent changes

API UnitHealth

Main Menue



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") )

Pages on WoWWiki

94,193pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,622photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki