Please help - Behavior Tree Quick Start guide unable to get the enemy character to move in any way

Hello, I’m trying to get the Behavior Tree Quick Start setup, and I have an issue where the enemy character doesn’t move at all. This includes when it has line of sight on me and should chase me as well as when it is supposed to randomly patrol. In the behavior tree this appears as it skipping the chase player sequence entirely, and very briefly flashing through the patrol tasks before waiting the duration. It then rinses and repeats.

Worth noting, I did redo a good part of this because originally I was using my own custom enemy character. But when it wasn’t moving I figured I would use the 3rd person character like suggested in the guide just in case that was the reason. After switching a lot of it over, the not moving issue obviously still persisted. But, I say this just in case I didn’t switch something over properly when redoing the setup and maybe something is still referencing the old character. I checked thoroughly and couldn’t find it, but, worth pointing out. The current enemy is called “Hatman_Character” while the old one was just “Hatman”.

I ran a debug by using breakpoints and found that the chase player task never even triggers the initial “Event Receive Excutive A.I.”. When I step in front of it, however, the “Has Line of Sight” is triggered in the A.I. Controller.

On top of this, the enemy doesn’t move to new patrol locations. I ran some debugging on this and found that the Find Random Patrol Task runs all the way through the last couple of nodes.

Attached are some screenshots to help show what I am talking about.

Above is the behavior tree

Above is the blackboard

Above is the chase player blueprint

Above is the first part of the Enemy Controller Blueprint

Above is the second part of the Enemy Controller Blueprint

Above is the third part of the Enemy Controller Blueprint

Above is the first part of the random patrol

Above is the second part of the random patrol

Above is the navmesh

I am so lost and have spent countless hours on this, so if anyone has anything to offer, I’d greatly appreciate it! Thanks!

Were you able to resolve the issue?

Hey, I’ve got the same problem. What confuses me is that if the AI is the ENEMY, why in the Behavior Tree, would the AI (enemy) character be rotating to and chasing the EnemyActor?

Hello @Nitro_27 how are you?

I’ve been checking this case and I can’t find anything wrong with the scripts I see in your screenshots.

What I think could be happening is that the nodes “Rotate to Face BB Entry” and “Move To” in your “Chase Player” are not referencing the “EnemyActor” blackboard variable. I highly recommend you to eliminate the “SelfActor” variable from the blackboard if you are not using it, to avoid any conflict.

Other things that could be causing the problem are the default values for your “Has Line Of Sight” and “Enemy Actor” variables in your “Hatman_Controller”. Be sure their values are “HasLineOfSight” and “EnemyActor” respectively (no blank spaces), so they are the same as in your blackboard.

Hope this helps!

hey @OldGMan49 !

Hope my previous answer helps you as well!

In addition, the variable is called “EnemyActor” beacause the Player is the enemy of the BP_Enemy. But you could rename it as you like. I would use something like “PlayerCharacter”, but it wouldn’t work if you want two enemies to fight each other, for example…

I hope I’ve explained myself clearly hahaha