Need help with moveto?

So I have a very simple task that has been plaguing me for weeks now. I have to actors, the MixamoGoblin and the Player. All this is set up in a Third Person blueprint. The goblin is supposed to chase the player, and when not chasing the player, patrol around to find them. The code is set up 21db245ea1b9469662bb9e7f8738e5913ebd5283.jpeg

The goblin will chase the player ONCE. Only one time, and then the code refuses to run again. It refuses to patrol and I have no idea why. Can someone help me fix this code?

Pro Tip: You should look at the Behavior Tree documentation!!!

This not only shows you how to do the movement, but it also shows you how to do it properly. Why use behavior trees? Because the behaviors can be reused by other actors and it’s a LOT more efficient than creating behaviors and conditions manually in code or blueprints (as I discovered).

My biggest issue with using the documentation pages is that they don’t have any visuals aside from images. I learn best through video tutorials, which is what I tried to follow, before this happened.

Do you have a navMesh volume in your level?

Yes. Like I said before, the goblin will chase me once when I enter his vision. Then he just stops working. He continues to do his idle animation, but nothing else. I can do a quick recording of what happens if it would help.

Ok, well, every tick you are setting a new move to point. Try setting moving to true right before setting the AImoveTo…also, your radius is at 0 in the image.

fe7414e5e51a0e6d9df4ea2aacbdb64327723552.png This works. Try calling the random point on success with a custom event.

Thank you!

It took some fiddling (And by some, I mean a lot) But I did figure out what you meant. Also had to remove the objects in the area to make sure the enemy wouldn’t get stuck on them, but nonetheless, the goblin moves now!

You should make an AIController off the AIDetourController class and make that the controller, then they’ll walk around stuff. Just a tip :smiley: