Using latest version (2.28.1), I have trouble with playing my Death animation on my combatants. I use a custom script which is specified in my combatant's Animation settings, and I linked my animation function in the Base/Controls Animation settings by using a Custom Animation for the Death Animation Type. Then, in code, I use combatant.status.Death() to kill it (I also tried HasDied()). It used to trigger the animation, but it doesn't seem to work anymore.
Could this be a problem with the latest update?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Since I updated however, it seems that it does not call the OnDeath() function automatically anymore. The only way I was able to make it work is by adding a combatant.Status.DeathStateChanged callback on my combatant's game object, and then call OnDeath() on my custom animation component.
I wanted to know if anything changed in the code of the latest ORK Framework update that could have caused this change of behaviour, or if it has to be on my side.
Thanks!
This only happens if the combatant isn't dead yet, though - i.e. if IsDead is true, the death action (and thus playing the animation) isn't happening.
From which ORK version did you update to the latest version? E.g. updating from 2.28.0 didn't add any changes to that functionality.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Just to make sure that the Death action animation was set up properly, I tried a Combatant Animation step in a game event, in which I specified to play the Death animation type... And this worked perfectly. So, it proves that my custom animation system is hooked properly to ORK. When I use the combatant.Status.Death() function, it also properly updates the combatant component's basic information Is Dead to true and the callback combatant.Status.DeathStateChanged is also called properly, so it proves that the death state is set properly.
So, somehow, even though the animation system works and the Death state is updated, the Death action is not triggered. How could that be?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I guess I'll simply call the OnDeath() function on my own in the OnDeathStateChanged callback...