Spawn Actor in Blueprint Event BeginPlay not working

I’m attempting to use Spawn Actor to create another actor (BipedBP, derived from Pawn), but the second actor doesn’t appear in the scene and I get error messages in the console saying it “is pending kill” when I try to set it’s controller. I verified the location is correct, and the Print String does appear. But the actor never appears in the scene, and is never visible in the World Outliner.

If I drag and drop the BipedBP into the scene via the editor it does work. Just not when spawned from an actor’s BP Event BeginPlay? It also doesn’t work in the Tick.

Blueprint Runtime Error: “Attempted to access BipedBP_C_0 via property CallFunc_FinishSpawningActor_ReturnValue, but BipedBP_C_0 is pending kill”. Blueprint: SnowboardBP Function: Execute Ubergraph Snowboard BP Graph: EventGraph Node: Spawn Default Controller

If I spawn a non-Pawn Actor it works fine. Does spawning a Pawn require any special steps so it doesn’t automatically deleted?

The Pawn’s C++ constructor is called, but not BeginPlay.

Sorted, but I’ll post just in case others run into the same issue… it was in the same space as another object (see console log below). Needed to change the Spawn Actor’s Collision Handling Override from Default to Always Spawn, Ignore Collisions.

Now it works!

LogPhysics: Warning: UWorld::FindTeleportSpot called with an actor that is intersecting geometry. Failed to find new location likely due to actor’s root component not being a collider component.
LogSpawn: Warning: SpawnActor failed because of collision at the spawn location [X=0.000 Y=0.000 Z=112.001] for [BipedBP_C]
LogScript: Warning: Attempted to access BipedBP_C_0 via property CallFunc_FinishSpawningActor_ReturnValue, but BipedBP_C_0 is pending kill
SnowboardBP_C /Game/Maps/UEDPIE_0_NewMap.NewMap:PersistentLevel.SnowboardBP_C_0
Function /Game/Blueprints/SnowboardBP.SnowboardBP_C:ExecuteUbergraph_SnowboardBP:00A1
PIE: Error: Blueprint Runtime Error: “Attempted to access BipedBP_C_0 via property CallFunc_FinishSpawningActor_ReturnValue, but BipedBP_C_0 is pending kill”. Blueprint: SnowboardBP Function: Execute Ubergraph Snowboard BP Graph: EventGraph Node: Spawn Default Controller

3 Likes

Saved me a lot of time. Thank you