It’s probably partially my newness to BTs from FSMs, but I’m having trouble setting up dying and dead “states” to my AI’s behavior tree. When the AI’s health reaches 0, I want to play a dying animation. After the animation’s played, I want the enemy to fade out and delete himself (and the AI controller, weapon, pawn etc…). I could hack this together in the AI controller, but I’m really giving behavior trees a chance. My gut tells me that I should be using behavior trees for this. I appreciate any tips, or examples. I currently set a Blackboard Key ‘Dead = True’ in the AI controller when health <= 0, then “listen” for that Dead key in the BT.
Here’s my behavior tree currently, I’m sure I’m doing it wrong. All of it works fine except for the Dying part.