Hello! Currently trying to figure out how to create a follow system like a pet following behind me and then patrol around a set area around the player when I have stopped moving. I have most of it completed but I’m still new to behavior trees and AI. I currently have my AI spawn in wandering, On spotting the player it will begin to follow the player and chase said player.
How would I go about stopping the Chase player sequence and initiate my Patrol around player sequence?, currently it just endlessly chases said player.
What I have tried so far with no avail or done incorrectly, still a noob so please be nice or not.
First I tried creating a tick event in my ai controller so that when my players speed reached above 10 or below to start patroling around my character, I figured this would override the previous sequence.
Second I tried making a collision box on my character but couldnt figure out how to get the collision box trigger event to cancel following mechanic.
third I tried setting up a bool to see if my AI’s speed was below the max speed and above stop to see if that would trigger the sequence change.
I also tried swapping them all around inside of Behaviour tree to maybe trick the priorities but that just broke it.
I understand that most of what I done probably isnt the best way it could be done but I really enjoy the learning process behind all of this and I havent really found a guide or video that has been able to break down this feature in the way I had intended
I would like to complete this with AI due to the future of my project doing it all in the Actors just got messy fast.
I have provided pictures and a gif showing my current work and how I completed it.
if you are willing to complete this or solve it for me please try to show your work so I can learn but thats not what I am asking for I just would like to understand where I mainly Messed up so I have a point on where I can start learning on how to fix as all of my solutions seem to have been invalid.
If you need any more pictures or information please feel free to ask Thank you for your time!
https://imgur.com/a/IhGM0si
https://imgur.com/gallery/gEiE5x9
https://imgur.com/gallery/scPhjEO