API ReferenceGE Extensionsflowgraphnodesscene
Sevensegment Display (Flowgraph Node)
- **Node Name:** `Sevensegment Display`
Overview
- Node Name:
Sevensegment Display - Category:
repeat_instant - File:
extensions/flowgraph/nodes/scene/sevensegmentDisplay.lua
Creates and manages a seven-segment display composed of TSStatic digit shapes in the 3D scene. Supports number, minutes, and hours display modes.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Standard inflow |
clear | flow (impulse) | Clears all display objects |
position | vec3 | Position of the display |
rotation | quat | Rotation of the display |
number | number | The number to display |
Output Pins
| Pin | Type | Description |
|---|---|---|
number | number | The currently displayed number |
Internals (data fields)
| Field | Default | Purpose |
|---|---|---|
data.mode | 'minutes' | Display mode: number, minutes, or hours |
data.scaling | 1 | Scale factor for digit shapes |
data.count | 5 | Number of digit slots |
data.decimals | 3 | Decimal point position |
data.decimalOffset | 1 | Offset for decimal dot |
data.spacing | 5 | Spacing between digits |
data.shapeFolder | "art/shapes/quarter_mile_display/display_" | Path prefix for digit meshes |
data.showLeadingZeroes | false | Whether to show leading zeroes |
Behavior
work()- Creates display objects on first run, then updates digit shapes when the number changes.createObjects()- Spawnsdata.countTSStatic objects for digits, plus decimal dots and colon separators for minutes mode.updateNumbers()- Extracts each digit from the number and swaps the TSStaticshapeNameto the corresponding digit mesh (e.g.,display_3.dae). Hides leading zeroes unless configured otherwise.clearObjects()- Deletes all spawned TSStatic objects.
How It Works
- On first frame,
createObjects()spawns digit TSStatic objects positioned along a line with configurable spacing. - For
minutesmode, colon dots are added between minute and second digits. - When the input number changes,
updateNumbers()decomposes it into individual digits and updates each TSStatic's shape file. - Uses
preApply()/postApply()to hot-swap shape meshes at runtime. - All objects are cleaned up on execution stop, mission end, or destroy.
Key Dependencies
createObject("TSStatic")- spawns digit mesh objectsart/shapes/quarter_mile_display/display_*.dae- digit shape assets (0-9, empty, period)
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:_executionStopped()
Called when graph execution stops. Used for cleanup.
C:init(mgr, ...)
Initializes the node, setting up pins and default properties.
Parameters:
mgr...
C:makeDot(offset, name)
Node method.
Parameters:
offsetname
C:onClientEndMission()
Cleanup callback when the mission/level ends.
See Also
- Collection Marker (Flowgraph Node) - Related reference
- Custom Lua Command (Flowgraph Node) - Related reference
- Get Object Field (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide