Skip to content
ASArcaneMP Scripting APIScripting reference
Data shapeServer APIGenerated

LightOptions

Defined in: server/api.d.ts:2570

A light’s settings, for Light.create and light.set. Every field is optional; numbers are clamped to their ranges.

optional color?: string | { b: number; g: number; r: number; }

Defined in: server/api.d.ts:2609

Linear color 0-1, or a “#RRGGBB” sRGB string. Default white.


optional drawDistance?: number

Defined in: server/api.d.ts:2664

Distance in cm from the camera beyond which clients stop drawing the light (default 4000, the game’s own); 0 never culls. Changing it re-creates the light on clients.


optional enabled?: boolean

Defined in: server/api.d.ts:2674

Whether the light is on (default true).


optional fadeRange?: number

Defined in: server/api.d.ts:2669

Distance in cm over which the light fades out before drawDistance (default 300).


optional innerCone?: number

Defined in: server/api.d.ts:2644

Spot: the cone, in degrees from the axis, inside which the light is at full strength (default 0).


optional intensity?: number

Defined in: server/api.d.ts:2619

Brightness in candelas, 0-100000 (default 8). HL’s own fixtures run from a candle’s 1 to a street lamp’s 60.


optional map?: string

Defined in: server/api.d.ts:2709

Light.create only: a location().areaId; “Overland” or “” (the default) is the shared map.


optional outerCone?: number

Defined in: server/api.d.ts:2649

Spot: the cone, in degrees from the axis, at whose edge the light falls to nothing (default 44).


optional pitch?: number

Defined in: server/api.d.ts:2594

Rotation in degrees. A light shines along its forward axis; one left out counts as 0.


optional preset?: string

Defined in: server/api.d.ts:2574

A Light.presets() name, applied before the other fields: HL’s own fixture values for intensity, radius, temperature and source radius.


optional priority?: "always" | "low" | "high" | "normal"

Defined in: server/api.d.ts:2689

Its rank in the game’s render-side light budget, as the game’s own fixtures carry one; “always” exempts it from that budget (default “normal”).


optional radius?: number

Defined in: server/api.d.ts:2624

How far the light reaches, in cm (its attenuation radius), 1-100000 (default 1000).


optional roll?: number

Defined in: server/api.d.ts:2604

Rotation in degrees.


optional shadowQuality?: "medium" | "low" | "high" | "epic" | "cinematic"

Defined in: server/api.d.ts:2684

The lowest shadow quality setting at which a player sees its shadows (default “low”: everyone).


optional shadows?: boolean

Defined in: server/api.d.ts:2679

Whether it casts shadows (default false). Shadowed lights cost the most to draw: give shadows to few.


optional softSourceRadius?: number

Defined in: server/api.d.ts:2634

In cm; widens only the shadow penumbra.


optional sourceLength?: number

Defined in: server/api.d.ts:2639

In cm; stretches a point or spot source into a tube along its forward axis.


optional sourceRadius?: number

Defined in: server/api.d.ts:2629

Radius of the emitting sphere in cm; a wider source softens shadows and highlights.


optional specular?: number

Defined in: server/api.d.ts:2659

Strength of its specular highlights, 0-1 (default 1); 0 lights diffuse only.


optional streamRange?: number

Defined in: server/api.d.ts:2699

Interest radius in cm: only players this close receive the light. 100-100000, default 10000 (100 m).


optional temperature?: number

Defined in: server/api.d.ts:2614

Color temperature in Kelvin, 1700-12000, which tints the color; 0 (default) leaves it untinted. HL’s flames sit at 1850-2300.


optional ttl?: number

Defined in: server/api.d.ts:2694

Light.create only: seconds until the server destroys it; 0 or omitted lives until destroy.


optional virtualWorld?: number

Defined in: server/api.d.ts:2704

Light.create only: the virtual world it is placed in (default 0).


optional volumetric?: number

Defined in: server/api.d.ts:2654

How strongly it lights volumetric fog, 0-100 (default 1).


optional x?: number

Defined in: server/api.d.ts:2579

World position in cm.


optional y?: number

Defined in: server/api.d.ts:2584

World position in cm.


optional yaw?: number

Defined in: server/api.d.ts:2599

Rotation in degrees.


optional z?: number

Defined in: server/api.d.ts:2589

World position in cm.