AI won't move when spawned by game

Hi,

I’ve been using these videos to adapt a 3rd person character template into an AI that attacks the player, and wanders when it can’t see the player.

This all works fine when I place the AI into the map before running the game, But if I try to use blueprints to spawn them in while the game is running they don't do anything.

The AI are spawned in using the Waves blueprint (which is a game state class)

When looking at the debugging screen I can tell that the event tick runs as expected the first time, but once the AI is given a location to move to, it get’s stuck at the check for if the AI is currently moving.

From what I can see, the AI isn’t sensing the player at all

Can anyone see what I’ve done wrong?

I’m relatively new to game dev and UE so if I’ve missed any information, I’ll be happy to provide.

Thanks

Waves Class:


Third Person Event Tick:

On See Pawn Event:

Does anyone know what might be causing this problem?

I found the answer on a different question.

For anyone who might be experiencing the same issue. You need to set the AI to posess the actor when it is spawned in

You can do this under “Pawn” in the Class Settings in the blueprint

201762-solution.png

2 Likes

You are awesome to me right now. Thank you!

Thank you very much !

dooood, thankyou. been driving me mad

Thank you! This was a Huge help.