API ReferenceGE Extensionsflowgraphnodesmission
Update Display Drag Race (Flowgraph Node)
- **Node Name:** `Update Display Drag Race`
Overview
- Node Name:
Update Display Drag Race - Category:
repeat_instant - File:
extensions/flowgraph/nodes/mission/UpdateDisplayDragRace.lua
Updates the physical digit displays (time and speed) for drag race missions. Swaps 3D display models to show numeric digits.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow for this node |
reset | flow (impulse) | Resets the display and re-initializes digit references |
time | number | Finish time of the player's vehicle |
velocity | number | Velocity of the player's vehicle (m/s) |
side | string | Which side to update: 'l' (left) or 'r' (right) |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Outflow for this node |
Internals
| Field | Purpose |
|---|---|
self.leftTimeDigits / self.rightTimeDigits | Arrays of 5 scene objects for time display |
self.leftSpeedDigits / self.rightSpeedDigits | Arrays of 5 scene objects for speed display |
How It Works
- Reset: Finds scene objects named
display_time_N_l/randdisplay_speed_N_l/r(N = 1–5) and stores references. - Display Update: Formats time to 3 decimal places and speed to 2 decimal places.
- Each digit is mapped to a 3D model:
art/shapes/quarter_mile_display/display_N.daewhere N is the digit (oremptyfor leading zeros). - Speed is converted from m/s to mph by multiplying by 2.237.
- The
sidepin selects which set of displays to update (left or right lane).
Lua Example
-- Scene objects must exist in the level:
-- display_time_1_l through display_time_5_l (left lane time)
-- display_speed_1_l through display_speed_5_l (left lane speed)
-- Same pattern with _r suffix for right lane
-- Time "9.123" → digits: "empty", "9", "1", "2", "3"
-- Speed "123.45" → digits: "1", "2", "3", "4", "5"Key Dependencies
scenetree.findObject()- locates display digit scene objects by name- 3D models at
art/shapes/quarter_mile_display/display_*.dae _flowgraph_createNode()- standard flowgraph node registration
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:insertDigits()
Node method.
C:postInit()
Called after initialization is complete for additional setup.
C:updateDisplay(side, finishTime, finishSpeed)
Node method.
Parameters:
sidefinishTimefinishSpeed
C:work()
Main work function called each frame/tick when the node is active.
See Also
- ARunForLife (Flowgraph Node) - Related reference
- Clear Lights Drag Race (Flowgraph Node) - Related reference
- Countdown Lights Controller (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide