Skip to content

five-on-it / packages/ai/src/police-roadblocks / ROADBLOCKS

Variable: ROADBLOCKS ​

const ROADBLOCKS: object

Defined in: packages/ai/src/police-roadblocks.ts:57

The numbers of the roadblocks.

Type Declaration ​

aheadMax ​

readonly aheadMax: 300 = 300

aheadMin ​

readonly aheadMin: 60 = 60

A barricade is set this far along the predicted route at least, and at most (m).

apart ​

readonly apart: 40 = 40

No barricade is set this near another, nor this near any car standing there (m).

carAngle ​

readonly carAngle: number

How far its cars are turned from facing the player, noses in (rad): 60°.

carEdge ​

readonly carEdge: 1.2 = 1.2

carOffset ​

readonly carOffset: 3.6 = 3.6

Its cars stand this far each side of the road's middle at most (m), and this far in from its edge at least.

clear ​

readonly clear: 8 = 8

cost ​

readonly cost: 4 = 4

What a barricade costs of the room's cap on police actors: two cars, two officers.

everyTicks ​

readonly everyTicks: 600 = 600

Ticks between two barricades for one player: ten seconds.

far ​

readonly far: 450 = 450

A barricade is cleared once its player is this far from it (m)…

leave ​

readonly leave: 80 = 80

Its officers and cars go once no player is this near (m)…

leaveTicks ​

readonly leaveTicks: 1800 = 1800

…or this long after it was cleared (ticks: thirty seconds).

lifeTicks ​

readonly lifeTicks: 3600 = 3600

…or this long after it was set (ticks: a minute).

near ​

readonly near: 25 = 25

Its player comes this near it (m)…

officersBack ​

readonly officersBack: 4 = 4

Its officers stand this far behind the cars (m).

passed ​

readonly passed: 40 = 40

…and is this far from it again: past it, or turned back (m).

retryTicks ​

readonly retryTicks: 30 = 30

Ticks before the road ahead is looked at again when no barricade could be set: half a second.

rollingAhead ​

readonly rollingAhead: 220 = 220

A rolling block's cars come out this far along the predicted route (m)…

rollingEvery ​

readonly rollingEvery: 1800 = 1800

…at most once in this long (ticks: thirty seconds).

rollingLine ​

readonly rollingLine: 170 = 170

…and stop side by side this far along it, toward the player (m).

rollingPast ​

readonly rollingPast: 6 = 6

A rolling block is over once its player is this far past its line (m), stopped this near it (m/s, m)…

rollingSpeed ​

readonly rollingSpeed: 8 = 8

A rolling block is sent to a player driving at least this fast (m/s)…

rollingStill ​

readonly rollingStill: 2 = 2

rollingStillNear ​

readonly rollingStillNear: 60 = 60

rollingTicks ​

readonly rollingTicks: 1500 = 1500

…or this long after it was sent (ticks: 25 seconds).