As you are probably familiar with, drawing transparent stuff in GM makes stuff behind it drawn afterwards disappear. This can be both beneficial and annoying. Let me first show you why it's beneficial. When drawing the fog of war, it has two layers - one completely opaque, and one slightly transparent. The opaque one hides areas not yet explored, and the transparent one hides objects that are currently not being observed by any of your units/buildings. As you can see in the following two images:
Standing over here, no objects are visible under the transparent fog of war:

And when moving further in, an enemy base is revealed:

My units are also supposed to be able to move through water. This means that because of the z buffer, the water needs to be drawn after the units to avoid cutting the units in half. And to remove objects under the transparent fog of war, the fog of war will have to be drawn before the objects.
Now comes the tricky part - to prevent the fog of war from cutting away the water, it needs to be drawn after the water is drawn. However, this makes an obvious loop in priorities...
FOW is drawn before units, units are drawn before water, water is drawn before FOW and so on.
Drawing the fog of war before the water yields this undesirable result:

Any smarter people out there? Can anything be done to fix this? I'm afraid I'll have to use d3d_set_zwriteenable(false) when drawing the water. This will make the units not blend with the water though, and make them appear to be hovering above it.











