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
| Field | Type | Unit / range | What it does |
|---|---|---|---|
hunts_when | text | — | "always", "dark" (only while the player is in light below dark_threshold) or "light". |
dark_threshold | number | 0 … 1 | Light exposure (0 black ... 1 bright day) below which the player counts as in the dark. |
flee_light | true / false | — | Backs away while a flashlight (any spotlight) within flee_range shines on it. |
flee_range | number | m, 0 … 200 | How close a flashlight must be to drive it back. |
sight_range | number | m, 0 … 1000 | How far it notices the player. |
hearing | number | m, 0 … 1000 | How 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