GetWaterScriptDoubleVariable

Definition

double GetWaterScriptDoubleVariable(string waterName, string variable)

Description

This function gets the value of the Double 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 Double variable defined in the script attached to the water object waterName.

Return Value

Returns the value of the Double variable defined in the script attached to the water object waterName.

Example

--script name is GetWaterScriptDoubleVariable.lua attached a to game object such as light

return_value = 0.0

function Init()
    return_value = GetWaterScriptDoubleVariable("water1""a")
end

function Update()

end
Assuming that the variable “a” is defined with the value 1.0 in the script attached to the water object “water1”GetWaterScriptDoubleVariable function returns the value 1.0.
adminGetWaterScriptDoubleVariable