API ReferenceGE Extensionsflowgraphnodesmission
Mission Post Clean (Flowgraph Node)
- **Node Name:** `Mission Post Clean`
Overview
- Node Name:
Mission Post Clean - Category:
once_p_duration - File:
extensions/flowgraph/nodes/mission/postClean.lua - Color: Mission blue (
0.13, 0.3, 0.64, 0.75)
Cleans up after a mission ends. Optionally keeps the mission vehicle (instead of restoring the original player vehicle), recovers it in place, resets the starting position, and preserves traffic state.
Pin Schema
Input Pins
| Pin | Type | Hidden | Description |
|---|---|---|---|
keepVeh | bool | no | If true, keeps the mission vehicle and removes the stashed player vehicle |
recoverInPlace | bool | yes (hardcoded) | Also teleport-recover the kept vehicle in place |
resetStartPos | bool | yes (hardcoded) | Move the original vehicle back to mission start position after mission stops |
vehId | number | yes | ID of the vehicle to keep; defaults to current player vehicle |
Output Pins
None.
Internals
- Uses
self.mgr.activityto access the current mission instance. - Uses
self.mgr.modules.missionfor stashed-vehicle management and original player ID lookup. - Uses
self.mgr.modules.vehicleto flag vehicles to keep after cleanup. - Uses
self.mgr.modules.trafficto optionally preserve traffic state.
How It Works
- Keep vehicle logic - If
keepVehis true:- Resolves the vehicle by
vehIdor falls back togetPlayerVehicle(0). - If the kept vehicle differs from the original player vehicle, marks it as "keep" and removes the stashed player vehicle.
- If
recoverInPlaceis true, teleports the vehicle to its current position with optional repair (skipped in career mode if the player uses their own inventory vehicle). - Unfreezes the vehicle via
core_vehicleBridge.executeAction(veh, 'setFreeze', false).
- Resolves the vehicle by
- Reset start position - Sets
mission.restoreStartingInfoSetup = trueso the mission system repositions the original vehicle. - Traffic preservation - If the mission's traffic setup has
usePrevTraffic, setskeepTrafficStateto prevent traffic from deactivating.
Lua Code Example
-- In a mission flowgraph, place postClean after the mission result:
-- missionResult → postClean (keepVeh = true)
-- This keeps the vehicle the player used during the mission
-- and removes any stashed original vehicle.Key Dependencies
self.mgr.modules.mission- mission module (stash/restore/originalPlayerId)self.mgr.modules.vehicle- vehicle keep managementcore_vehicleBridge- vehicle action executionspawn.safeTeleport- position recoverycareer_modules_inventory- career vehicle ownership check
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