Top Down Stealth Toolkit

Hi Dresyn, I think you won’t have to turn off the AI perception in this case since it only tells the AI about potential stimuli. How the AI responds to them is all handled within the Behavior Tree BT_PatrolGuardAI.

If you take a look at the extreme left of the tree, you’ll see the flow for AI Melee attacks. Since the Animation Starter Pack doesn’t have any melee animations, I’ve used a placeholder anim delay and attack player task here. Try replacing these with a Play Animation node.

I used the Sprint animation from ASP for testing. So in this scenario, what happens is that once the AI catches up to the player, it will execute the Sprint animation sequence. And if the animation completes, it attacks the player. If the player manages to run away, it’ll go back to chasing. Else, it’ll continue playing the sprint animation and attack again. Regarding the grappling, does it happen everytime the AI melee attacks? If not, it might require adding some extra checks in the tree to determine which animation has to be played.

Alternatively, you can remove the Attack task shown above and use an animation notify instead to tell the AI to damage the player when a certain part of the animation has been reached instead of waiting till the end.

Also, both of the above approaches will stop the patrolling behavior because its handled by the rightmost section of the tree which will execute only if there are no higher priority tasks (like chasing target or investigating an interest).

1 Like