Hi,
How would I check to see what the damage type was that killed a unit?
I.E. I shoot the biter with a gun, it's "Physical"
Laser turret - "Laser".
etc.
Thanks.
Check to see what damage "type" killed a unit
Re: Check to see what damage "type" killed a unit
Hmm,
So "on_entity_damaged" has damage type, but "on_entity_died" does not.
I assume if there is a "final_damage_amount" with "on_entity_damaged", then it means the unit was killed by that?
So "on_entity_damaged" has damage type, but "on_entity_died" does not.
I assume if there is a "final_damage_amount" with "on_entity_damaged", then it means the unit was killed by that?
Re: Check to see what damage "type" killed a unit
I don't know if it works, but here can be one hack:
if before the on_entity_died of entity you get on_entity_damaged event,
then you can save this parameters to global and use it by the on_entity_died event
else remove it from the global.
if before the on_entity_died of entity you get on_entity_damaged event,
then you can save this parameters to global and use it by the on_entity_died event
else remove it from the global.
