filter damage drown
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.
@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.
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.
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.
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.
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.