Jump to content

Grimwar/Entities/env light

From Vellocet Developer Community

All entities

Place a light and optionally control it with scripts or a built-in effect.

Placement: Point.

Set it up

Choose Point, Spot, or Area and set its colour and intensity. Area lights are baked only. Effects and scripts change Baked point/spot lights to Dynamic; Mixed retains baked indirect light. Use Map Environment for the sun. The color input accepts an HTML colour such as "#80c0ffff". The toggle output fires when the toggle input is received.

Settings

These are the initial authoring values. Script inputs and runtime state are listed separately below.

Setting Default Meaning and choices
light_type
Light type
Point (2) Point, Spot or Area. Area lights are baked-only and cannot use effects or scripting. Choices: Point (2), Spot (0), Area (3).
color
Color
[1, 1, 1, 1] Value type: color.
intensity
Intensity
1 Minimum: 0. Maximum: 1000000.
range
Range (metres)
10 Minimum: 0.01. Maximum: 1000000. Shown when light_type is 2, 0.
area_size
Area size (metres)
[1, 1] Shown when light_type is 3.
spot_angle
Spot angle
30 Minimum: 1. Maximum: 179. Shown when light_type is 0.
shadows
Cast shadows
true Value type: bool.
enabled
Start on
true Value type: bool.
cookie
Cookie
None Reference: texture.
lighting
Lighting
Baked (0) Effects or scripts change Baked point/spot lights to Dynamic. Mixed keeps baked indirect light. Choices: Baked (0), Mixed (1), Dynamic (2).
effect
Effect
None (0) Choices: None (0), Flicker (1), Strobe (2), Candle (3).
scripted
Scripted
false Enable for external scripts or mods. VSig enables this automatically. Creates a network entity.
ignore_nav_mesh
Ignore Nav Mesh
false Exclude this entity from navigation-mesh building. This does not disable its gameplay collision.

VSig contract

Use the names below with a ref bound to this entity. The value column describes the catalog value type, not a C# method signature. See Read the reference for arguments, authority, and common controls.

Kind Member Value Authority / access
Input color string Server
Input kill none Server
Input off string Server
Input on string Server
Input toggle string Server
Output killed none Server
Output toggle string Server

Build notes

Light effects need Mixed or Dynamic lighting. Baked point/spot lights export as Dynamic when an effect is enabled. Mixed keeps its baked indirect light; area lights cannot animate.

Script-controlled lights need Mixed or Dynamic lighting. Baked point/spot lights export as Dynamic when scripted. Mixed keeps its baked indirect light; area lights cannot animate.