Skip to content

five-on-it / packages/ai/src/traffic / TrafficOptions

Interface: TrafficOptions ​

Defined in: packages/ai/src/traffic.ts:275

Where the traffic may appear and go (m), and how many cars it keeps.

Properties ​

areas? ​

optional areas?: readonly object[]

Defined in: packages/ai/src/traffic.ts:289

A game's spawn areas of the traffic (circles): new cars appear on the lanes inside them.


cars? ​

optional cars?: number

Defined in: packages/ai/src/traffic.ts:277

Cars wanted (0 switches the traffic off; at most TRAFFIC's maxCars).


despawn? ​

optional despawn?: number

Defined in: packages/ai/src/traffic.ts:283

Cars farther than this from every player go.


points? ​

optional points?: readonly SpawnPoint[]

Defined in: packages/ai/src/traffic.ts:287

The level's spawn points of the traffic (and a game's places of that role): where new cars appear.


sight? ​

optional sight?: number

Defined in: packages/ai/src/traffic.ts:285

Out of sight beyond this.


spawnMax? ​

optional spawnMax?: number

Defined in: packages/ai/src/traffic.ts:281

New cars this far from the nearest player at most.


spawnMin? ​

optional spawnMin?: number

Defined in: packages/ai/src/traffic.ts:279

New cars this far from the nearest player at least.