self:set_range

Client

Sets the maximum range of the spot light


Syntax

local status = self:set_range(
    range
)

Parameters

TypeNameDescription
floatrangeLight range in world units

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Set the range of a spot light
local entity = light.spot.create()

entity:set_range(15.0)

On this page