Behavior tree doesn't branch according to blackboard condition

Hello! I;m trying to make a simple AI which roams and patrol the area until it spots the player, and then chase the player and stop chasing it if the player menages to avoid he’s sight, problem is it keeps roaming or patrolling after the player crossed its sight till the goal it’s currently going to, and only after that start to chase the player, and never stops! it’s like the behavior tree just not changing the states according to the logic.
i could really need some expert opinion on that one, but if anybody have any idea why it goes like this i would be much obliged.

As you can see in the picture, even thou CanSeePlayer bool is false on Blackboard the behavior tree still goes to the true branch.
I’ve also included a picture of how i set CanSeePlayer on my AI Controller BP.

i may not be 100% right here but for your issue where the ai keeps chasing the player it looks like your condition is not is bool true its is the value set. so if its true or false its still set to a value.

as for your other issue where the ai proceeds to its patrol point prior to chasing the player, i imagine that could be solved with the abort options. if i recall correctly you can select a decorator and there should be a option something like abort lower priority. that should be the option needed though its been awhile since ive done ai stuff.

I had to look at one of my own BT for this but I think your issue might be you don’t use the decorator to “do” anything. It just checks the bool and continues on because the sequence is still valid (ie. it is hasn’t failed to “move”). You need to set the decorator condition to “abort self” or “abort lower priority” or something. A sequence will self-abort if it fails but since your AI is always able to “move” it will keep moving and gets stuck at that spot. Also if you ever want it to get to “Attack” you need to tell it that it succeeded when it reaches the player location following the “Move” task. Look at the screen shot below to see what I mean about the “abort” stuff, your decorators don’t have that information posted on them so I am guessing it is just being bypassed.

Those behavior tree naming conventions are weird, “Is Not Set” means the bool is false, “Is Set” means the bool is true. You could technically put a different type of variable in there but I am not sure it makes much sense. Like when an AI roams, you could have a thing for “roam point set” and when they reach it then it would become “not set” so as to get a new location but I am not sure how you would actually “invalidate” the vector, since once it gets initialized in the first roam movement it would always have a “value”. But I could also be wrong about that, I have just always used the decorators with bool variables. So in the roam case, there would be an additional bool variable that determines if the roam point was reached or not and then you would use the decorator and “is set” or “is not set” with the boolean.

yesss that was it!! i totally missed the Observer abort option! a thousand thanks my friend <3