setLightRadius
Client-side
Server-side
Shared
Pair: getLightRadius
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function sets the radius for a light element.
OOP Syntax Help! I don't understand this!
- Method:light:setRadius(...)
- Variable: .radius
Syntax
bool setLightRadius ( light theLight, float radius )Required Arguments
- theLight: The light that you wish to set the radius of.
- radius: MISSING_PARAM_DESC
Returns
- bool: value
Returns true if the function was successful, false otherwise.
Code Examples
shared
local light = createLight(0, 2, 3, 4)addCommandHandler("setradiusoflight", function(cmd, radius) if radius then if tonumber(radius) > 0 then setLightRadius(light, tonumber(radius)) else outputChatBox("Radius must be greater than 0.") end else outputChatBox("You must specify a radius.") end end)