SetLightScriptStringVariable

Definition

SetLightScriptStringVariable(string lightName, string variable, string value)

Description

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

value
Specifies the value of variable variable.

Example

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

function Init()
    SetLightScriptStringVariable("light1""a""hello")
end

function Update()

end
Assuming that the variable “a” is defined in the script attached to the light object “light1”SetLightScriptStringVariable function sets the value of “a” to “hello”.
adminSetLightScriptStringVariable