Enemies Attack Everytime Player Jumps

First time enemy AI creator and forum poster here! If this post needs more information or if I did something wrong, please let me know!

I am working with behavior trees for the first time. The enemies will automatically attack every time the player jumps. I assume that this is because they can’t find a way to attack the player, so they immediately go to the next task and attack.

If that isn’t the issue then I may have to look at the enemy’s EQS because I believe that is what tells the AI they can move places in the first place.

Is there any way for their behavior trees or EQS to ignore the player jumping?

EnemiesAttackingWhileJump


Disconnect the on fail from the finish execute, and possibly loop it back to run AI move to again


WithoutFail

Seems like after doing this the enemies will walk to the last reachable spot that the character jumped at and stop their behavior completely.

Because you need to pull off the “on fail” executeion pin, place a branch before the AI move to, pull on fail back to it, this will loop the behavior till it successfully reaches target, you could also call a separate finish execute node and attach it to on fail and uncheck “success”, depending on how your BTT is setup it could restart this behavior, noticed in your BT your calling clear focus every loop, this could be part of the problem

1 Like

Thanks for this! It seems to be working.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.