Light
Lights up the dark around its entity: a torch, a lamp, a glowing mushroom, the player’s lantern. Lights only show where the Camera’s Camera.Ambient is darker than white; there, everything within Radius is lit by its Color, brightest in the middle. Where lights overlap they add up.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
radius: a number = 4. How far the light reaches, in world units. (A distance: the Scene view draws it as a circle around the entity, with a handle to drag.) (Field: a number.)color: a color, “#RRGGBB” or “#RRGGBBAA” = “#FFD89AFF”. The light’s color: warm orange for a torch, pale blue for moonlight. (Field: a color.)intensity: a number = 1. How bright it is: 1 lights its middle fully, more spreads full brightness further out, less is dim. (Field: a number.)softness: a number = 1. How gradually it fades out towards its edge: 1 fades all the way from the middle, 0 is a hard-edged circle (a spotlight, a window’s square of light seen from above). (Field: a number.)flicker: a number = 0. How much it flickers, from 0 (steady) to 1 (a guttering candle). Flames look right at about 0.2. (Field: a number.)offset: [x, y] = [0,0]. Where the light is, relative to the entity, e.g. (0, 0.5) for a lantern held up. (A point offset from the entity, in its own units, before its scale and turned with it: with Distance Handles the Scene view puts a knob on it to drag.) (Field: a vector.)shadows: true or false = false. Walls, solid tiles and solid colliders block the light and cast shadows behind them. What carries the light (a lantern’s holder) and anything the light is inside (a torch set into a wall) cast none; triggers, one-way platforms and background tiles let it through. (Field: on or off.)
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
currentIntensity: a number. The intensity right now, flicker included. The game updates it while it runs.worldCenter: [x, y]. Where the light is in the world.
Scripts use it as Light: its methods, events and values that aren’t saved with the scene.