World Triggers
Categories:
The World Trigger system pairs a TriggerSensorComponent (condition side) with a WorldTriggerComponent (response side) to create event-driven world state changes. Each component owns an array of polymorphic type objects — sensor types define what conditions to evaluate, trigger types define what happens when the condition passes. Any combination of types can be composed on a single entity without scripting.
For usage guides and setup examples, see The Basics: GS_Interaction.
Contents
Architecture

Breakdown
World Triggers split conditions from responses using a polymorphic type/component pattern. The two container components sit on the entity; logic lives in the type objects they own.
| Part | What It Does |
|---|---|
| TriggerSensorComponent | Owns arrays of TriggerSensorType objects (andConditions, orConditions). Evaluates all conditions and fires WorldTriggerRequestBus::Trigger on success. Automatically activates a PhysicsTriggerComponent if any sensor type requires it. |
| WorldTriggerComponent | Owns an array of WorldTriggerType objects (triggerTypes). On Trigger(), calls Execute() on every type. On Reset(), calls OnReset(). On Activate(), calls OnComponentActivate() for startup initialization. |
No scripting is required for standard patterns. Compose sensor types and trigger types in the editor to cover the majority of interactive world objects.
E Indicates extensible classes and methods.
Patterns - Complete list of system patterns used in GS_Play.
Trigger Sensors
The sensory side. TriggerSensorComponent holds arrays of TriggerSensorType objects that define evaluation logic — collisions, interactions, record conditions. Supports AND conditions (all must pass) and OR conditions (any must pass).
World Triggers
The response side. WorldTriggerComponent holds an array of WorldTriggerType objects that execute when triggered — toggling entities, setting records, changing stages, logging messages.
Extension Guide
Use the ClassWizard templates to generate new sensor and trigger type classes — see GS_Interaction Templates:
TriggerSensorType— generates a newTriggerSensorTypesubclass withEvaluateAction(),EvaluateResetAction(), and lifecycle stubs.WorldTriggerType— generates a newWorldTriggerTypesubclass withExecute(),OnReset(), andOnComponentActivate()stubs.
Custom Sensor Types
- Create a class extending
TriggerSensorType. - Override
EvaluateAction()to define your condition logic. - Override
EvaluateResetAction()if your type supports reset evaluation. - Override
Activate(entityId)/Deactivate()for lifecycle setup. - If your type needs a physics trigger volume, return
truefromNeedsPhysicsTrigger(). - For event-driven types, listen on a bus and call
TriggerSensorRequestBus::DoAction()orDoResetAction()when the event fires. - Reflect the class manually in
GS_InteractionSystemComponent::Reflect().
Custom Trigger Types
- Create a class extending
WorldTriggerType. - Override
Execute(entityId)— implement the world state change here. - Override
OnReset(entityId)to reverse or re-arm the effect. - Override
OnComponentActivate(entityId)for any initial state that must be set at startup. - Reflect the class manually in
GS_InteractionSystemComponent::Reflect().
See Also
For component references:
For related resources:
Get GS_Interaction
GS_Interaction — Explore this gem on the product page and add it to your project.