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 restart
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: custom trigger or UI button → [save player data to SaveSlot] → OpenLevel(LevelName='Level_02', bAbsolute=true, Options=''). For loading screen: SetGlobalTimeDilation(0.001) briefly while level loads (freeze world), or use AsyncLoadLevel with progress callback. Key: OpenLevel is in GameplayStatics. 'LevelName' is the map asset name (not full path). bAbsolute=true discards current level completely. Options string can pass params like '?GameMode=BP_GM'.
UGameplayStatics::SetGamePaused.
Set Game PausedUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoDoNUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoFires once on actor spawn (after construction). Use for setup that needs other actors in the world to exist.
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).
EventBeginPlayUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoQuitGameUE 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.
bAbsolute=true reloads from scratch. LevelName is the map asset name without path.
OpenLevelUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago