API ReferenceGE Extensionsflowgraphnodesui
Vehicle Selector (Flowgraph Node)
- **Node Name:** `Vehicle Selector`
Overview
- Node Name:
Vehicle Selector - Category:
singleActive - File:
extensions/flowgraph/nodes/ui/vehicleSelector.lua
Lets the player select from every vehicle in the game via the scenario-start UI. Outputs model, config, color, and dial time for the selected vehicle.
Note: Showing two of these at the same time will break everything.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow |
reset | flow | Resets the node |
clearVeh | flow | Clears the selected vehicle data |
title | string | Title text |
text | string/table | Subtext/description |
start | string | Start button text (hidden) |
exit | string | Exit button text; hidden if empty (hidden) |
selectionText | string | Selection button text (hidden) |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Fires when player presses start |
exit | flow | Fires when player presses exit |
ready | flow | Fires immediately after a vehicle is selected |
selected | flow (impulse, hidden) | Pulse after vehicle selection |
model | string | Selected vehicle model name |
config | string | Selected vehicle config path |
color | color/string | Selected vehicle color |
dial | number | Drag dial time from config (default 12) |
Internals
Key Methods
| Method | Description |
|---|---|
openDialogue() | Builds data and triggers ChangeState('scenario-start') |
closeDialogue() | Hides menu and returns to play state |
onVehicleSelected(vehData, fullData) | Called when player picks a vehicle |
onVehicleSelectedInitially(vehData, fullData) | Called on initial/default selection |
started() | Player pressed the start button |
exited() | Player pressed the exit button |
onScenarioUIReady(state) | Re-triggers scenario data when UI is ready |
work() | Manages state, outputs vehicle data, handles reset/clear |
How It Works
- When
flowis active and dialogue isn't open,openDialogue()builds a data table with intro type'selectableVehicle', title, description, and callback hooks. - Triggers
guihooks.trigger('ChangeState', {state = 'scenario-start', params = {data = data}}). - The UI calls back via
onVehicleSelected()when the player picks a vehicle, andstarted()/exited()for button actions. - While open, outputs
model,config,color(parsed from space-separated string), anddial(from config's "Drag Times" data). clearVehresets the stored vehicle data;resetfully resets the node.
Usage Example
-- Flowgraph:
-- [Vehicle Selector] → (flow) → [Spawn Vehicle with model/config]
-- → (exit) → [Return to menu]
-- → (ready) → [Preview vehicle]
-- The dialogue data sent to UI:
{
introType = 'selectableVehicle',
name = "Choose Your Car",
description = "Pick a vehicle for the race",
selectionText = "ui.quickrace.selectVehicle",
callObj = "core_flowgraphManager.getManagerGraphNode(...)",
vehicle = { model = "etk800", config = "default" },
}Key Dependencies
guihooks.trigger('ChangeState', {state = 'scenario-start', ...})- opens vehicle selector UIcore_flowgraphManager.getManagerGraphNode()- UI-to-node callbackscore_input_bindings- listed dependency
Previously Undocumented (Added by Audit)
C:buttonPushed(action)- Function handling buttonPushed logicC:getCmd(action)- Function handling getCmd logicC:attemptFillFullData()- Function handling attemptFillFullData logicC:onFilteredInputChanged(devName, action, value)- Function handling onFilteredInputChanged logic- Input Pin:
portraitImg(any)
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide