filter damage drown

Avatar
Skotty
671 Posts
Posted Aug 24, 2011
Replied 12 minutes later
Hey. Your problem is that the player is dying in water.
I tell you: Even if you don't have a trigger_hurt, you need one to keep the player alive!
Just set the damage to -100 and the player gets healed 100 points every half second.
Advertisement
Registered users don’t see ads! Register now!
Avatar
CaretCaret
290 Posts
Posted Aug 24, 2011
Replied 17 minutes later
The !player SetDamageFilter method have worked for me in other games.
Avatar
iWork925
1,080 Posts
Posted Aug 24, 2011
Replied 8 hours later
You can't even see underwater in Portal 2. It isnt even water it is toxic sludge.
Avatar
hyperion1is
33 Posts
Posted Aug 25, 2011
Replied 8 hours later
To whom you are addressing? That's way I proposed only a layer of slime.
Avatar
gallardo
85 Posts
Posted Aug 25, 2011
Replied 4 hours later
Both the methods I knew don't work in Portal2 so I resolved otherwise.

@hyperion1is: I need the player being able to swim
@Skotty: good one, but to maintain the trick the player can't be hit by turrets or lasers.
@iWork925: with custom shaders you can

Thanks guys.

Avatar
Skotty
671 Posts
Posted Aug 25, 2011
Replied 36 minutes later
Another thing how you could use the trigger_hurt healing method:
Count the time a fully healed player needs until he's drown (without any healing of course). Now just set the trigger_hurts damage value to a fitting.
Just use your time. 100/t (t is your time) and this /2, because trigger_hurt is (if I remember right) doing damage twice a second.
So the trigger_hurt will just compensate the drown-damage but not the turret damage.
If Portal 2's autoheal is disabled while drowning, just set your healing value a bit higher.

Oh another hint: In Coop, the player get's a drowning animation and he can't do anything. There any heal is senseless. If there is no hurt, the player never gets out of this animation.

Avatar
gallardo
85 Posts
Posted Aug 25, 2011
Replied 18 minutes later
@skotty: it makes as sense as using setdamagefilter or playerproxy... it doesn't work even if it should :wink:
With a trigger_hurt and dmg= -99999999 the player still drowns or at least the screen starts flashing red.

Clearly it's built-in, like the fact that you can't fire portals underwater.

Avatar
Skotty
671 Posts
Posted Aug 25, 2011
Replied 1 hour later
So, there is just the possibility to make real fake water.
For that I would try a func_illusionary. If the water won't render, a change on it's VMT would follow for this use.
With a trigger I would enable and disable something like a overlay with a animated water texture, so the screen looks like underwater. The sounds could be damped by using soundscapes with a special DSP. Water splashs are harder to do. If it's needed, I would create a lot of triggers and a lot of env_water_splashs.

Because of this complexitiy I would, if it would be my map, change the whole map or cancel it.

Avatar
Vordwann
767 Posts
Posted Aug 25, 2011
Replied 1 hour later
You can swim in sludge for a second and as long as the edge of the slime pool is only 16 units you can swim up and out.
Avatar
Skotty
671 Posts
Posted Aug 25, 2011
Replied 12 minutes later
But he want's not just a few seconds! That's no help so far.
Advertisement
Registered users don’t see ads! Register now!
Avatar
gallardo
85 Posts
Posted Aug 26, 2011
Replied 18 hours later
@skotty: it's exactly what I usually do.
I personally love to implement new mechanics using only what Hammer offers, except when it's too complicated. Having to cover all the map with trigger to simulate an effect? no thanks (but I saw it done).

I love even more when I've to make changes and the result is even better! that's in line with my belief that constant iteration is paramount.

Still, I won't to give up on this since it'll be useful for lots things, BTW none related directly to water as water.

Next I want to test if a second overlay or screeneffect override the effect of drowning.