Runes of Magic Wiki
Advertisement

Verifies if a given unit is dead or waiting for resurrection.

UnitIsDeadOrGhost(UnitId)

Parameters[ | ]

Arguments[ | ]

UnitId
string - A valid UnitId.

Returns[ | ]

boolean
Boolean - true or false or nil if the argument is not a valid UnitId.

Example[ | ]

if ( UnitIsDeadOrGhost("target") == true ) then
    SendChatMessage("haha!", "SAY");
end

Notes[ | ]

  • If you write an event handler for the UNIT_HEALTH event, this function sometimes does not correctly return true, even when the health is down to 0 and the unit is dead. To work around this, UnitHealth should be used.

Related Functions[ | ]

Advertisement