Out of Sight: Hiding Spots, Body Carrying and Discovery Kit
README.md
guard
Guards that know about hiding spots, bodies and evidence, built on aiKit. Each hide-aware brain is a copy of an aiKit state machine brain with three things added, so everything aiKit guards do still works:
- A guard that saw a player go into a spot goes there, checks it and drags them out; one that did not walks past (hidden players are concealed with aiKit's
AI.setConcealed; peeking shows the spot'speekExposure). - When it loses someone, its search checks the hiding spots near where it lost them, nearest first, before searching at random and giving up.
- It notices bodies in the open and Evidence it can see and reacts by alarm level (concealKit.alarms), calling other guards on its team for levels with a call radius.
Requiring it registers the brains hideGuard, hideSentry, hideChaser and the presets hideGuard, hideNightwatch, hideSentry, hideMonster and their *Person twins (no aiKit stand-in body). A preset's hide = { checkSpots, spotRadius } sets how thorough its search is.
Exports: extendBrain(base, name) (also Hide.extendBrain), callGuards(b, pos, level, radius?), canSeePoint(b, p, ignore?), hideAlarm(b, withEvidence). Added states: notice, inspectEvidence, checkSpot, and a replacement search. Loaded by the api and by HidingSpot and Body.
Part of concealKit.