I have my Ai running a behaviour tree including a patrol, chase player, search for and attack etc.
My Ai also uses the Ai Perception component.
When an NPC Ai kills my character I need to be able to tell that to the NPC and make it return to its patrol. At the moment when my player dies the NPC gets stuck on the attacking player branch for which has existing conditions to be met therefore I believe I need a service or similar on the branch that goes to attack my player checking to see if the player’s HP is 0 (or something).
Can anyone help?
Thanks in advance.