M MY Multiplayer: Wiki
Side
Kind

setLightIntensity

Client

Changes a light's brightness.

bool setLightIntensity(light light, float intensity)

Parameters

NameTypeDescription
lightlightThe light.
intensityfloatBrightness multiplier, from 0 to 1000. At 1, a white light shines with an HDR radiance of 12.

Returns

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

A new light starts at intensity 1.

Example

local light = createPointLight(2495.1, -1687.4, 14.5, 12)
addEventHandler("onClientRender", root, function()
    setLightIntensity(light, 1 + math.sin(getTickCount() / 200) * 0.5)
end)

See also