time += var1 global.waterlevel -= (cos(time) * var2)