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.
Waterlevel things
Moderator: GZDoom Developers
- pieceofpiesoftware
- Posts: 66
- Joined: Sat Feb 05, 2011 2:17 pm
- Location: United Kingdom
Re: Waterlevel things
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]
[wiki]A_JumpIf[/wiki]
[wiki]DECORATE_expressions[/wiki]
- pieceofpiesoftware
- Posts: 66
- Joined: Sat Feb 05, 2011 2:17 pm
- Location: United Kingdom
Re: Waterlevel things
Thanks for the reply.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.
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.
Re: Waterlevel things
That's not how it works. From the second link I posted:pieceofpiesoftware wrote:Also knowing what the water level for the map is can be frustrating
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.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Waterlevel things
Since the waterlevel things are merely a hackaround for a feature there's no way they'll get expanded.