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 multiplayer
Pattern for shooting in multiplayer: ON CLIENT: InputAction Shoot → ServerRPC_Shoot (Custom Event, Run On Server, Reliable). ServerRPC_Shoot (runs on SERVER): LineTraceByChannel → Branch(hit) → ApplyDamage → MulticastRPC_PlayEffect(ImpactPoint). MulticastRPC_PlayEffect (Custom Event, Multicast, Unreliable): SpawnNiagaraSystemAtLocation(NS_BulletImpact, ImpactPoint). Key rules: - Server RPC: Custom Event → Replicates='Run On Server', Reliable=true. - Multicast: Custom Event → Replicates='Multicast', Reliable=false (VFX can be dropped). - Client RPC: Custom Event → Replicates='Run On Owning Client'. - Never directly modify replicated vars on clients — always go through Server RPC.
Switch On HasAuthority: 'Authority' exec fires on server, 'Remote' fires on clients. Use to gate server-only logic like damage calculation, score updates, spawning.
HasAuthority_NetworkingUE 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.
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).
Defines the rules + default classes (Pawn, PlayerController, GameState) for a level. Only exists on the server.
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 agoECollisionEnabled values: NoCollision, QueryOnly, PhysicsOnly, QueryAndPhysics.
SetCollisionEnabledUE 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 agoAn RPC the server calls that runs on every connected client. Use for one-shot effects (explosions, sounds).