You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jérôme Leclercq edited this page Dec 8, 2020
·
3 revisions
Element event:Died
Description:
Called whenever this element died (after its health fell to zero).
Parameters:
self: Triggered entity.
attacker: The entity that caused the damage.
Remarks:
The HealthUpdate and Death events are always triggered before this event, in this order.
This is the last event that will be generated by this entity before its destruction (see the Destroyed event), reviving it is not possible at this point (use the Death event if you wish to revive an entity).
This event is only called for entities with life, use the Destroyed event to monitor other entities destruction.
The HealthUpdate => Death => Died event chain is only triggered if the entity death has been validated by the server. This means that if you resurrect the entity in the Death event server-side, only a HealthUpdate event will be generated client-side.
Example code:
entity:On("Died", function (self)
print("I'm dead")
end)