API ReferenceGE Extensionsflowgraphnodesmission
Set Stage Lights (Flowgraph Node)
- **Node Name:** `Set Stage Lights`
Overview
- Node Name:
Set Stage Lights - Category:
repeat_instant - File:
extensions/flowgraph/nodes/mission/stageLightsDragRace.lua - Icon: AI icon
- Color: AI color
Activates or deactivates the Pre-Stage and Stage lights on the drag-race Christmas tree. Controls individual lane sides (left/right) independently. Used alongside lightsController for the full countdown sequence.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
flow | flow | - | Inflow |
reset | flow (impulse) | - | Resets and hides all stage lights |
side | string | "l" | Lane side to update: "l" (left) or "r" (right) |
light | string | "preStage" | Which light to turn on: "preStage" or "stage" |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Outflow |
Internals
self.lights.stageLights- table of four scene objects:prestageLightL,prestageLightR,stageLightL,stageLightR.postInit()sets up hard templates for thesideandlightpins (dropdown values in the editor).initLights()resolves scene-tree objects by name.
How It Works
- Reset - When
resetfires, callsinitLights()to resolve scene objects, then hides all four stage lights. - Normal operation - Based on the
sideandlightinput values, unhides the corresponding light object:side="l"+light="preStage"→ showprestageLightLside="l"+light="stage"→ showstageLightLside="r"+light="preStage"→ showprestageLightRside="r"+light="stage"→ showstageLightR
Lua Code Example
-- In a drag race flowgraph:
-- vehicle enters pre-stage zone → stageLightsDragRace (side="l", light="preStage")
-- vehicle enters stage zone → stageLightsDragRace (side="l", light="stage")
-- Both lanes staged → lightsController begins countdownKey Dependencies
scenetree.findObject(name)- requires named light objects:"Prestagelight_l","Prestagelight_r","Stagelight_l","Stagelight_r"
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:work()
Main work function called each frame/tick when the node is active.
See Also
- ARunForLife (Flowgraph Node) - Related reference
- Update Display Drag Race (Flowgraph Node) - Related reference
- Clear Lights Drag Race (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide