API ReferenceGE Extensionsflowgraphnodesmission
Mission Cleanup / Pre Clean (Flowgraph Node)
- **Node Name:** `Mission Cleanup`
Overview
- Node Name:
Mission Cleanup - Category:
once_p_duration - File:
extensions/flowgraph/nodes/mission/preClean.lua - Color: Mission blue (
0.13, 0.3, 0.64, 0.75)
Cleans up the world state before a mission starts. Stashes vehicles and traffic, with optional overrides to keep the player vehicle or active traffic.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
keepPlayer | bool | If true, the player vehicle stays active and is not stashed |
keepTraffic | bool | If true, current traffic stays active and is not stashed |
Output Pins
| Pin | Type | Description |
|---|---|---|
vehId | number | The original player vehicle ID (before any mission vehicle swap) |
Internals
- Calls
self.mgr.modules.mission:processVehicles(opts)withkeepPlayerandkeepTrafficoptions. - Retrieves the original player ID via
self.mgr.modules.mission:getOriginalPlayerId(), falling back tobe:getPlayerVehicleID(0).
How It Works
- The node runs once at the start of the mission duration.
- Calls
processVehicleson the mission module, which handles stashing the player vehicle, removing traffic vehicles, etc., based on the provided options. - Outputs the original player vehicle ID so downstream nodes can reference it (e.g., to restore it later via
postClean).
Lua Code Example
-- Typical mission flowgraph setup:
-- preClean (keepPlayer = false, keepTraffic = false)
-- → vehId output feeds into spawn/setup nodes
-- → eventually postClean uses the same vehId to restore stateKey Dependencies
self.mgr.modules.mission-processVehicles(),getOriginalPlayerId()be:getPlayerVehicleID(0)- fallback player vehicle lookup
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