Hello, I’m wondering how I should handle death using gameplay ability system.
I have a health component that is using a set consisting of 2 fields - health and max health. I track whenever these two fields change, but I’m not sure what has to be responsible of triggering a death start state; I want to have two death related states – death start and death end: the former means that a character is playing its death animation, while the latter means that the animation has ended.
I thought about switching on death start state when new health value becomes non-positive, and will demand the client (the character that’s using the health component) keep track of the death animation, and tell the component whenever it terminates. However, this approach seems a little bit messed up since it requires different code to handle one thing.
Does anyone have any suggestion? Thanks for reading.