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 respawn
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.
UGameplayStatics::GetGameMode. Cast to your custom GameMode class.
Get Game ModeUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPure node. Cast result to your GameMode subclass to access custom properties.
GetGameModeUE 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 agoLegacy Cascade system. Prefer Niagara (SpawnSystemAtLocation) for new projects.
SpawnEmitterAtLocationUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: Variables RegenRate(float)=5.0, RegenDelay(float)=3.0, RegenTimerHandle. On damage received: ClearTimer(RegenTimerHandle) → SET timer(RegenDelay, RegenTick, looping=true). RegenTick function: Branch(Health < MaxHealth) → True: SET Health = FClamp(Health + RegenRate*DeltaSeconds, 0, MaxHealth). False: ClearTimer.