#Checking if hero is unkillable

1 messages · Page 1 of 1 (latest)

plucky dagger
#

I created a passive ability which kills enemy hero if he is under certain hp percent threshold (like AA ult) - but if the target is affected by shallow grave, troll ult or WK aghs for example - the game crashes. How do I check for that? Or do I have to check manually with .HasModifier()? I'm using CDOTA_BaseNPC.Kill()

jolly dew
#

Kill and MODIFIER_PROPERTY_MIN_HEALTH will not crush, may your other functions problem.

#

For a example, you try Kill in OnTakeDamage like AA ult does, but Kill will deal damage and loop call the OnTakeDamage, then game crush.

#

I met this problem before, Kill will deal damage with DAMAGE_TYPE_NONE, to avoid loop call, ignore this type in OnTakeDamage

plucky dagger
#

yea thats exactly what happened