API ReferenceGE Extensionsflowgraphnodesgameplaytraffic
Traffic Driving Stats
**File:** `flowgraph/nodes/gameplay/traffic/drivingStats.lua`
File: flowgraph/nodes/gameplay/traffic/drivingStats.lua
Description: Gives information about the driving stats of a vehicle.
Category: repeat_instant Tags: police, cops, pursuit, chase, traffic, ai
Input Pins
| Name | Type | Description |
|---|---|---|
vehId | number | Vehicle id to get information from; if none given, uses the player vehicle. |
Output Pins
| Name | Type | Description |
|---|---|---|
speedLimit | number | Speed limit of the current road. |
speedRatio | number | Vehicle speed divided by the speed limit. |
collisions | number | Number of collisions with other traffic vehicles. |
driveScore | number | Value for how neatly the vehicle is driving (from 0 to 1). |
directionScore | number | Value for how often the vehicle is on the correct side of the road (from 0 to 1). |
intersectionScore | number | Value for vehicle obeying traffic signals (from 0 to 1). |
Methods
C:work()
See Also
- Add Vehicle (Traffic) - Related reference
- File Vehicle Group - Related reference
- Get Traffic State - Related reference
- FlowGraph Guide - Guide