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.
22 results for GameMode
Pure node. Cast result to your GameMode subclass to access custom properties.
GetGameModeUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUGameplayStatics::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 agoDefines the rules + default classes (Pawn, PlayerController, GameState) for a level. Only exists on the server.
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).
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: 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.
Get Game StateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSetInputMode_GameAndUIUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago