perception

How a creature notices the player and reacts to light: hunt only in the dark (or the light), back off from a flashlight. Scripts read the verdict with self.perceive() (kits/enemy.js uses it).

In scene text

perception { hunts_when "…"  dark_threshold 1  flee_light true }

Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.

Fields 6

FieldTypeUnit / rangeWhat it does
hunts_whentext—"always", "dark" (only while the player is in light below dark_threshold) or "light".
dark_thresholdnumber0 … 1Light exposure (0 black ... 1 bright day) below which the player counts as in the dark.
flee_lighttrue / false—Backs away while a flashlight (any spotlight) within flee_range shines on it.
flee_rangenumberm, 0 … 200How close a flashlight must be to drive it back.
sight_rangenumberm, 0 … 1000How far it notices the player.
hearingnumberm, 0 … 1000How far away it hears noises like gunshots (game.noise; scripts get the message 'heard'). 0: deaf.
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free