Simple AI movement not working

Hi

Following on from my last question/topic, which is related to a course I’m following to make a retro/Doom-clone shooter, I’ve stumbled on another issue and I don’t know what the problem is. Again - I’m new to Blueprints, so go easy on me. :sweat_smile:

I’m currently going through the process of setting up a simple AI movement for the enemies. The enemy is just a simple cube at the moment. As far as I’m aware, I’ve followed things correctly, but the cube doesn’t move on Play.

This is what I have so far:

  • A base enemy

  • An enemy controller

  • A Behaviour Tree

  • A Task

  • A Blackboard

I’ve also set up a NavMeshBoundsVolume, scaled it, the area it can move is green, and I had to move the enemy up so there’s no white area underneath. But no matter what I do, it just doesn’t move. I’ve also tried scaling the cube so it fits into the confines of the Capsule Collision. The Behaviour Tree has been assigned to the enemy and the Enemy Controller Class has been assigned to it.

Any ideas what the issue might be? Thanks.

You can open up the behavior tree window and put it aside when playing,see where it gets stuck.

If the behavior tree didn’t run at all. go into the AI character BP,in details panel search for “auto”,there will be an option called something like “place in the world”,set it to“place in the world or spawned” .

I’m not seeing anything run to be honest. When I play the game, the Blueprints always have an orange border around them, but I never see any indication that the nodes are firing. And that goes for the ones currently working, such as firing a weapon.

I’m not sure where that option is. Do you mean the Base Enemy or the Enemy Controller? I’ve loaded up each one and typed in ‘auto’ in the Details panel, but I don’t see anything you describe.

It’s in the enemy base class.
You must select the most top component to search it(sorry I forgot to mention this step).

1 Like

Ahh, okay. Awesome. Found it. I’ve set it to Placed in World or Spawned. No change though. :sweat_smile:

I did look into how to see the nodes firing during runtime, however there appears to be nothing in the drop-down list to debug. The only option is ‘no debug object selected’; even if I select the Base Enemy Blueprint in the scene. :thinking:

EDIT: Okay, there is an enemy to debug, but only in the Base Enemy and Enemy Controller. Nothing shows up for the Move_Randomly_Task Class or the Behaviour Tree.

1 Like

You can put a print string after the run behavior tree node,to print the output Boolean(in AI controller )

1 Like

Yeah, nothing gets printed to screen.

Ahhhh. I think I see the problem. I’ve just gone back to the video of the creation of the Enemy Controller. Looks like I added an Event On Unpossess instead of Event On Possess. :rofl:

1 Like

:joy:

Bingo. It’s working now. No string has been printed to screen though, oddly. Thanks for trying to help. :smile:

It is now. Hadn’t hooked up the Return Value. :sweat_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.