SetLightScriptDoubleVariable

Definition

SetLightScriptDoubleVariable(string lightName, string variable, double value)

Description

This function sets the value of the Double variable defined in the script attached to the lightName light object.

Parameters

lightName
Specifies the name of the light object.

variable
Specifies the name of the Double variable defined in the script attached to the lightName light.

value
Specifies the value of variable variable to be set.

Example

--script name is SetLightScriptDoubleVariable.lua attached a to game object such as water

function Init()
    SetLightScriptDoubleVariable("light1""a", 1.0)
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the light object “light1”SetLightScriptDoubleVariable function sets the value of “a” to 1.0.
adminSetLightScriptDoubleVariable