Are you sure it's actually a global variable and not just a normal variable for the command to determine what it's changing?
It's the latter
The only global variable for water height is $Water::Height and changing it doesn't do anything
The correct answer is
waterPlane.setTransform("0 0 " @ %height); followed by waterPlane.sendUpdate();
That only changes the visible water though, there's another object for the physical zone $EnvGuiServer::WaterHeight = mClampF(%value, 0, 100);
if (isObject(WaterPlane))
{
%pos = getWords(GroundPlane.getTransform(), 0, 2);
%pos = vectorAdd(%pos, "0 0" SPC $EnvGuiServer::WaterHeight);
WaterPlane.setTransform(%pos SPC "0 0 1 0");
WaterPlane.sendUpdate();
updateWaterFog();
if (isObject(WaterZone))
{
%pos = vectorSub(%pos, "0 0 99.5");
%pos = vectorSub(%pos, "500000 -500000 0");
WaterZone.setTransform(%pos SPC "0 0 1 0");
}
}
from the "WaterHeight" case from some of
port's codeNow, in theory, you can just take that code, remove the mClampF call, and throw it in a packaged servercmdenvgui_setvar, inside an if that checks if the second argument is WaterHeight. That, paired with a client mod that's little more than
EnvGui_WaterHeight.range = "-100 100"; should give you what you want