Download

Actor does not perform action when spawned?

In the level blueprint I made a code so that after 5 seconds an NPC was spawned, it happens that it does nothing.

Only the NPC I added by the level editor acts correctly.

Image of what happens:

**Level Blueprint:

NPC Blueprint:**

I did a search, because I imagine that to solve this is to just modify the event to some of the type: When created or when spawned. Then I discovered that the problem is not in the event, because it is running.

Search:

I also thought of something like an event involving the collision between the NPC and the ground, but I considered it silly.

Link I found and at first I’m thinking that the solution may not be as simple as this:

https://answers.unrealengine.com/questions/204154/event-dispatcher-on-a-spawned-actor.html

**I added 2 impressions to see if the Event Begin Play was not even running:

The event is being started correctly and the loop is also:**

But the NPC does not go towards the target points and I do not know the reason.

Another link that can help:

https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1465941-til-psa-spawnactor-will-immediately-call-beginplay-even-before-continuing-with-following-nodes

Hi,
Look in the class default of your npc and search for “auto possess AI” then set it to “Placed in world or Spawned” and see if it can help. Normally by default it is set to “placed in world” so the controller doesn’t automatically possess it if it is spawned.

I’d also check to make sure your NavMesh covers the area. If the pawn is just outside the NavMesh it won’t move.

Your GetController node is using self, yet you’re looping through all those actors. Dunno if this blueprint is for the pawn or some manager blueprint, try plugging the actors from the loop into the GetController node.