Page 1 of 1

on_entity_damaged - health of entity before damage was dealt

Posted: Tue Apr 21, 2020 6:54 am
by MewMew
It does not seem to be possible to get the health of an entity, before it was damaged.
Adding final_damage_amount to the entity.health is only accurate if it's health is > 0.

If the entity.health is 0 then there is no way to get the health it had before the damage happened.
The only way around seem to be big global tables, saving health values,
which will ignore stats like health regeneration or repaired entities.

The use for this would be to be able to give entities damage resistance,
in a less performance costly way, which values can be modified during the ongoing game.