How to stop NPC AI from walking around when interacting with it (using Ai behaviour tree)

Hey!

Thanks for your reply! What you said actually made me realize I was a bit all over the place and not super clear.

so I started to strip down everything to figure out that I should actually focus first on the sequence selector condition. Because in essence that’s what it is. On one branch the ai walk, follow a path ect an on the other he stops.

I’ve tried to do it with boolean but I ended up having something working with that.

-First I set up a IsAiTalking blackboard key as Int.
-Then I use it as decorator with value is equal to 0 or not to select the branch.
-Then In my NPC blueprint I set the value to 0 on event Begin play and assign it to the IsAiTalking BB key.


On component overlap on the NPC trigger box I set the value to 1
And on endComponentOverlap I set it to 0 again. I wanted to set it on my interact key but when I have more than 1 line of dialogue I press this key many time so it didn’t work.

Its far from perfect, the NPC looks a bit weird stopping simply when you approach and not interact, but At least it works as a branch selector. and I can add from there with a proper Stop immediatly task ect

Is it something Okay-ish :s or is there a much cleaner way?

@Genova, I’ve checked the link in your signature, Looks like we have quite a few connections in common between you current and past jobs! Small world :slight_smile: Would you recommend any free or paying ressources I could dissect to learn a bit more on this topic? I know nothing beats time and practice but it’s always good to have pointers to know how to experiment