m
Move page script moved page API UnitHealth to WoW:API UnitHealth without leaving a redirect
mNo edit summary |
m (Move page script moved page API UnitHealth to WoW:API UnitHealth without leaving a redirect) |
||
| (8 intermediate revisions by 8 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Returns the current health of the specified unit. | |||
Returns the current health of the specified unit | |||
local health = UnitHealth(unit); | local health = UnitHealth(unit); | ||
==Parameters== | |||
; | :;unit : [[UnitId]] - identifies the unit to query health for | ||
: | ==Returns== | ||
:;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) | |||
==Example== | |||
Print the target's health to the chat frame: | |||
DEFAULT_CHAT_FRAME:AddMessage( "target health ="..UnitHealth("target") ) | |||