setLightRadius
Client
Changes a light's range.
bool setLightRadius(light light, float radius)
Parameters
| Name | Type | Description |
|---|---|---|
| light | light | The light. |
| radius | float | Range in metres, above 0 and up to 1000. |
Returns
true if it changed. With a wrong argument it logs a warning and returns false.
If a spot light's source radius ends up larger than the new range, it is reduced to the range.
Example
local light = createPointLight(2495.1, -1687.4, 14.5, 5)
setLightRadius(light, 25)