WoW:API UnitHealth: Difference between revisions

127 bytes removed ,  26 September 2007
({{wowapi}}, update formatting, reword text)
Line 11: Line 11:


==Example==
==Example==
  ChatFrame1:AddMessage('Player health: ' .. UnitHealth("player") .. " HP");
  UnitHealth("target"); -- Note: we're assuming the target isn't a friendly player/pet in our group.
ChatFrame1:AddMessage('Target health: ' .. UnitHealth("target") .. "%"); -- Note: we're assuming the target isn't a friendly player/pet in our group.


===Result===
===Result===
Prints the player's and target's health to the chat frame.
Prints the player's and target's health to the chat frame.