API ReferenceGE Extensionsflowgraphnodescareer
On Vehicle Shopping Event
- **Name:** `On Vehicle Shopping Event`
Overview
- Name:
On Vehicle Shopping Event - Category:
repeat_instant - File:
lua/ge/extensions/flowgraph/nodes/career/onVehicleShoppingEvent.lua - Pattern: Class-based (
C = {}, returns_flowgraph_createNode(C))
Description
Detects various events during the vehicle shopping flow in career mode: menu open/close, vehicle spawn for inspection, detail view open, purchase completion, and test drive state.
Pin Schema
Output Pins
| Pin | Type | Description |
|---|---|---|
openedMenu | flow (impulse) | Fires once when the shopping menu opens |
closedMenu | flow (impulse) | Fires once when the shopping menu closes |
vehicleSpawned | flow (impulse) | Fires once when a vehicle is spawned for inspection |
openedDetail | flow (impulse) | Fires once when the detailed purchase menu opens |
vehicleBought | flow (impulse) | Fires once when a vehicle purchase is complete |
vehId | number | Vehicle ID of the purchased vehicle |
testDriveActive | bool | Whether a test drive is currently active |
Behavior
work()resets all impulse flow pins, applies queued flags, clears them, then reads live test drive state fromcareer_modules_testDrive.isActive().- Hook callbacks queue flags:
onVehicleShoppingMenuOpened,onVehicleShoppingVehicleShown,onVehicleShoppingPurchaseMenuOpened,onVehicleAddedToInventory,onVehicleShoppingMenuClosed. onVehicleAddedToInventoryalso resolves the vehicle ID viacareer_modules_inventory.getVehicleIdFromInventoryId().onUIPlayStateChanged(enteredPlay)triggersclosedMenuwhen entering play state.
Key APIs Used
career_modules_testDrive.isActive()career_modules_inventory.getVehicleIdFromInventoryId()
Tags
#flowgraph #node #ge #career #shopping
Additional Exports
init()
-
name-string- (see source) -
description-string- (see source) -
color-any- (see source) -
icon-any- (see source) -
category-string- (see source) -
pinSchema-table- (see source) -
dependencies-table- (see source)
See Also
- Add To Inventory (Flowgraph Node) - Related reference
- Career Vehicle Select (Flowgraph Node) - Related reference
- Set Tutorial Step (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide