WiseUseableValveWorks: Making a valve raise and lower water in HL2

From Valve Developer Community
Jump to navigation Jump to search
Nuvola apps ksnapshot.png
This article or section needs a screenshot to help visually convey the subject.
You can upload screenshots at Special:Upload. For help, see Help:Images.


This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.

A valve that can raise and lower water.

First we'll create outputs for a func_water_analog. This is the Source entity used for water that can move.

Next make a func_door_rotating and give these outputs:

Todo: find the image that held this information (thought this would be included in the example vmf but it wasn't?

When we open the func_door_rotating, which will also turn the wheel, our func_door_rotating will Open, or rise in this case. And when we close the func_door_rotating our water will lower. You can experiment with the settings for each of these functions, some of which are speed and sounds.

There are two materials that can be used with func_water_analog: nature/water_movingplane and nature/water_dx70. I've created a sample project with 17 func_water_analog bodies of water, each with its own material. The bodies of water in the sample, (vmf and bps are included), raise and lower. Some other materials will look fine of the surface but if you get in the water, crouch down and try to look out you won't be able to with the others, only the two listed here appear to function properly.

Remember, all faces of the water brush are textured with nodraw except the top face.

See also