Damaging sector - not just on floor

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Damaging sector - not just on floor

Postby Enjay » Mon Oct 05, 2020 3:44 pm

I probably should already know this but, what is the best way to create a damaging sector that damages the player whenever they are in it, regardless of whether they are touching the floor or not?

Specific scenario:

The map in question is set on a low-orbit space station and when the player goes outside the buildings, he can take damage if he hasn't picked up a space suit (rad suit). I am currently using the normal damaging floors but, because of where the map is set, I have adjusted the map gravity to be lower than normal. This means that the player can make very long jumps and avoid touching the floor for longer than normal and thereby avoid damage. In addition, there are still some other areas of the map that need to use the normal floor damaging system (so a universal "change everything on this map" solution would not be appropriate).

So, what I need is a system that allows:
The player to take damage whenever he is in one of the outside sectors (whether he is touching the floor or not).
The player to be protected in such a sector if he has a rad suit power-up active.
Other damaging sectors to behave normally.

I can think of a couple of ways to do it but they all involve a bit of scripting and it strikes me as this might be something that can be done more simply somehow. So, what would be the best way to achieve this?

Thanks.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Damaging sector - not just on floor

Postby Apeirogon » Mon Oct 05, 2020 4:06 pm

UDMF map format?
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Damaging sector - not just on floor

Postby Enjay » Mon Oct 05, 2020 5:18 pm

Yes. Sorry, meant to say that in the OP.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Damaging sector - not just on floor

Postby Apeirogon » Tue Oct 06, 2020 2:49 am

Something like this.
Check both map and zscript file.
n-jay_space_rad.zip


Zero gravity is janky, I know.
You do not have the required permissions to view the files attached to this post.
User avatar
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Damaging sector - not just on floor

Postby Enjay » Tue Oct 06, 2020 11:43 am

Yes! That's precisely the kind of effect that I want. Thank you kindly. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Damaging sector - not just on floor

Postby Rachael » Sun Oct 11, 2020 2:55 pm

FWIW I did very much what you wanted when helping Rex in the Paranoic sequel for Paranoid (MAP15, the freezer).

The trick there was simply to use a 3D floor covering the entire sector, and then make it so the player can walk through the 3D floor.

Standing on an empty ledge in this death trap gave you no safety - eventually you'll take freeze damage if you stay in there too long, and if you die you become an ice chunk.

It was a trick originally suggested by Gez.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Location: This post
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Damaging sector - not just on floor

Postby Graf Zahl » Mon Oct 12, 2020 1:03 am

There's also the SectorDamage ACS function.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Damaging sector - not just on floor

Postby Enjay » Mon Oct 12, 2020 4:45 am

I haven't had a chance to put it into my map yet, but Apeirogon's solution certainly seems like it will do what I want.

The 3D floor idea is cunning. Would having such an extensive 3D floor (even if it is unrendered) have any performance impact?

SectorDamage would also be a possibility - but by my reading of the Wiki page, it doesn't set the damage in the sector to be an ongoing hazardous area but is a one-off "damage things now" kind of effect. So presumably it would need to be set up in a looping script to keep applying damage? (Not really a problem, I'm just checking.)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Damaging sector - not just on floor

Postby Rachael » Mon Oct 12, 2020 7:25 pm

The performance impact of the 3d floor is fairly negligible from what I have observed.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Location: This post
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Damaging sector - not just on floor

Postby WARCHILD_89 » Fri Oct 16, 2020 6:58 pm

I once did a room and placed an invisible sector into that room with damage.

To avoid the damage you had to crouch. So you only took damage when you were walking upright. Doomguy´s head is otherwise actually in the 3d floor sector and therefore he takes damage by standing upright in the room.
User avatar
WARCHILD_89
DOOM NEMESIS / 3D MODELS / RESOURCE BACKUPS
 
Joined: 17 Nov 2013
Location: MIA between doomed dimensions


Return to Mapping

Who is online

Users browsing this forum: No registered users and 0 guests