OK just made a quick video to learn you "how to code lua" / "control the water color / height" in less then 6 minutes, well
the script from the video:
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
function water_init(e)
end
function water_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 120 then
color_r = math.sin(Timer()/2000.0)
color_g = math.cos(Timer()/1500.0)
color_b = math.sin(Timer()/1700.0)
SetShaderVariable(0,"WaterCol", color_r , color_g, color_b, 0)
SetShaderVariable(0,"SurfColor", color_r , color_g, color_b, 0)
SetGamePlayerStateWaterlineY( 500.0 + (math.sin(Timer()/1500) * 10.0 ) )
else
-- set default water color.
SetShaderVariable(0,"WaterCol", 158.0/256.0 ,168.0/256.0 , 198.0/256.0, 0)
end
end