Pet Following System

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

If I have provided to little or too much info please any advice is appreciated thank you in advance!

I have come to the realization that I could probably use an enum on my player character to set the “states” and have the behavior tree trigger into each sequence off of the enum value. With that being said… I have no idea how to do this, does anyone have any material on working with Enums and Behavior trees, like would it be best to have 3 seperate behavior trees and to run those behavior trees off the player class Ie. chase in one tree, wander in one tree, and also patrol the player in one tree? Also something I am struggling with is to find how to update a blackboard value outside of the AI controller IE. my player character, Is this possible?

I would not do this with an enum or any collision etc but just distance checks.

You’d have a selector node in your behavior tree and 2 AI states, “chase” and “roam” these states have blackboard decorators so they are only active when a blackboard variable has a certain value (eg. range above/below X). This way you can switch between states only by controlling this value.

Now this value can be set with different methods. Either you have a task that does the range check and sets the BB value, or you do this in an AI service (which basically implements a tick and sets BB values) or you do this from the pet blueprint itself.

Wether you want the chase to be complete or not can be controlled by the moment the range variable is set / checked. Blackboard decorators can abort other trees when the value switches so you have a lot of control this way.

Let me know if you need further help!