Scene Events in Unreal Editor for Fortnite
Scene events provide a way to send signals up or down the scene graph. They are all about decoupling parts of the scene graph from each other, allowing them to communicate through messages instead of directly binding to each other.
You define a custom event, send it from an entity, and any component along the way responds by overriding OnReceive.
SendDownsends the event from an entity downward through its children, grandchildren, and so on (depth-first).SendUpsends the event upward through its parent, grandparent, and so on toward the root.
Multiple components can respond to a scene event. Every component in an entity’s hierarchy gets its OnReceive called. A component can consume the event (return true) to stop propagation, or pass through (return false) to let it keep traveling.
The three things you need:
- A custom event: A class that inherits from
scene_event. - A responding component: Overrides
OnReceive, casts the event, and reacts. - A send call:
Entity.SendDown(Event)orEntity.SendUp(Event).
Scene events can be reused across your projects, you can expand upon scene events by adding additional events or tweaking the behavior of entities and components in a chain of events to do something slightly different.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.