API ReferenceGE Extensionsflowgraphnodesmission
Countdown Lights Controller (Flowgraph Node)
- **Node Name:** `Countdown Lights Controller`
Overview
- Node Name:
Countdown Lights Controller - Category:
repeat_instant - File:
extensions/flowgraph/nodes/mission/countdownLightsController.lua
Controls the countdown light tree for drag race missions. Supports both "Pro Tree" (all ambers at once) and "Sportsman Tree" (sequential ambers) modes, with jump start (disqualification) detection.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow for this node |
reset | flow (impulse) | Resets the countdown state and hides all lights |
proTree | bool | If true, uses pro tree (all ambers flash simultaneously). Default: true |
distance | number | Distance of the player's vehicle from the start line |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Outflow for this node |
disqualified | flow | Fires if the player jumped the start |
started | flow | Fires when the green light comes on (race begins) |
Internals
| Field | Purpose |
|---|---|
self.starttimer | Elapsed time since countdown began |
self.started | Whether the race has officially started |
self.jumpStarted | Whether the player moved before green |
self.timerOn | Whether the countdown timer is active |
How It Works
Pro Tree Mode
- At 2.0s: All 3 amber lights on both sides illuminate simultaneously.
- At 2.4s: Ambers turn off, green lights turn on → race started.
- Total countdown: ~2.4 seconds.
Sportsman Tree Mode
- At 1.0s: First amber lights on.
- At 1.5s: Second amber lights on (first off).
- At 2.0s: Third amber lights on (second off).
- At 2.5s: Green lights on → race started.
- Total countdown: ~2.5 seconds.
Jump Start Detection
- If
distance > 0.2before the green light, the player is disqualified. - Red lights illuminate on both sides, ambers and greens are hidden.
- The
disqualifiedoutput fires.
Key Dependencies
scenetree.findObject()- locatesAmberlight,Greenlight,Redlightscene objects_flowgraph_createNode()- standard flowgraph node registration
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:init()
Initializes the node, setting up pins and default properties.
C:initLights()
Node method.
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