M MY Multiplayer: Wiki
Side
Kind

setLightCone

Client

Changes the opening and the edge hardness of a spot light's cone.

bool setLightCone(light light, float angle [, float hardness = nil])

Parameters

NameTypeDescription
lightlightThe light.
anglefloatHalf the cone's opening, in degrees from its axis, above 0 and up to 90.
hardnessfloatFraction of the cone lit fully, from 0 to 1. Anything above 0.99 counts as 0.99. Left out, the current hardness is kept.default nil

Returns

true if it changed. With a wrong argument it logs a warning and returns false.

Example

local light = createSpotLight(2495.1, -1687.4, 20, 0, 0, -1, 25)
setLightCone(light, 15, 0.9)
NoteSpot lights only. On a point or rect light it logs a warning naming its type and returns false.

See also