Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
26 results for spawn
Pattern: Trigger → SpawnActorFromClass(Class, MakeTransform(Location, Rotation, Scale), CollisionHandling, Owner) → ReturnValue → IsValid branch → use spawned actor. Always check IsValid on ReturnValue. For many spawns, spread across frames with timer to avoid hitches.
Why: Construction Script runs in the editor before the world is fully loaded. Spawning actors here is unsupported because the receiving world might not exist yet. Fix: Move the Spawn Actor node from Construction Script to Event BeginPlay. BeginPlay runs at runtime when the world is ready and other actors can be spawned safely.
Pattern: Variables CurrentWave(int)=0, EnemiesAlive(int)=0, EnemiesPerWave(Array<int>). StartWave: CurrentWave++ → SET EnemiesAlive=EnemiesPerWave[CurrentWave]. Timer looping: Branch(SpawnedThisWave < EnemiesPerWave[CurrentWave]) → SpawnActor(EnemyClass, RandomSpawnPoint) → SpawnedThisWave++. OnEnemyDeath: EnemiesAlive-- → Branch(EnemiesAlive <= 0) → StartNextWave or Victory.
Legacy Cascade system. Prefer Niagara (SpawnSystemAtLocation) for new projects.
SpawnEmitterAtLocationUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUGameplayStatics::SpawnEmitterAtLocation. For Niagara, use SpawnSystemAtLocation.
Spawn Emitter at LocationUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUNiagaraFunctionLibrary::SpawnSystemAtLocation. bAutoDestroy=true for fire-and-forget. Use SpawnSystemAttached to attach to a component.
SpawnSystemAtLocationUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoCast ReturnValue to the specific class to access its properties.
SpawnActorFromClassUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: On Health<=0 → DisableInput(PC) → PlayMontage(DeathAnim) → Delay(DeathAnimDuration) → GetActorOfClass(PlayerStart) → TeleportTo(SpawnPoint.Location, SpawnPoint.Rotation) → SET Health=MaxHealth → EnableInput(PC). For checkpoint: store last checkpoint location variable, update on overlap with checkpoint triggers.
Pattern: MakeTransform(Location=SpawnLocation, Rotation=SpawnRotation, Scale=(1,1,1)) → SpawnActorFromClass(Class=ActorClass, SpawnTransform=Transform) → CastTo<YourClass>(ReturnValue). SpawnActorFromClass inputs: 'ActorClass', 'SpawnTransform' (Transform), not separate Location/Rotation. Use MakeTransform node to build the Transform struct from Location+Rotation+Scale.
Pattern: InputAction Fire → GetMesh → GetSocketTransform(InSocketName='MuzzleSocket') → BreakTransform(outputs Location, Rotation) → MakeTransform(Location=SocketLocation, Rotation=SocketRotation) → SpawnActorFromClass(Class=BP_Projectile, SpawnTransform=Transform). Key: GetSocketTransform must be called on the SkeletalMeshComponent (GetMesh()), not the actor. Use 'World' TransformSpace. SpawnActorFromClass takes a full Transform, not separate Location/Rotation.