DAMAGE_NO_GROUND flag for SectorDamage

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

DAMAGE_NO_GROUND flag for SectorDamage

Post by Xaser »

I posted a rather silly thread just earlier about a trouble spot I'm having: namely, I'm using Transfer_Heights for a rising lava effect (for performance's sake, as it's a software-compatible project) and can't figure out a good way to kill the player without resorting to dropping literal hundreds of sector action things all over the map (it's a very complex area).

SectorDamage seemed like the right solution, since it can be applied to the Transfer_Heights destination sector and will damage the player when they're ""underwater"", but that's still a no-go since the rising lava means that I need to apply the tag to sectors that aren't yet submerged -- SectorDamage then kills players who come in contact with the ground. Welp. :P

Hence this suggestion: a SectorDamage flag to disable damage via ground contact, effectively restricting damage to ""underwater""-only. Would much prefer this (or some other sane engine feature) to hacks or zillion-things-insanity.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Graf Zahl »

That flag won't help you at all. What you need for that is a flag 'DAMAGE_SUBMERGED' or 'DAMAGE_SUBMERGED_PARTIAL', depending on how this is supposed to work.
What you suggest would completely disable all damage when touching the floor.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Xaser »

Semantics. What I'm indeed looking for is "damage when partially submerged, and nowhere else" (the distinction between fully and partially submerged is useful too) but I didn't phrase the flag that way since it's backwards of what's actually being done (the status quo is "damage when partially submerged OR on the floor", and the intent is to remove the latter).
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Matt »

Is there any hope of a generalized ZScript solution for all this? Like, every X tics each actor in a sector tagged with Y executes Z function... (and any ground or water level would have to be checked explicitly)

(I suppose this could already be done with a BlockThingsIterator but I have not tried anything of the sort myself)
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Xaser »

I'll bet so -- I wasn't sure when posting this request what the state of level control in ZScript was, but if JPL can flip the entire friggin' level upside-down, I can probably figure out how to do this. :P

After a quick browse of the handy reference in the pk3, [DIY] doesn't seem unreasonable at all. Hooray double negatives! :P
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Major Cooke »

I think another way to solve your problem is, using an iterator, see if the object to be killed is under a certain Z height and check within a 'box' coordinate set, if you want to keep it simple. Then you just activate/deactivate the iterator with ACS.

Also, curious, have you seen Volcanic Oasis by shadowhog in Dump 2 and how the gauntlet is done? Something tells me that actually is not what you're looking for but it does have rising lava.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: DAMAGE_NO_GROUND flag for SectorDamage

Post by Xaser »

Part of the trick with my rising lava setup is that it's part of a complex map with a ton of other things going on. There were already a few edge cases I hadn't accounted for when posting up the example wad in Editing (one of which I'd never even mentioned: there are two distinct lava areas with different heights), and I feel kinda silly in retrospect. :P

I think just checking the tag of the sector the player is currently in is the way to go, rather than mucking about with coordinates (which likely overlap in my own case anyway, because cave shapes are weird).

I do appreciate the thoughts though, as always. I keep forgetting at times that we've got this crazy swiss-army-knife of a scripting language and think too much inside the ACS box. Confound the revolution!
Post Reply

Return to “Feature Suggestions [GZDoom]”