API ReferenceGE Extensionsflowgraphnodesvehicle
Freeze Vehicle
- **Node Name:** `Freeze Vehicle`
Overview
- Node Name:
Freeze Vehicle - Category:
repeat_instant - File:
extensions/flowgraph/nodes/vehicle/freeze.lua
Freezes or unfreezes a vehicle in place. When frozen, the vehicle's physics are suspended and it cannot move. If no vehicle ID is provided, the current player vehicle is used.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
vehId | number | ID of the vehicle to freeze. Defaults to player vehicle |
freeze | bool | true to freeze, false to unfreeze |
Legacy Pins
| Old Name | New Name |
|---|---|
vehID | vehId |
Internals
Key Methods
| Method | Description |
|---|---|
work() | Resolves the vehicle and calls core_vehicleBridge.executeAction(veh, 'setFreeze', freezeValue) |
How It Works
- The node resolves the vehicle from
vehIdor defaults togetPlayerVehicle(0). - If a valid vehicle is found, it calls
core_vehicleBridge.executeAction(veh, 'setFreeze', bool). - This sends the freeze command to the vehicle's Lua controller, which suspends or resumes physics simulation.
Usage Example
-- In a flowgraph:
-- [Start] → [Freeze Vehicle (freeze=true)] ← vehId ← [Vehicle ID]
-- ... later ...
-- [Trigger] → [Freeze Vehicle (freeze=false)] ← vehId ← [Vehicle ID]
-- Programmatic equivalent:
local veh = getPlayerVehicle(0)
core_vehicleBridge.executeAction(veh, 'setFreeze', true) -- freeze
core_vehicleBridge.executeAction(veh, 'setFreeze', false) -- unfreezeKey Dependencies
core_vehicleBridge.executeAction()- sends actions to the vehicle Lua VMsetFreezeaction - vehicle-side controller freeze/unfreeze handler
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