Definition
string GetLightScriptStringVariable(string lightName, string variable)
Description
This function gets 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.
Return Value
Returns the value of the String variable defined in the script attached to the lightName light object.
Example
--script name is GetLightScriptStringVariable.lua attached a to game object such as water return_value = "" function Init() return_value = GetLightScriptStringVariable("light1", "a") end function Update() end
Assuming that the variable “a” is defined with the value “hello” in the script attached to the light object “light1”, GetLightScriptStringVariable function returns the value “hello”.
GetLightScriptStringVariable