self:get_range

Client

Retrieves the maximum range of the spot light


Syntax

local range = self:get_range()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatrangeCurrent light range in world units

Examples

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

core.engine.print("info", "Spot light range:", entity:get_range())

On this page