API ReferenceGE Extensionsflowgraphnodesgameplaytraffic
Get Traffic State
**File:** `flowgraph/nodes/gameplay/traffic/getTrafficState.lua`
File: flowgraph/nodes/gameplay/traffic/getTrafficState.lua
Description: Returns the traffic state and values.
Category: repeat_instant Tags: traffic, ai, enabled, disabled
Output Pins
| Name | Type | Description |
|---|---|---|
on | flow | Flows if state is "on". |
spawning | flow | Flows if state is "spawning". |
loading | flow | Flows if state is "loading". |
off | flow | Flows if state is "off". |
onBool | bool | True if state is "on". |
state | string | Traffic state. |
amount | number | Total number of AI traffic vehicles. |
activeAmount | number | Total number of active AI traffic vehicles, from the vehicle pool. |
Methods
C:work()
See Also
- Add Vehicle (Traffic) - Related reference
- Traffic Driving Stats - Related reference
- File Vehicle Group - Related reference
- FlowGraph Guide - Guide