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.
20 results for despawn
In Character BP: OnDied (custom event) → SetActorHiddenInGame(true) → SetActorEnableCollision(false) → Disable input: GetController → DisableInput → Delay(Duration=3.0) → GetGameMode → CastTo<BP_GameMode> → RestartPlayer(GetController) → SetActorHiddenInGame(false) → SetActorEnableCollision(true) → EnableInput. In GameMode RestartPlayer: Gets nearest PlayerStart → SetActorLocation to PlayerStart → calls OnPossess. OR manual: GetAllActorsOfClass(PlayerStart) → Random select → SetActorLocationAndRotation(PlayerStart.Location, PlayerStart.Rotation).
Pattern: 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.
Call on GameMode. The controller's StartSpot or nearest PlayerStart is used.
RestartPlayerUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: 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.
Pattern: custom OnDeath event → GetCharacterMovement → DisableMovement() → GetMesh → SetSimulatePhysics(bSimulate=true) → SetCollisionEnabled(NoCollision) on CapsuleComponent. Key: SetSimulatePhysics is called on the MESH component (SkeletalMeshComponent), NOT on the actor or CharacterMovementComponent. Also set collision profile: SetCollisionProfileName('Ragdoll') on the mesh.
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.
Fires when the actor is destroyed or the level ends. Use for cleanup.
Legacy Cascade system. Prefer Niagara (SpawnSystemAtLocation) for new projects.
SpawnEmitterAtLocationUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago