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 multicast
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.
An RPC the server calls that runs on every connected client. Use for one-shot effects (explosions, sounds).
Custom Event → Replicates = 'Multicast'. When called on server, executes on server and all connected clients. Use for visual effects, sounds, animations that all players should see.
MulticastRPCUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoRemote Procedure Call — a function call sent across the network. Server / Client / Multicast versions exist.
1. DIRECT REFERENCE (tightest coupling): Get reference → CastTo<BP_Other> → call function. Use when: actor A always knows about actor B (e.g. Player → HUD). 2. CAST via GetAllActorsOfClass (loose): find → cast → call. Use when: you need to find actors dynamically. 3. EVENT DISPATCHER (loose): Owner calls dispatcher → listeners receive event. Use when: one actor notifies many others (e.g. death notification). 4. BLUEPRINT INTERFACE (loosest): Call interface message → any implementing actor responds. Use when: multiple different actor types should respond to same action (e.g. 'Interact'). 5. GAME INSTANCE (persistent): Store shared data in GameInstance → GetGameInstance → Cast. Use when: data must survive level loads.
Pattern: Actor A declares EventDispatcher OnScoreChanged(int NewScore). Actor B (listener) BeginPlay: GetActorOfClass(A) → BindEvent(OnScoreChanged) → custom event handler. Actor A calls OnScoreChanged.Broadcast(Score) when score changes. Bind in BeginPlay, Unbind in EndPlay to avoid dangling references.
MultiGateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPattern: PoolManager with Array<AActor*> AvailablePool. Init: loop SpawnActor N times → SetActorHiddenInGame(true) → SetActorEnableCollision(false) → Array_Add to pool. GetFromPool: Array_Length > 0 → remove last → SetHidden(false) → SetCollision(true) → SetActorLocation → return. ReturnToPool: SetHidden(true) → SetCollision(false) → Array_Add back.
Pattern: Input trigger → LineTraceSingle(CameraLocation, CameraLocation + ForwardVector * Distance, Visibility, false, MakeArray(Self), None) → Branch(ReturnValue) → True: BreakHitResult → HitActor → CastTo InteractableInterface → call Interact. End pin is world POSITION not direction. Use DrawDebugType ForOneFrame during dev.
Multi Line Trace By ChannelUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago