API ReferenceGE Extensionsflowgraphnodesmission
Check Players Position / Go To Start Line (Flowgraph Node)
- **Node Name:** `Check Players Position`
Overview
- Node Name:
Check Players Position - Category:
repeat_instant - File:
extensions/flowgraph/nodes/mission/goToStartLine.lua
Detects whether the player's vehicle is aligned with the starting line for drag race missions. Outputs directional guidance (move forward/backward) or confirms alignment.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow for this node |
reset | flow (impulse) | Resets all outputs |
vehId | number | ID of the vehicle to check |
distance | number | Distance of the closest wheels' center to the start position |
velocity | number | Velocity of the vehicle |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Outflow for this node |
inLine | flow | Active when the vehicle is properly positioned |
outLineForward | flow | Active when the vehicle needs to move forward |
outLineBackward | flow | Active when the vehicle needs to move backward |
Legacy Pin Mapping
| Old Name | New Name |
|---|---|
vehicleID (in) | vehId |
How It Works
- On execution start, the node retrieves the vehicle reference from the vehicle module.
- Each frame, it evaluates the
distanceinput:- distance > 0.35: Vehicle is too far back →
outLineForward= true - distance < 0: Vehicle has crossed the line →
outLineBackward= true - 0 ≤ distance ≤ 0.35: Vehicle is aligned →
inLine= true
- distance > 0.35: Vehicle is too far back →
- Only one output is active at a time; the others are set to false.
- On reset, all outputs are cleared.
The commented-out code shows intended UI messages: "Move forward", "Move backward", or "Stop your vehicle now."
Lua Example
-- Flowgraph connection:
-- Distance sensor → distance pin
-- outLineForward → show "Move Forward" UI message
-- outLineBackward → show "Move Backward" UI message
-- inLine → proceed to countdown sequenceKey Dependencies
self.mgr.modules.vehicle- vehicle module for looking up vehicle reference_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: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