Rising Water

Tynan

Newbie
Joined
Nov 21, 2004
Messages
229
Reaction score
1
Does anyone know how to make rising water?

I want to turn a valve and then have the water level rise, a la that level in the original game. I've tried with various moving brushes but the water brush becomes no longer water and I fall right through it.
 
func_water_analog (brush; HL2, HL2 DM; )

A water brush entity that moves linearly along a given distance, in a given direction

KEYS

Name…
Parent…
Origin (X Y Z)…

Move Direction (Pitch Yaw Roll) movedir <angle> The direction the water will move, when told to 'Open'.
Start Position startposition <float> Position of the water brush when spawned. The range is a value between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).
Speed speed <integer> The speed that the water brush moves, in inches per second.
Move Distance movedistance <float> The distance from the starting point that the water brush should move, in inches.
Sound played when the water brush starts moving. startsound <sound>
Sound played when the water brush stops moving. stopsound <sound>
Wave Height WaveHeight <string>

INPUTS

Kill…
KillHierarchy…
AddOutput…
FireUser1-4…
SetParent…
SetParentAttachment…
ClearParent…

Open Move the water brush to the end position (starting position + (move direction * move distance)).
Close Move the water brush to the starting position.
SetPosition <string> Move the water brush to a specific position between 0.0 and 1.0, where 0 is the starting position and 1 is the starting position + (move direction * move distance).

OUTPUTS

OnUser1-4…

OnFullyOpen Fired when the water brush reaches the end position (starting position + (move direction * move distance)).
OnFullyClosed Fired when the water brush reaches the starting position.
 
It worked, but the surface of the water is covered in a really hideous graphical bug. It's too horrible to describe, so I'll give a screen:

Wplantbug.jpg


Is there a solution?
 
my eyes my beautiful eyes!!

but the rest of your map looks very nice indeed!

hmm, done all the cubemap thing in it?
 
I've got a cubemap and it's linked to the surface. Didn't build the cubemaps this time, though that shouldn't really cause this bad of a bug, it should just use the skybox (as is being used on the gun).

Another area - what good water looks like:
WplantPreviewB01.jpg
 
OK well I tired it again and built the cubemaps.

It's still a sea of iridescent purple puke.
 
I love the look of that map :)



And "It's still a sea of iridescent purple puke." made me laugh! :thumbs:
 
Other than the martian sky effect on your water the map looks really nice. I like the artistry. Still, I think you should be able to fix the water somehow. Good luck and be sure to post the map here so we can play it!
 
Tynan said:
Does anyone know how to make rising water?

I do, 'cause I just figured it out :)

Took a lot of trial and error (lots of error), but here's what I found:

  1. Make a brush for the water. The top surface of the brush will be the top of your water when it's at its highest level.
  2. Make the brush into a func_water_analog entity. Set values for Name, Move Direction, Start Position, Speed, Move Distance, and Wave Height. The Help for this entity explains these values, especially Start Position, pretty well.
  3. Apply the nodraw texture to all faces of the brush EXCEPT the top face, which should receive the nature/water_movingplane texture. THIS IS CRITICAL - any of the other water textures don't appear to render properly (hence the purple puke)
  4. Place an env_cubemap entity near the middle of the brush, about 64 units above the top surface. Click the Pick button and select the top surface of the brush with the eyedropper.
  5. Enter the Name of your func_water_analog entity into the Output field of some other trigger (like a button) to get your water to rise/fall.

That's pretty much it - using the nature/water_movingplane texture was the key to getting it render properly.

Also, you MUST enclose the func_water_analog entity entirely in world brushes - none of the five sides with the nodraw or any portion of the top surface can be "outside" the interior of your map or else you'll get a leak and no vis for you!

Finally, you can use multiple brushes in your func_water_analog; however, the env_cubemap will only render one of the brush top faces properly, as you can only select one face to tie to the env_cubemap entity. Using multiple env_cubemaps might work but I didn't try it.
 
Back
Top