Scene Graph Add Component
Student can write a custom component (portal_beacon_component) attached to the gate prefab that animates/glows when the player's badge unlocks that zone.
The moment your pirate steps up to the sealed cove gate, a hidden beacon flares to life and the stone grinds open — all driven by a custom component you wrote.
A component is a reusable blueprint of logic that lives directly on an entity, like attaching a glowing torch to a gate prop so it carries its own behavior wherever it goes.
We define our component class, then in our device's OnBegin, we grab the gate's entity and call Add to stamp our new logic right onto it.
Reach for custom components when you want props or prefabs to carry their own self-contained, reusable behaviors without cluttering your main game device.
portal_beacon_component := class(component):
OnBegin<override>()<suspends>:void =
Print("Beacon active!")
beacon_device := class(creative_device):
@editable
GateProp : creative_prop = creative_prop{}
OnBegin<override>()<suspends>:void =
if (Ent := GateProp.GetEntity[]):
Ent.Add(portal_beacon_component{})
Build your own lesson with scene_graph_add_component
Generate a personalized, compile-checked lesson grounded in this exact reference.
Build a lesson →