FANDOM


Get the health change of a unit during the current tick (one tick is 2 seconds).

UnitChangeHealth("unit")

Parameter Edit

unit
String - the UnitID (e.g. "target", "party1", "raid1", etc..)

Returns Edit

health
Integer - points of resored healthpoints since last tick, i.e. "12".

Example Edit

Print your health to the Say channel from within your addon-xml-file.

<Scripts>
  <OnLoad>
    this:RegisterEvent("UNIT_HEALTH");
  </OnLoad>
  <OnEvent>
    if (event == "UNIT_HEALTH") then
      SendChatMessage("My health changed by " .. UnitChangeHealth("player") ..  " points.","SAY");
    end
  </OnEvent>
</Scripts>

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.