API ReferenceGE Extensionsflowgraphnodesmission
Prepare Vehicle (Flowgraph Node)
- **Node Name:** `Prepare Vehicle`
Overview
- Node Name:
Prepare Vehicle - Category:
once_instant - File:
extensions/flowgraph/nodes/mission/prepareVehicle.lua - Color: Mission blue (
0.13, 0.3, 0.64, 0.75)
Automatically sets vehicle electrics and values appropriate for the gameplay environment. Runs once instantly.
Pin Schema
Input Pins
| Pin | Type | Hidden | Description |
|---|---|---|---|
vehId | number | yes | Vehicle ID to prepare; defaults to current player vehicle |
Output Pins
None.
Internals
- Delegates to
self.mgr.modules.mission:prepareVehicle(id). - Falls back to
be:getPlayerVehicleID(0)if novehIdis provided.
How It Works
- Resolves the target vehicle ID from the input pin or the current player vehicle.
- Calls the mission module's
prepareVehiclemethod, which configures electrics (lights, ignition, etc.) and other vehicle values for mission gameplay.
Lua Code Example
-- Place after vehicle spawn in a mission flowgraph:
-- spawnVehicle → prepareVehicle (vehId from spawn output)
-- Or without vehId to prepare the current player vehicle:
-- missionStart → prepareVehicleKey Dependencies
self.mgr.modules.mission-prepareVehicle()methodbe:getPlayerVehicleID(0)- fallback player vehicle ID
Additional Methods
C:workOnce()
Called once when the node is triggered (flow-once execution).
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