Definition
SetWaterInvisible(string waterName)
Description
This function makes the water waterName invisible.
Parameters
waterName
Specifies the water name. You can also use the name “this” for this parameter. In this case, “this” string refers to the name of the water to which this script is attached.
Example 1
function Init() SetWaterInvisible("water1") end function Update() end
In this script, we make the water “water1” invisible.
Example 2
--Name of script is SetWaterInvisible2.lua function Init() SetWaterInvisible("this") end function Update() end
Assume that the above script named SetWaterInvisible2.lua is attached to a water object named “water1”. In this case, string “this” in the SetWaterInvisible function will be equal to “water1”. In our example, the function SetWaterInvisible makes the current water, which is “water1”, invisible.
SetWaterInvisible