NOTE: Much of information on this page is from around 1999. Some may be outdated, and some may be incorrect -- this page exists to get you started with the Level Editing and may not currently cover some of the additional features available in Mapster32.
Map Name: TUTORIAL.MAP (ROOM 1-D)
Swinging doors are possibly the coolest and most useful doors in Duke Nukem 3D, but they can be a pain to construct. Follow these steps, however, and you should be able to make a working swinging door.
- STEP 1: Create the room and the hallway that the door will separate. The ceiling height of the hallway should be the height of the door. The hallway and the room should be two separate sectors (there should be a red line between these two sectors in 2D mode).
- STEP 2: Create the door sector on the side of the red line that the door will swing in to. This sector should be valid player space. In 3D mode, raise the floor of this sector to the height that you want the door to be (or you can lower the ceiling; whichever you prefer).
- NOTE 1: The door sector should be made within another, valid sector.
- STEP 3: Now move the door sector to where it should be. One side of the door should be in the exact position as the red line separating the hallway from the room (i.e. - two of the vertices of the door should sit exactly on top of the two vertices of the hallway and room junction).
- NOTE 2: The door should be in the sector in which it will swing into. If it is not, some big problems can occur.
- STEP 4: Give the door sector a sector lotag value of 23.
- STEP 5: Place one sector effector sprite in the door. Give this sprite a lotag value of 11, and a unique hitag value. Now you need to move the sector effector at the pivot point for the door. Turn off the grid lock feature by pressing the [L] key in 2D mode. Move the sector effector sprite as close to the pivoting corner of the door as you can, but *do not* place this sprite on the corner itself. Zoom in as far as you can possibly go in 2D mode to see just where you are putting it.
- STEP 6: Now you need to set the angle for the door. If you want the door to swing in a clockwise direction, point the sector effector south. If you want the door to swing in a counter-clockwise direction, point the sector effector north.
- STEP 7: Place one Music&SFX sprite in the door. Give this sprite a lotag value of 165. You are now finished! Take a look at the tutorial map if you don't quite understand.
- NOTE 3: Swinging doors will not work correctly in any of the following situations:
- If the floor or ceiling is sloped.
- If the door swings into another sector.
- If the door is not a valid player space sector.
- STEP 8 (optional): Put a GPSPEED sprite in the door to control its speed.
- Supports only values 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 ...
Swinging Glass Doors
Map Name: TUTORIAL.MAP (ROOM 1-E)
Swinging glass doors look great and add a nice touch to virtually any level. They aren't easy, however, so follow these instructions very carefully.
- STEP 1: Create a swinging door (see the swinging door how-to) but do not raise the door sector up from the floor.
- STEP 2: At the end of the door farthest from the pivot point (or farthest from the sector effector with lotag 11 - same thing) create a small square sector inside of the door. This sector should *NOT* be valid player space (i.e. - the walls of this sector should be white).
- STEP 3: Mask the outermost red line of the door itself, changing the mask texture to the glass texture. The [M] key in 3D mode creates a masked wall. Press the [B] and [H] keys on this mask. A point can be inserted on this line (before masking it) if desired, in order to prevent the glass texture from being as long as the door.
- STEP 4: Lower the ceiling of the door sector a few [PGDN] units (2 works nicely) and raise the floor of the door sector a few [PGUP] units (again, 2 works nicely). You're done! Take a look at the tutorial map if you don't quite understand.
Problems and Fixes with Swinging Doors
The following is a list of common problems and their solutions for working with swinging doors.
- PROBLEM: My door disappears when it opens! What do I do?
- SOLUTION: The problem here is that a corner of your door is actually going *outside* of your map (into nothingness) and is causing your door to disappear. Either move the sector effector sprite with the lotag of 11 closer to the vertex of the door, or angle the corner that travels outside the map. Also make sure that you are not building a door that swings in sectors of different height or sloped sectors.
- PROBLEM: My door swings in the wrong direction! How do I fix this?
- SOLUTION: You need to fix the direction that the sector-effector is pointing. To make the door swing clockwise, the sector effector needs to point upwards. To make it swing counter clockwise, you need to point the SE down.
- PROBLEM: When I make my door, I try to move it and it loses it's unique sector lotag/hitag.
- SOLUTION: The 'door' sector has to be created inside the sector where it will swing into. Do not create it and then move it into another sector or the it will lose it's unique lotag/hitag.
- PROBLEM: When I open my door, the walls move with it! How do I fix this?
- SOLUTION: When you create the 'door' sector, it should be a free standing sector. In other words the vertices should NOT be connected to any other vertices. AFTER the door sector has been made, you may move it (to the door hole) and now the vertices may overlap because they will not connect now. Be sure of this or the walls will be pulled along with the door!
- PROBLEM: When I open my swinging door, the door kills me! How can I stop this from happening?
- SOLUTION: Make sure that the sector effector sprite is actually INSIDE of the sector, and NOT on a line of the sector.
- PROBLEM: When I open one swinging door, a completely different door opens up. What's the deal?
- SOLUTION: The hitags for your sector effector sprites are the same. You must use UNIQUE hitags for doors that you want to open separately.