Swinging Door Tutorial V1.0 By Rexxx21 July 1, 1996 Duke Nukem 3D Editors Guild --------------------------- I've seen a lot of people still asking about swinging doors, even after reading some of the very well written faqs out there. I've worked with them enough to FINALLY get a decent handle on them, and figured that it would be a good idea to write a quick tutorial about them so that those that can't understand the faqs could make one. I learned how to do them from Brett Gmoser's MAPFAQ0#.ZIP. Unfortunately, I thought I had them figured out after my first swinging door worked perfectly. I was wrong. So, again, I went to the faq. Again, I made another successful door. Recently, I found what I consider to be a foolproof way to make a successful swinging door the first time, every time. Hey, if it doesn't work, you get your money back. :) Step 1. ------- Draw a large sector. +-------------------------------+ | | | | | | | | | | | | | | | | | | | | +-------------------------------+ Step 2. ------- Add vertices for walls and draw and raise the walls. +-------------+-+---------------+ | | | | | | | | | | | | | +-+ | | | | | | +-+ | | | | | | | | | | | | | +-------------+-+---------------+ Step 3. ------- Draw the door inside the sector, but not in the doorway. To do this, simply create a rectangular sector and then hit ALT-S inside of it. The lines of the door should turn red. +-------------+-+---------------+ | | | | | | | | | | | | | +-+ | | +-+ | | | | | | | | +-+ | | +-+ | | | | | | | | | | | +-------------+-+---------------+ Step 4. ------- Raise the door a couple of notches by pressing PAGEUP while the crosshairs are on it's "top" in 3D mode. When you have done this, give the "thin" sides a texture, as well as the top. When you are done giving the thin sides and top a texture, put the crosshairs back on it and lower it back into the floor until it is flush. Step 5. ------- In 2D mode, hit G twice. This will make the grid smaller. Step 6. ------- Move the vertices of the door to the center of the doorway. Do not rest the vertices on the existing vertices, but instead, on the lines that make up the inside of the doorway. The '+' signs below show where the vertices should be. Note: For a thinner door, you can move them closer together. +-------------+---+---------------+ | | | | | | | | | | | | | ++-++ | | | | | | | | | | ++-++ | | | | | | | | | | | | | +-------------+---+---------------+ Step 7. ------- In 3D mode, add a sector effector to the map. It doesn't matter where, really. +-------------+---+---------------+ | | | | | | | | | | | | | ++-++ | | S | | | | | | | | ++-++ | | | | | | | | | | | | | +-------------+---+---------------+ Step 8. ------- In 2D mode, hit 'L' to turn off grid locking. Move the sector effector into the proper position. You want the sector effector to be INSIDE the door sector, but not touching any lines. Imagine the door sector as a flat piece of wood, and the sector effector is a nail that you will drive through that piece of wood for it to "rotate" on. Obviously, you will want this in a corner of the sector. Below is an enlarged example. (Remember, you can press A to zoom in closer for easier placement.) | W A L L | +----+-----------------------+----+ | S <-Sector Effector | | | | | | | | | | | | | | | | | | D O O R | | | | | Step 9. ------- In 2D mode, highlight the sector effector (make it blink) and press ALT-T. This will set the lo-tag. Set it to 11. Highlight the sector effector again and press ALT-H. Set this to a unique number. (Unique of all your swinging doors; If you set this number the same as another swinging door, they will both open when one is "activated") Still in 2D mode, put the red crosshairs inside the door sector and hit T. This will change the sector's lo-tag. Set this to 23. Now, highlight the sector effector again and press < or >. Notice that the line attached to the sector effector rotates around it. This is how you tell the door which way to swing. Point this one towards the LEFT side of the screen. What this will do is this: If you are on the left side of the map in the beginning of the game, and activate the door, it will swing TOWARD you. If you were on the right side of the map, it will swing AWAY from you. OPTIONAL: You can also add a MUSIC&SFX sprite to the door sector also. Again, do not allow it to touch the sides, but it can rest anywhere inside the door sector. In 2D mode, highlight the M&SFX sprite and press ALT-T. This will change the lo-tag. Set this to 165. Highlight the M&SFX sprite again and press ALT-H. This will change the hi-tag. Set this to 165 also. Now, when the door is activated, it will make the standard swinging door sound. Step 10. -------- In 3D mode, raise the door sector to the ceiling. Give both sides a texture. (Remember to hit F on the texture on the opposite side of the door to flip the texture.) You're done. See? Easy, huh? Be careful, step 9 is quite confusing, but if you read it slowly and carefully, and look at the included map, you will hopefully understand it. If not, well, it was worth a try. I'd be happy to hear any comments regarding this mini-faq. Please send comments to REXXX21@AOL.COM or CHRISB@CHEYENNE.COM. Remember: Duke Nukem 3D Editors Guild at http://members.aol.com/rexxx21/duke3d.html To Brett and Klaus: If you find that this tutorial is beneficial or helpful in any way and would like to include it in your faq, please, feel free to do so. Just please, give credit to me for it, and mention my website. :) Rexxx21