How to Set Hero Death

Users who are viewing this thread

Fahai Nolove

Recruit
Working on a mod that involves deterministic hero death. However, the hero NPCs are always set to wound after I used "Agent.Die()" on that hero at OnRegisterBlow().

Does anyone know where my code is overridden?
 

Fahai Nolove

Recruit
I enabled hero death in my game setting.

And by printing a whole bunch of info, I found out the decision of death/injury is actually made before OnRegisterBlow().

There is a method called GetAgentState(Agent affectorAgent, Agent agent, DamageTypes damageType) being called before OnRegisterBlow, which is deciding the death/injury of the knocked out agent. However, this method does not take damage value as a parameter, so the hero death could not be deterministic on dmg received.

Still trying to figure out which method calls the GetAgentState() method.
 
Top Bottom