GetWaterScriptBoolVariable

Definition

bool GetWaterScriptBoolVariable(string waterName, string variable)

Description

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

Return Value

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

Example

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

value = false

function Init()
    value = GetWaterScriptBoolVariable("water1""a")
end

function Update()

end
Assuming that the variable “a” is defined with the value true in the script attached to the water object “water1”GetWaterScriptBoolVariable function returns the value true.
adminGetWaterScriptBoolVariable