filter damage drown

Avatar
gallardo
85 Posts
Posted Aug 23, 2011
How do I negate the drown damage when the player is in water in Portal 2?

I use a logic_playerproxy linked to a filter_damagetype with the type=DROWN and mode=disallow, but I still hear the sounds of the player being damaged...

Any ideas?

Advertisement
Registered users don’t see ads! Register now!
Avatar
iWork925
1,080 Posts
Posted Aug 23, 2011
Replied 58 minutes later
Can't you just get rid of the trigger_hurt??
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 56 minutes later
which trigger_hurt???
Avatar
Rubrica
305 Posts
Posted Aug 23, 2011
Replied 6 minutes later
Well, the only way the player should be receiving damage in the first place is if you've placed a trigger_hurtin the water. The water, on it's own, shouldn't damage the player.
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 20 minutes later
my fault by omitting that it's func_water_analog that I'm using, which doesn't require a tr_hurt.
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 41 minutes later
btw, which water/slime material doesn't drown the player? glados_cheap and toxicslime002a do it...
I suspect you meant that no water/slime kills you immediately, so they used a tr_hurt to accelerate the process.
Avatar
Rubrica
305 Posts
Posted Aug 23, 2011
Replied 24 minutes later
Unless you're making water that moves, there's no need for a func_water_analog. If you are... I don't know how to help you. Sorry.
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 15 minutes later
yeah, it doesn't matter if it's func_water_analog or not, it remains that the usual method for negating damage types doesn't work, for drown at least.
Avatar
Vordwann
767 Posts
Posted Aug 23, 2011
Replied 50 minutes later
None of the slime textures deal damage. You need a trigger_hurt for that.
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 34 minutes later
please, read again.

Just to say, also the other way doesn't work: trigger with onstarttouch !activator setdamagefilter filter_name

Avatar
Rubrica
305 Posts
Posted Aug 23, 2011
Replied 14 minutes later
But the thing is, setting a damage filter shouldn't even be necessary insofar as I'm aware; none of the water textures should cause ANY damage AT ALL.
Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 15 minutes later
But I was asking how to negate damage, not how to deal damage :wink:
the player still drowns in water, that's what I wanted to avoid, that's what I was able to do, that's what I can't do in Portal2 anymore.

my bad :wink:

Avatar
Rubrica
305 Posts
Posted Aug 23, 2011
Replied 9 minutes later
I know, and I'm afraid I don't know how to help you, I'm just saying that it shouldn't be necessary, and, furthermore, why you need to do this. I'm sure there is SOME way of doing.
Avatar
Vordwann
767 Posts
Posted Aug 23, 2011
Replied 4 minutes later
If you don't want the player to take damage, then just disable the trigger_hurt for that duration of time.

Alternatively, you could have a point_clientcommand that enables the "god" mode cheat.

Avatar
Rubrica
305 Posts
Posted Aug 23, 2011
Replied 3 minutes later

Vordwann wrote:
If you don't want the player to take damage, then just disable the trigger_hurt for that duration of time..

The point is, there IS no trigger_hurt, I believe.

Avatar
gallardo
85 Posts
Posted Aug 23, 2011
Replied 20 minutes later
:neutral:

ok, I'll update if I find a solution, thanks

Avatar
iWork925
1,080 Posts
Posted Aug 23, 2011
Replied 8 hours later

img

There already is a solution.

Remove the func_water_analog, you don't need it. I don't even think it works in Portal. Its a Half Life series thing. Create a brush extending over the area where you want the slime. Apply a toolsnodraw texture to all surfaces, then one of the toxicslime textures to the top. Create another brush in the same location. Texture with toolstrigger. Choose Tie to Entity and select Trigger_hurt. Set Damage to 100. You will fall through water, so the basin needs another brush at its base. One way to destroy objects: place a trigger_multiple above the water, with the flag Physics Objects, and this output: OnStartTouch > !activator > Dissolve > 0.00 > No

To "negate" the damage disable the triggers when you want to ie; on button press.

http://tinyurl.com/slimewater

Avatar
Random
171 Posts
Posted Aug 23, 2011
Replied 38 minutes later
...There IS no trigger_hurt. He didn't add anything. He's talking about drowning, not hurt damage. It's still in the Portal engine to drown the player after being underwater for a time. I tried it out on myself a day ago.
Avatar
iWork925
1,080 Posts
Posted Aug 23, 2011
Replied 14 minutes later
WRY? this isnt a swimming game!
Advertisement
Registered users don’t see ads! Register now!
Avatar
hyperion1is
33 Posts
Posted Aug 24, 2011
Replied 14 hours later
I new to mapping. I don't know how hammer, or portal engine treats water exactly, but you could leave water only on surface. I mean the water to be only a few inches deep, after that a empty pool. You make the floor and the walls of the pool (or whatever you are using) to give the illusion of water. English is not my native language but I hope you understood.
Don't know if it is possible. If the engine treats water like in the real world, the water should drop, so it will not work for you.