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.
25 results for persistent
UGameplayStatics::GetGameInstance. Persists across level loads.
Get Game InstanceUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSETUP: Create Blueprint inheriting UGameInstanceSubsystem (or UWorldSubsystem for level-scoped). Override Initialize(Collection) to set up. Override Deinitialize to clean up. Add game variables here (Score, PlayTime, Settings). ACCESS FROM ANYWHERE: GetGameInstance → GetSubsystem(BP_GameSubsystem) → CastTo<BP_GameSubsystem> → access variables. WHY: Subsystems auto-create, auto-destroy, and don't need FindActor. Better than GameInstance for well-organized systems. UGameInstanceSubsystem persists across levels. UWorldSubsystem is recreated each level.
Spawn Sound at LocationUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPure node. Ideal for storing data that persists across level loads.
GetGameInstanceUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoFlushPersistentDebugLinesUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoA child level streamed in/out of a persistent level. Used for open-world streaming and modular maps.
A class for persisting player progress to disk. Subclass USaveGame, add fields, then SaveGameToSlot / LoadGameFromSlot.
Pattern: BP_Checkpoint with BoxTrigger, variable CheckpointID(int). OnBeginOverlap(Player) → DoOnce → CreateSaveGameObject(MySaveGame) → SET PlayerLocation, Health, Inventory, CheckpointID → SaveGameToSlot('AutoSave', 0). On death/respawn: LoadGameFromSlot('AutoSave') → Cast → TeleportTo(SavedLocation) → restore Health etc. Show 'Checkpoint Reached' UI briefly.
Pattern: 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.
Dealing damage: Event → ApplyDamage(TargetActor, BaseDamage, InstigatorController, DamageCauser, DamageTypeClass). Receiving: EventAnyDamage → Damage output → Subtract_FloatFloat(CurrentHealth, Damage) → FClamp(Result, 0, MaxHealth) → SET CurrentHealth → Branch(CurrentHealth <= 0) → True: DestroyActor. Initialize CurrentHealth=MaxHealth in BeginPlay.