Vlatitude: Water Tutorial Last edited 6 months ago2019-04-25 11:34:19 UTC by Penguinboy Penguinboy

In Half-Life, water is simply brushes tied to an entity. When you dive into a cool refreshing pool, you are diving into some brushes that were tied to a func_water entity. Here is how to make and adjust your water.

First, make a container for your water. For a pool, it can be a simple rectangular room without a ceiling. Think of the container as an empty swimming pool, or an empty bathtub with the water drained. Remember that liquids conform to the shape of their container, so putting a big block of water without a container just doesn't make sense. Now, create a brush, or several brushes to fill your container. This is going to be the water, so think of it as filling every crevice. If you're using rectangles, this is pretty easy. Select your "water" and give it an appropriate texture. Make sure all faces of the water brush(es) have some water texture applied to them. Select the water brush (or brush group), and click To Entity. Go to its properties, and in the class field enter func_water. That's it, it's now totally functional water! However, it's also pretty damn boring water. To achieve the desired effect, you should play around with its attributes.

In order to make water transparent, or see-through, go to the FX mode attribute, and change it to texture, then go to the FX amount attribute, enter a number. 255 will make your water completely non-transparent, and with 1, you probably won't even see the water. So give the FX amount a number of about 100. Voila, transparent water, which looks pretty damn cool.

Another property that water has, is that you can make it move. Move is a pretty loose term, but what it means is that you can have your water level go up, down, sideways, diagonally, etc... thus giving it the effect of being somehow controlled. For example, you can have water in your level that leaks from the ceiling and eventually fills the whole room. Try to imagine how you would make this effect, I'll reveal it at the bottom of the page. Moving water works just like doors. There are attributes such as speed, lip (how much of the brush(es) is left over after it moves the distance of its own length in the designated direction), time until closing (returning to original position), etc.

There is another way to make water. I call it, "the dumb way." Generally, if you give a brush any water texture, it automatically becomes water, even if u don't tie it to the func_water entity. However, this dumb water cannot be manipulated at all. You can't set transparency, can't set waves, can't make it rise or fall, or do much of anything else. So remember, for cool water, tie brushes to func_water.

Flowing Water

This stuff is fun. You can make your water have a current that will carry the player, monsters, and pushable objects. For the effect of a water current, the trigger_push entity is used. It's important to realize that the water itself does not flow, or "push" whatever's swimming in it. The trigger_push is the current itself. Create a brush or brushes that will be your water current. Usually, they occupy the exact same space as your water brush(es), but you can adjust the position so that the current can only be at the top of the water, or you can have more than one current (fast on top, slower on the bottom, just like in reality). Now select the "flow" brush(es), and press To Entity. Go to this new entity's properties. The direction angle circle doohickey is the direction in which the current will carry things. The speed of push attribute is (duh) the speed of the current. This speed is not like the speed attribute in doors or trains: it's way slower. A push speed of 200 is pretty moderate, and anything below 100 is probably too slow. Now adjust the flags tab of the properties. These are pretty self-explanatory. The Pushables box checks whether the current will push along stuff like crates etc. Notice that there is a name and a target attribute. This means that the current can be triggered on and off (when a pipe with water is opened for example). That's it!

Okay, here's the answer to the filling room problem. Have a func_water brush below the floor of the room. Also, put a water brush in a position so it looks like it is pouring from the ceiling. You could make it come down, or u could just make it stationary. Put a trigger somewhere that would trigger the water below the floor to rise (set its direction attribute to "up"), and make sure it "stays open". That's it! How far it comes up depends on the height of the water brush. If you really want to be fancy, you could make the water out of a couple brushes, with one bulging at the top, which would come up first, giving the illusion that a pool forms before the rest of the water fills the room. That will look pretty freaky while it's filling though, water doesn't normally have bulges on its surface.

Ready for some homework? Here's something to try. Make a pool. Using a trigger_once or trigger_multiple and the name attribute of a water brush, make it so that when the player takes a plunge into the pool (with the water surface being about 32 units below edge), the water suddenly "drains", leaving the player falling to the bottom of the pool and breaking his head, while a "no diving" sign mocks his misery (optional). This is not a great level-design strategy, unless it's based on some cruel kids' cartoon. Try it!
This article was originally published on 69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.