After creating the combatant, I connected it as follows.
enemyCombatant.Status.DeathStateChanged += DeathChanged_Enemy;
When that combatant dies, DeathChanged_Enemy method is fired twice.
(Should be run only once)
Unity console
#1.
ORKFramework.Combatants.CombatantStatus:set_DeathState(CombatantDeathState)
ORKFramework.Combatants.CombatantStatus:HasDied()
ORKFramework.DeathAction:ActionEndSetup()
ORKFramework.BaseAction:EventEnded()
#2.
ORKFramework.Combatants.CombatantStatus:set_DeathState(CombatantDeathState)
ORKFramework.Combatants.CombatantStatus:Death()
ORKFramework.Combatants.CombatantStatus:CheckDeath(Combatant)
As above, both paths seem to fire the event each.
I want to control death through scripting, is there a solution?
(Not the editor's death event)
When a combatant is killed, it'll first change to dying until the combatant's death event finished (which causes the dead state upon it's calculation).
You simply have to check the combatant's death state in your called function to react to the one you want.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
In fact, it seems to have been executed twice by writing it like
if (combatant.Status.IsDead) {
///
}
my mistake..