Door opens when monsters are killed.

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.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Door opens when monsters are killed.

Post by gman829 »

I want to make a boss fight where the exit door closes and doesn't open until the boss is killed. How do I do this?
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Door opens when monsters are killed.

Post by Enjay »

Just one boss (rather than multiple ones)? If so, you can give the boss a special to open the door - provided that you are working in the UDMF or ZDoomHexen map formats.

If you are using the original Doom map format, you can probably do it by having a boss special action in your MAPINFO - and that would work for multiple bosses too (and would work in the other map formats as well).

You could also do it via ACS scripting and count the enemies as they die if you want.

Basically, it is certainly possible but there are a number of ways of implementing it and it depends on exactly what you are doing with your map as to which one would be the best for you. Give us some more details and we can give you a more specific answer.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

Which is better for this (and just about anything): UDMF or ZDoom Hexen?
User avatar
Kappes Buur
 
 
Posts: 4114
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Door opens when monsters are killed.

Post by Kappes Buur »

gman829 wrote:Which is better for this (and just about anything): UDMF or ZDoom Hexen?
The question should have been :"Why was UDMF invented?"

DiHF was and still is a very good mapping format. But over time some valid questions were raised, of how to make the mapping process simpler. So UDMF was proposed and developed. It allows to do some actions with simple one time actions instead of doing those actions in a roundabout way.

UDMF is not better, it is simpler to use for some mapping operations.

If you are really interested in finding out the difference, I will not deprive you of finding out for yourself. Make some maps in DiHF, include some colours and scripts to do various actions, and then repeat the same map in UDMF. You may find that UDMF is the way to go.

For reference read the threads when UDMF was in development, here and on Doomworld.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Door opens when monsters are killed.

Post by Enjay »

Kappes Buur wrote:UDMF is not better, it is simpler to use for some mapping operations.
Just to be picky, ;) I'd argue that it allowing simpler ways to do things inherently makes it better.

Please correct me if I'm wrong, but I also think it allows several things that are not possible by other means (even convoluted scripting means) therefore, it has a greater number of features which, again, could be considered "better". I'm thinking upper/lower/mid textures being able to have separate offsets, vertices being able to be placed with <1 unit accuracy and more.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

Should I use Doom In Hexen Format for what I'm trying to do?
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Door opens when monsters are killed.

Post by Enjay »

Personally, I'd go for UDMF. DiH really only has the advantage that it was once ZDoom's own advanced format and older tools may support it but not UDMF. If you are using a modern editor and you want to do something like I think you do, UDMF would be the way to go IMO. UDMF can do everything that DiH can do and more.
User avatar
Kappes Buur
 
 
Posts: 4114
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Door opens when monsters are killed.

Post by Kappes Buur »

Mapping in UDMF also has the advantage to use plugins like boris's 3D editing addon, which makes sloped 3D structures a snap. Or such things as scaling and aligning floor and ceiling textures, or Slope Mode, or Sound Environment Mode, or applying colours to sectors from an editing menu, or apply glows to linedefs from the same menu, etc.

So, all in all, the sooner one begins to use UDMF the sooner one is comfortable with making maps. :)
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

Enjay wrote:Just one boss (rather than multiple ones)? If so, you can give the boss a special to open the door - provided that you are working in the UDMF or ZDoomHexen map formats.

If you are using the original Doom map format, you can probably do it by having a boss special action in your MAPINFO - and that would work for multiple bosses too (and would work in the other map formats as well).

You could also do it via ACS scripting and count the enemies as they die if you want.

Basically, it is certainly possible but there are a number of ways of implementing it and it depends on exactly what you are doing with your map as to which one would be the best for you. Give us some more details and we can give you a more specific answer.
What is the "special function?"
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Door opens when monsters are killed.

Post by Enjay »

gman829 wrote:What is the "special function?"
Are you talking about the "special action" that I mentioned as a MAPINFO possibility?

Search for SpecialAction on this page: https://zdoom.org/wiki/MAPINFO/Map_definition

However, you still haven't given any details of exactly what you want to do - number of bosses on the map, type of bosses, map format, anything special about the particular setup, anything else that you want to happen at the same time...

Give us some clues and we can help you come up with a solution that best fits your particular scenario.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

Here's a gimmick with my mod that I'm creating: There's a boss at the end of every level. What I want to do is have a door open once it's killed so you can't skip the fight.
User avatar
masternoxx
Posts: 14
Joined: Thu May 07, 2020 12:55 pm

Re: Door opens when monsters are killed.

Post by masternoxx »

That's very Zelda-esqe.

In the Hexen Map Hypostyle this is done the player is pushed into the room and door closes behind them, In all 3 rooms, and I think(?) the door in the north room at least opens after killing all enemies (but it might be a switch). Perhaps you can take a look at the code for that...

Also in Hypostyle is a boss Death wyvern that when dies opens a door to the exit.

I mean there are 2 doors need dealt with right or is the exit door also the entrance door? Or the whole map is just a boss fight?

what you describe is an onDeath event
Last edited by masternoxx on Fri May 22, 2020 4:53 pm, edited 1 time in total.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

I think of it like this: a 512x512 sector with a boss in front of a door (that's locked), tons of ammo, and 2 teleports on the sides that lead to either one. I just want to make it so when the boss dies, the door opens.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Door opens when monsters are killed.

Post by Enjay »

gman829 wrote:Here's a gimmick with my mod that I'm creating: There's a boss at the end of every level. What I want to do is have a door open once it's killed so you can't skip the fight.
OK, so in this case, assuming that you are using DiH mode or UDMF, and you only want one monster to be killed to have the door open, you can give the monsters the door open action directly:

(Pictures grabbed in GZDB in UDMF mode)
Image

and set a tag that matches the sector,

Image

That's it, you're done. Kill the monster, the door opens.

If you want to do something more complicated (like having to kill several monsters, or have a more complex action than just a door opening) you'll probably need an ACS script instead.
gman829
Posts: 74
Joined: Sat May 12, 2018 1:55 pm

Re: Door opens when monsters are killed.

Post by gman829 »

Thanks!
Post Reply

Return to “Mapping”