Skip to content

five-on-it / packages/ai/src/police-heavy / cannonOperator

Function: cannonOperator() ​

cannonOperator(ai, npc, car): boolean

Defined in: packages/ai/src/police-heavy.ts:272

A police water cannon's operator (or its driver, alone): it aims the jet at the player it is after and holds the trigger in bursts while they are within the jet's reach and in its sight (each burst hisses first: the jet's pressure). Returns whether the NPC is one (its input is written); anything else is the chaser's (chaser.ts' ride).

Parameters ​

ai ​

AiWorld

npc ​

NpcState

car ​

number

Returns ​

boolean