AI patrol blueprint

Hey everyone,

I am using the standard 3rd person character blueprint, and I would like it to follow some targetpoints.
To make the system flexible, I am trying to do the patrolling in the character Blueprint instead of the level blueprint.

I made some references to the targetpoints and use a simple move to location the get the character moving.
Sadly, this does not work in the character blueprint. When I do it in the level blueprint (exactly the same), it works perfectly.
It just won’t move! Am I missing something important?

Thank you in advance.

I am doing something similar and am also trying to set up the AI to be able to see and hear the player and then move to and attack. So far I have the AI moving to a random Target Point until it sees the player but it does not attack and I can’t figure out how to get it to hear the player, even though I have all that set up. With all that said, I hope that this will help you out some, I am using the AI character, AI controller (that I set up not the parent AI controller), behavior tree, and BTTasks.


The vairable GuardTarget is of type actor. You don’t need the other ones just yet.


Not sure if you have to do this in the controller but I was trying to get other things working with the behavior tree and there is more in my AI Controller that is not pictured. I suggest trying it without this one first and then add this if it doesn’t work after you do all the others.


You mainly want to focus on the Idle branch of this tree for what you are asking for.


This is the decorator for the first selector. This one tells the AI how far it is from the Target Points and the player. The tutorial that I followed on this was for the AI to stand guard and come at the player and chase him only a certain distance from his guard position.


This is the one you really want. This tells the AI to wander from each point. I am using the Target Point as the actor for the AI to go to in the game. This should make him pick a random point to go to. If you want him to follow a predetermined path then take out the Random Integer. Also, the variable WanderPointKey is of type Blackboard Key Selector.

Just so you know, I am not the greatest at programming so there may be much better ways to do this. I have pieced this together from several tutorials and just plugging away at it. That is how I hope to get the rest working also lol. Hope this helps, I know there is not much out there that is very clear to get people started with this new engine but a lot of it is just learning what you can and then testing out everything you can think of, you will break it most of the time but the reward is great when you figure it out.

I’ve recently worked on a university assignment and developed an AI that uses a timeline to follow a spline (using navmesh in the world to go around buildings)

It’ll follow the spline, go to the end, wait a bit then return along the spline back to it’s starting position.

It’s not the best blueprint. As I’m still working on my efficiency and I should have used a behaviour tree but I ended up running out of time to get the blueprint working smoother.
It also has the ability to detect players (and will walk towards their position) and a projectile called “rock” since that was something we gave the player which could distract the guard. (When the rock was thrown in the guards hearing radius the guard would walk over to it and check it out) the guard would also return to its original pathing once it finished checking out whatever distracted it.

Hope it helps!

download link: https://dl.dropboxusercontent.com/u/95557696/AI.zip

So today I have started working again, and somehow it seems to work now.
I have no idea how this could have happend. But thanks for the answers!