Definition
string GetWaterScriptStringVariable(string waterName, string variable)
Description
This function gets the value of the String variable defined in the script attached to the water object waterName.
Parameters
waterName
Specifies the name of the water object.
variable
Specifies the name of the String variable defined in the script attached to the water object waterName.
Return Value
Returns the value of the String variable defined in the script attached to the water object waterName.
Example
--script name is GetWaterScriptStringVariable.lua attached a to game object such as light return_value = "" function Init() return_value = GetWaterScriptStringVariable("water1", "a") end function Update() end
Assuming that the variable “a” is defined with the value “hello” in the script attached to the water object “water1”, GetWaterScriptStringVariable function returns the value “hello”.
GetWaterScriptStringVariable