API ReferenceGE Extensionsflowgraphnodesvehicle
Has Coupler Tag
- **Node Name:** `Has Coupler Tag`
Overview
- Node Name:
Has Coupler Tag - Category:
repeat_instant - File:
extensions/flowgraph/nodes/vehicle/hasCouplerTag.lua
Detects whether a vehicle has specific coupler tags (tow hitch, fifth wheel, gooseneck, pintle). Outputs a boolean for each supported coupler type.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
vehA | number | ID of the vehicle to check |
Output Pins
| Pin | Type | Description |
|---|---|---|
tow_hitch | bool | True if the vehicle has a tow hitch coupler |
fifthwheel | bool | True if the vehicle has a fifth wheel coupler |
gooseneck_hitch | bool | True if the vehicle has a gooseneck hitch coupler |
fifthwheel_v2 | bool | True if the vehicle has a fifth wheel v2 coupler |
pintle | bool | True if the vehicle has a pintle coupler |
Internals
Supported Coupler Tags
tow_hitch, fifthwheel, gooseneck_hitch, fifthwheel_v2, pintle
Key Methods
| Method | Description |
|---|---|
_executionStarted() | Initializes all coupler output pins to false |
work() | Gets the vehicle data from the flowgraph vehicle module and checks vehA.couplerTags[tag] for each tag |
How It Works
- On execution start, all output pins are set to
false. - Each frame, the node retrieves vehicle data via
self.mgr.modules.vehicle:getVehicle(vehId). - For each known coupler tag, it checks the vehicle's
couplerTagstable and outputstrueorfalse.
Usage Example
-- In a flowgraph:
-- [Has Coupler Tag] ← vehA ← [Vehicle ID]
-- → tow_hitch → [Branch: Can Tow]
-- → fifthwheel → [Branch: Can Haul Semi]
-- The couplerTags table on a vehicle module entry:
-- veh.couplerTags = { tow_hitch = true, fifthwheel = false, ... }Key Dependencies
self.mgr.modules.vehicle:getVehicle()- retrieves vehicle data including coupler tag information from the flowgraph vehicle module
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