How do I make a door linked to a switch?


If you haven't made a basic door yet, please review "How do I make a basic door?" This will repeat many of the same steps, but you should understand the differences between the two.

1/4/1997 Update

See how to make the door only opened with a specific keycard!

Let's Go!


1. Start by using the spacebar to create a simple square sector.

2. Now add another sector that you want to walk into. This sector will NOT be connected to the first one.

3. Insert four points that we will use to create our door.

4. Now use the spacebar to connect those four points into a new sector (our door!).

5. In 3D mode, I've colored the door sector red. The door is opened and we can't see the texture that will be there when the door closes.

6. In 3D mode, I used the PageDown key to start lowering the ceiling of the door sector.

7. The floor and ceiling are now equal and I've changed the texture of the wall to look more like a door!

8. With the texture set correctly, we can "go under" the door and PgUp to bring the ceiling back open (opening our door)

9. Go into 2D mode and place a sprite to the left of the door

10. Now go into 3D mode and select one of the switch sprites and resize it to the appropriate size.

11. Go back into 2D mode and add 2 sprites into the door sector. Make the one on the right point down (Use the '>' key until the line points down)

12. Go into 3D mode and make the left sprite an activator ("A") sprite and the right sprite a sector effector sprite ("S").

13. Pick a random number to be used to connect the switch and the activator. This number needs to be unique and can't be used to connect any other switches, activators or sector effectors. For this demo, I picked 2 as the connection number. Go into 2d mode and set up the following tag values:



NOTE: Your switch may not be DIPSWITCH2 -- the name depends on what switch you picked. Just make sure the LOTAG matches the activators LOTAG.

All Done! Save the map and go run it. Walk up to the switch and hit the space bar (or whatever key you use to press switches). If the door doesn't open, review the steps above and make sure you did everything right.

What? No sound? You'll need to add a sprite for sound. What's that? You want the door to move faster? Look at the GPSPEED sprite. Throw one in the door sector and play around with the LOTAG to get a speed you like.


To make the door only open with a specific keycard. Make the following simple changes:

Palette Key Card
0 Blue
21 Red
23 (NOT 22!) Yellow

NOTE: Don't forget to add the keycard sprite to your level. Use the same palette as above to get the different keycards.


Download this map: door3.zip


This page will change as warranted by your comments, so please let me know if this helped you!


Patrick Steele
pjsteele@home.com
Copyright © 1996, Patrick J. Steele, Last Updated - 11/06/98 01:24 AM