API ReferenceGE Extensionsflowgraphnodesvehiclespecial
Custom vlua - deprecated
- **Node Name:** `Custom vlua - deprecated`
Overview
- Node Name:
Custom vlua - deprecated - Category:
repeat_p_duration - File:
extensions/flowgraph/nodes/vehicle/special/customVlua_string.lua
Obsolete - replaced by the Custom Vehicle Lua node (customVlua.lua). Sends a custom Lua string to a vehicle's Lua environment. Only works when a vehicle ID is explicitly provided.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
customLUA | string | The Lua code string to execute. Note: cannot start directly with a number |
vehId | number | ID of the vehicle to apply Lua code to |
Legacy Pin Mapping
in.vehID→vehId
Internals
Key Methods
| Method | Description |
|---|---|
init() | Attempts to set data.func from pin value (likely a leftover) |
work() | Resolves vehicle by ID and sends the Lua command |
How It Works
- On each tick, resolves the vehicle by
vehIdusingscenetree.findObjectById(). - Unlike the newer
Custom Vehicle Luanode, this only works whenvehIdis explicitly provided - there is no player vehicle fallback. - If the vehicle is found, sends
customLUAstring viaveh:queueLuaCommand(). - If no vehicle is found, returns early without doing anything.
Migration
This node is marked obsolete. Use Custom Vehicle Lua (customVlua.lua) instead, which:
- Supports player vehicle fallback
- Has proper legacy pin migration
- Outputs vehicle ID
- Has cleaner serialization
Usage Example
-- Deprecated - use Custom Vehicle Lua instead.
-- Old flowgraph:
-- [String: "electrics.setLightsState({hazard_enabled = 1})"] → [Custom vlua].customLUA
-- [Vehicle ID] → [Custom vlua].vehId
-- New equivalent:
-- [String: same] → [Custom Vehicle Lua].func
-- [Vehicle ID] → [Custom Vehicle Lua].vehIdKey Dependencies
veh:queueLuaCommand(luaString)- sends arbitrary Lua to the vehicle environmentscenetree.findObjectById()- resolves vehicle by ID
Previously Undocumented (Added by Audit)
- Input Pin:
customLUAString(any)
See Also
- Get Custom Vehicle Value (Flowgraph Node) - Related reference
- Custom Vehicle Lua (Flowgraph Node) - Related reference
- Vehicle Action (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide