AI MoveTo sometimes working for one of my simple AI blueprints. Works fine for others

Created a very simple patrolling AI using blueprints. Here is the blueprints I used, I have made 3 copies of this exact blueprint, only changing the “Start” and “End” vector location variables.

But for some reason, this AI - number 1 out of 3, moves to the “Start” destination fine, follows the delay, then begins to move towards the “End” destination. But turns around pretty quickly and heads to the “start” destination again. Every so often it eventually makes it to the “end” destination, then goes back to failing to do so.

Any ideas on why only AI 1 is having this issue?

How are you setting the Start and End variable?

Moving the AI manually in the viewport to where I want the start/end point to be, entering the x-y-z values as the variables values.

Hey JDavison15,

Here’s what I’m thinking is happening:

You’re calling the event OnSeePawn. This means that if the AI gets this event triggered again, it will call Patrol a second time, making the character move back to the Start location. I don’t recommend calling your move function OnSeePawn, as this is definitely possible, and is something that I’ve done in tests projects in the past that caused similar results, so I learned that the hard way.

Again, that’s just what I’m thinking based on the explanation you’ve provided, but feel free to let me know if that’s not the case. I recommend printing a string before the AI Move To is called that way you can count exactly how many times it’s being called and see if there is an extra call in there somewhere.

Let me know if that helps.

Have a great day

Hey Sean, yeah you are right. I printed a string whenever the patrol event was being called, it was being called multiple times. Thanks for the help.