API ReferenceGE Extensionsflowgraphnodesvehicle
Vehicle Ping
- **Node Name:** `Vehicle Ping`
Overview
- Node Name:
Vehicle Ping - Category:
once_f_duration - File:
extensions/flowgraph/nodes/vehicle/vehiclePing.lua
Pings a vehicle to ensure that previously sent instructions have been received before continuing. Useful as a synchronisation barrier in flowgraph sequences.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
vehId | number | ID of the vehicle to ping. Falls back to player vehicle. |
Internals
Key Methods
| Method | Description |
|---|---|
init() | Calls onNodeReset(). |
_executionStarted() | Calls onNodeReset(). |
onNodeReset() | Clears receivedInfo and sets duration state to 'inactive'. |
workOnce() | Sends a ping request to the vehicle via core_vehicleBridge.requestValue() and sets state to 'started'. |
work() | Checks if the ping response has been received; if so, sets state to 'finished'. |
Duration State Machine
inactive→started(onworkOnce, ping sent)started→finished(when callback fires with response)
How It Works
- On first execution, sends a
'ping'request to the vehicle viacore_vehicleBridge.requestValue(). - The callback sets
self.receivedInfo = truewhen the vehicle responds. - On subsequent frames,
work()checks for the response flag and transitions to'finished'when received. - This acts as a barrier - downstream nodes only execute after the vehicle has acknowledged the ping.
Usage Example
-- Flowgraph:
-- [Send Lua Command to Vehicle] → flow → [Vehicle Ping] → finished → [Read Result]
-- ↑ vehId ← [Vehicle ID]
-- The ping ensures the vehicle has processed all queued commands
-- before the flowgraph continues.
-- Equivalent GE Lua:
local veh = getPlayerVehicle(0)
core_vehicleBridge.requestValue(veh, function(val)
-- vehicle has responded, safe to proceed
end, 'ping')Key Dependencies
core_vehicleBridge.requestValue()- async vehicle communication bridge
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