How to make maps for Doom - Part 4
Today we'll be looking at linedef properties and action specials. Finally, you'll be able to make a door.
Right click on a linedef to bring up the following screen:
At the top is a number of "settings" flags, these define a couple of very basic properties the line should have. If a line is set to impassable, then no monsters or players can walk past it, but projectiles can still go through it (unless the line is one-sided and there's nothing on the other side). Alternatively, you can use the Block players, monsters, floating, projectiles and everything flags to fine tune how this works. Block sound doesn't work exactly like you might expect, and we will return to how sound travels through the map later.
We will also return to lower and upper unpegged later, these are fairly useful but require some explanation as to why and this part of the tutorial is already jam packed.
Secret, Hidden and Shown refer to how the line is displayed in the automap. Hidden and shown forces them to never/always be shown. Secret forces the line to be displayed in the colour of a standard wall even if it's a door or switch, so that the automap doesn't spoil your cunningly hidden secret doorway. It has nothing to do with the secret area count for the level.
If a linedef is not an outer one-sided wall and you give it a middle texture such as some see-through bars, then this texture will not be repeated vertically up towards the ceiling. Choosing "wrap midtexture" will make it so that it does. "Walkable midtexture" will make the texture solid so you can stand on it, and is an alternative to preventing players from walking through it without having to make the linedef completely impassable.
All one-sided lines that make up outer walls should be impassable (they will by default), and all other linedefs should have the doublesided property set (again, they will by default). Doublesided linedefs may be marked as impassable, but outer walls should never be marked as doublesided.
The middle section is where we will make our linedefs interactive, so they can open doors and lower lifts, as well as provide a few cool special effects, such as mirrors. There is a big dropdown, next to it is a small button with a little image on it. Click this to get the following window:
This very large tree contains all of the interactive actions the linedef can have, as well as a few special effects you can apply to the line. At the top you'll notice some text saying what certain letters mean. This text doesn't actually apply to the UDMF format. In other map formats, how the action is activated (walk over the line, use it like a switch, shoot it, etc.) and how often it works (once only or repeatable) depends on the action special, and some basic actions such as "open door" are repeated multiple times, once for each combination. In UDMF, each action is generic and listed once, we then set the properties that we want it to have separately.
There are so many action specials that it would be silly and very boring to go through every single one. Instead, we will go through the most common and useful ones, as always the ZDoom wiki has all the information you need.
Click on the plus next to "Door" to get a list of the possible actions we can use involving doors. Note that Door Raise refers to doors that open and then close automatically after a short while. For now, choose Door Generic, as this single action can be used to make almost any type of door you could possibly want.
Back in the main linedef property screens, the 5 entry boxes underneath the action special dropdown are now activated like so:
In UDMF format, we are given absolute control over exactly how we want our door to behave. We can choose which sector we want to be the door, how fast it should open or close, how long it should stay open for (the delay), and what keys we want to lock it with. If the sector tag is zero, then it will refer to the sector on the back side of the linedef, you won't need to set the tag on the linedef. We'll come back to what the sector tag actually means in a second.
Reference: To get a door exactly like the doors in Doom, use the following properties: Speed -> 16, Delay -> 150.
A note about time: Doom runs at a fixed 35 frames per second (Zdoom has a higher framerate and smooths out the action between these frames, but the game itself only runs at 35 FPS). All time is referred to in frames, so to have the door stay open for 3 seconds, you want to give a delay value of 3*35 = 105.
Underneath these 5 entry boxes are a number of further property flags to tick, this is where we set how the door is activated and how often. Any and every combination of the flags is valid. Note that having none of these flags enabled will make the action completely unusable, everything must be enabled specifically.
If you want the action to work every time and not just once, turn on Repeatable action. If you want a door to openable by a monster, you will need to place the action on the door itself and turn on When monsters bumps. Don't forget that for doors you will most likely want to enable When player presses use, forgetting to do this is my most common mistake when it comes to making doors.
You can limit the action only being triggerable from the front side only using Front side only. Activating Switch height check will make it so that your player must be able to "reach" the switch before he can press it, the default behaviour is that the player can flick switches under the floor or on the ceiling without looking at them because Doom is a 2D engine. Finally, having a linedef with an action on it usually blocks any linedefs immediately behind them from being usable; when you press the use button it checks in front of you for the first action it finds close in front of you then stops, by enabling Pass use on the linedef will be triggerable and then the check will keep going.
Now that we've set up how we want our door to open, we'll want to set up the sector that is supposed to be the door.
Draw a sector where you want your door to be, then right-click on it to go into its properties. The first thing to do is to lower the ceiling so that it is at the same height as the floor. A door is really nothing more than raising the ceiling so the player can pass. The height of the sector should be 0 unless you want monsters to see and hear you through it. Don't forget to set textures onto the walls. Next, unless the action to open the door has been placed on one of the linedefs that make up the door itself, you'll want to give the sector a tag so that we know what door we are referring to.
The following image shows a sector that has been set up correctly to work like a door. Note that the Identification tag box has a value of 1 in it, this is the tag I have given this door, any door action referring to sector tag 1 will work on this door, and also any other sector I have tagged as 1 (so we can open multiple doors with a single action).
Note that if your linedef is usable, and you put a switch texture on it, then this texture will animate correctly automatically.
What about the tag for the linedef?: In other map formats, you can't set arguments for each action, and so the only way to tell the linedef that you want it to open doors tagged with 1 is to set the tag of the linedef to 1 as well. This is not the case in UDMF format! In UDMF, the tag for the door to open is determined in the arguments for the action, so we do not need to set the tag for the linedef. This means the linedef can be given a different tag and we can get another action to refer to the linedef if we want to.
More cool ways to open doors
Right click on a thing. On it's properties, there is a tab called Action, clicking on this will bring you to a action dropdown just like the linedef. By setting a door action onto a monster, we will trigger the action when we kill the monster! Similarly, putting it on a pickup like ammo or a key will trigger the action when we pick it up. Different things trigger their action in different ways, but these two are by far the most common, again the ZDoom wiki has the information you need.
I'm confused WAAAH!
I've made a wad that has nothing but a hallway filled with doors and some examples of different ways to activate them. You can download it to see how it all works here.
The walls inside the door rise up with the door and it looks silly!
All in good time my good friend, I don't want to bog you down with information just yet (if you can't wait, give those walls the "lower unpegged" property.)
The monsters behind the door are waking up while the door is closed!
We'll deal with this when we come back to explaining how Doom's sound travelling works.
-- END OF ABSURDLY LONG SECTION ON DOORS--
Giving your level an exit
You'll want to use the action special "End Normal".
Lifts work just like doors and you set them up in a similar way, except the floor moves instead of the ceiling. They're actually called Platforms inside Doom Builder. Elevators are similar, except the ceiling moves with the floor. so the sector always stays the same height.
Platforms will move between the floor heights of sectors that connect directly to the sector that is the platform. So if you raise a platform, it will move until it reaches the height of another floor, then stop. You will need to trigger an action again if you want it to keep rising. The same applies to lowering platforms. Of course, if you use the Platform Lower Wait Raise action, it will automatically go back up after a delay without triggering a second action, like the automatically closing doors.
This was heavy going. We'll examine a few more useful action specials next time.
Doors doors doors. Practice doors, and then make some lifts using what you learnt about doors. Make a door open when you kill a monster, and set up a trap where picking up a key results in walls around you opening, releasing monsters.
Last edited by Melon on 04-13-12 at 21:09