SetWaterVisible

Definition

SetWaterVisible(string waterName)

Description

This function makes the water waterName visible.

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()
    SetWaterVisible("water1")
end

function Update()

end
In this script, we make the water “water1” visible.

Example 2

--Name of script is SetWaterVisible2.lua

function Init()
    SetWaterVisible("this")
end

function Update()

end
Assume that the above script named SetWaterVisible2.lua is attached to a water object named “water1”. In this case, string “this”  in the SetWaterVisible function will be equal to “water1”. In our example, the function SetWaterVisible makes the current water, which is “water1”, visible.
adminSetWaterVisible