Waterlevel things

Moderator: GZDoom Developers

Post Reply
User avatar
pieceofpiesoftware
Posts: 66
Joined: Sat Feb 05, 2011 2:17 pm
Location: United Kingdom

Waterlevel things

Post by pieceofpiesoftware »

Hello there, I was wondering if this would be a possibility at all? Perhaps a flag to add to a weapon or monster that says
+NoDeepWater or maybe -WaterProof

Certian custom weapons would need this like a flamethrower will automatically deselect and cannot be selected once you are submerged.

Monsters with +Dropoff and fall into a pool or are spawned underwater will die instantly with this flag. Would be good for enemies that can't swim or are made of fire.

Projectiles will have it to so they can go to their deathstate when they touch the surface.

This is for weapons and enemies that absolutely are NOT waterproof and are not fussy about how deep they can go in, just any water any deepness.
User avatar
Enjay
 
 
Posts: 27280
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Waterlevel things

Post by Enjay »

It's already possible to use a waterlevel check with A_JumpIf that will achieve most, if not all, of what you want.

[wiki]A_JumpIf[/wiki]
[wiki]DECORATE_expressions[/wiki]
User avatar
pieceofpiesoftware
Posts: 66
Joined: Sat Feb 05, 2011 2:17 pm
Location: United Kingdom

Re: Waterlevel things

Post by pieceofpiesoftware »

Enjay wrote:It's already possible to use a waterlevel check with A_JumpIf that will achieve most, if not all, of what you want.
Thanks for the reply.

Yeah thats true, but I found this to be not as reliable as I thought it would be, only 50% chance one of my firebased enemies actually dies when it follows me under the water, and other times it gets through. Also knowing what the water level for the map is can be frustrating

Has somebody made a water example WAD, showing all the useful ways to use this code? Having a monster that, enters the water and goes into a swimming state, and then jumps out and is walking (or flying) would be neat.
User avatar
Enjay
 
 
Posts: 27280
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Waterlevel things

Post by Enjay »

pieceofpiesoftware wrote:Also knowing what the water level for the map is can be frustrating
That's not how it works. From the second link I posted:

waterlevel — How "submerged" the actor is

0: Not submerged at all (e.g. standing on solid ground)
1: Less than half submerged ("ankle deep")
2: At least half submerged ("waist deep")
3: Entirely submerged (completely underwater)

So you just use the appropriate value. You don't need to know individual map or sector water levels. The actor just checks where it is relative to the surface of the deep water.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Waterlevel things

Post by Graf Zahl »

Since the waterlevel things are merely a hackaround for a feature there's no way they'll get expanded.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”