API ReferenceGE Extensionsflowgraphnodesvehicle
On Vehicle Reset
- **Node Name:** `On Vehicle Reset`
Overview
- Node Name:
On Vehicle Reset - Category:
logic - File:
extensions/flowgraph/nodes/vehicle/onVehicleReset.lua
Detects when a vehicle is reset (repaired/respawned). Can optionally filter to a specific vehicle ID. Fires an impulse with the reset vehicle's ID.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Inflow for this node |
vehId | number | If set, only triggers for this specific vehicle |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow (impulse) | Fires once when a vehicle is reset |
vehId | number (hidden) | ID of the vehicle that was reset |
Legacy Pin Mapping
in.vehicleID→vehIdout.vehicleID→vehId
Internals
Key Methods
| Method | Description |
|---|---|
init() | Empty initialization |
_executionStarted() | Resets flag and info table |
onVehicleResetted(id) | Hook - stores vehicle ID if it matches the filter (or no filter set) |
work() | If flag is set, outputs vehicle ID and fires impulse flow, then clears flag |
_afterTrigger() | Clears the flag for single-frame impulse |
How It Works
- The node listens to the
onVehicleResettedhook. - When a vehicle is reset, it checks whether an input
vehIdfilter is set.- If a filter is set, only triggers when the reset vehicle matches.
- If no filter, triggers for any vehicle reset.
- On the next
work()tick, outputs the vehicle ID and fires the flow impulse. - The flag is cleared in both
work()and_afterTrigger().
Usage Example
-- In a flowgraph - detect when the player resets their car:
-- [Get Player Vehicle] → (vehId) → [On Vehicle Reset].vehId
-- [On Vehicle Reset] → (flow) → [Penalty / Timer Reset / etc.]
-- The engine hook signature:
-- onVehicleResetted(vehicleId)Key Dependencies
onVehicleResettedengine hook - fires when a vehicle is reset (note the double-t spelling)
See Also
- Align for Coupling (Flowgraph Node) - Related reference
- Apply Velocity to Vehicle (Flowgraph Node) - Related reference
- Boost Vehicle (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide