Hi,
I’m currently making enemies in my game and I would like to be able to pause and restart their behavior tree whenever I want.
My behavior tree is started in the beginplay of an AIController but I can’t find a way to get the references of it.
I tried :
“Stop logic” by getting the brain component of my AIController
Adding a Behavior Tree component and start it ( problem → can’t acces to his blackboard and I have to be able to get the blackboard of my AI with his Actor controlled.
I don’t know, if there is any way to disable/enable my AIController or just pause my behavior tree ?
I would like to avoid putting a boolean in my tree that is checking if my Behavior should run or not ( beceause I feel like its gonna hurt the performance too much (beceause I have like maximum 30 AI running in the same time)).
Still not working, my brain component is valid but stopping the logic isn’t stopping his behavior tree…
I really feel that there is a really weird thing going on beceause all answers i’m getting tell me to the exact same thing but it just simply doesn’t work for me.
yes certainly, that doesn’t seem to be the problem.
Why use the begin play to activate the behavior?, although I don’t think it has anything to do with it
I did your setup with a new controller. For the purpose of the test I had to make a simple “Move To” task.
IT WORKED… but it doesn’t the way I wanted it to work. The reason why stopping the logic wasn’t stopping my AI to move is beceause the “Finish Execute AI” of another task was call only at the “Succes” after a “Move To” node.
Stopping the logic wasn’t stopping the “Move To” node from my task.
And now I wonder, is it possible to abort a task manually ?
I did plug the Finish Execute AI only in the Succes of a Move To node for optimization purposes, I don’t know if ending everytime my Move To isn’t gonna hurt the performances ?