How to Make Character Do the rest of The Tasks in Behavior Tree If one Failed?

Hey,
like if one task fail to play out, it will skip the failed task and do the others then repeat all of them again.
i have been getting that problem lately when the player interrupts the character then she just stops following the behavior Tree completely!
HELP! :grimacing:

Hey @CoreRageS!

So it looks like because the montage was interrupted, itā€™s not calling the ā€œOnAttackEndā€ which looks like how the event finishes. You could either make a new event to bind from the interrupted path, then go to the Reset on the DoOnce node, or you could run the ā€œOnInterruptedā€ Exec pin into the ā€œCallOnAttackEndā€ and I think that will do it, provided it works when it gets to complete the montage! :slight_smile:
image

Give that a shot and let us know how it goes!

1 Like

Thanks, for replying, imma try the run CallOnAttackEnd into the Anim montage ā€œOnInterruptedā€ first, cuz that would easier for me, be right back!

Hey, It works!
thanks again mate :pray:

Umm, here some updates,
So the first one works, but when i add another attack task and shoot at her when she is doing the taskā€¦ she just rotates, wonā€™t move or perform any of the tasks again, which that wasnā€™t supposed to happen.
am i gonna have to make another Event Dispatcher for each attack she makes? :face_with_head_bandage:
what do you think?

You shouldnā€™t have to make a new dispatcher for each, the one you have with that setup seems reusable. Are you using any animnotifyā€™s that you didnā€™t carry over from the other attack animation? That could be it.

But itā€™s a different problem, for sure. After the animation, it looks like she gets taken off of the Navmesh or her speed gets set to 0, because she does rotate a few times to try to get to the player or wander, but then canā€™t move afterwards. Which is different, because itā€™s not failing on that attack node of the BT, itā€™s having issues on the MoveTo nodes.

Do a double check on your animnotifyā€™s if youā€™re using any, and make sure nothing is setting her speed to 0. Then, if youā€™re using NavMesh, humor me and justā€¦ move it slightly in the world. I know, it seems weird but it fixes a lot of NavMesh issues because it redraws when the box is moved.

Give that a look over and let us know!

itā€™s is not the Anim Notify for sure, cuz i didnā€™t make one yetā€¦ for the others iā€™m not sureā€¦ but as soon as shoot her again after the first shot this happens:

what is the deal with all this BT bugs manā€¦

Hmm. Iā€™m wondering if it has anything to do with:

A: the weapon or
B: the Look Around BTT.

It seems that the AI lost sight of the player, or it was reset because it says ā€œNoneā€ on the ā€œAttackPlayerā€ variable. This is likely an issue in the perception on the AI_Controller. There may be a strange interaction between the AI_Controller and the weapon!

See what you can find!

okay!