five-on-it / packages/ai/src/sentry / raise
Function: raise()
raise(
ai,npc,phase,at,player,tick?):boolean
Defined in: packages/ai/src/sentry.ts:262
Raises a sentry to a phase at a stimulus noticed on tick (now by default), telling it the player behind it, if any. Never down: a lower phase is ignored (an alert stays alert, a search does not turn suspicious); the same phase takes the stimulus if it is news (not older than what it has). Returns whether it changed phase.
Parameters
ai
npc
phase
"search" | "normal" | "alert" | "caution" | "suspicious"
at
x
number
z
number
player
number
tick?
number = ai.sim.tick
Returns
boolean