How to handle hit reactions?

jgifford

New member
Hello,

I am using Behavior Tree Pro and wondering what is the proper way to add a reaction to getting hit to a behavior tree? When the agent is hit by the player, it needs to stop whatever it is doing, play an animation, stop the NavMeshAgent, and some other small things. Then it needs to go back to chasing the player. I believe using an event is the correct way, but would that mean inserting the HasReceivedEvent conditional at every step of the tree?

Thanks in advance!

1745441921562.png
 
You can use conditional aborts with the event task. This documentation uses the original version of Behavior Designer but the concept is the same for how we handle it with the character controller:

 
Back
Top