SetLightScriptIntVariable

Definition

SetLightScriptIntVariable(string lightName, string variable, int value)

Description

This function sets the value of the Integer 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 Integer variable defined in the script attached to the lightName light.

value
Specifies the value of variable variable.

Example

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

function Init()
    SetLightScriptIntVariable("light1""a", 1)
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the light object “light1”SetLightScriptIntVariable function sets the value of “a” to 1.
adminSetLightScriptIntVariable