Hosted at the Duke Nukem Repository
Navigate InfoSuite
Hosted At

Link to DNR
Advanced Effects - Doors - B3 : Sliding Door

Sliding Door

This is considerably the most complex door to construct. Many tutorials provide a map and just say "pull it apart". Essentially the Sliding Door is just a Star Trek Door with two benefits: (1) The door textures do not squish into the wall, and (2) There are no bugs regarding the door's activation sounds.


Single Sliding Door

Begin by creating a doorway sector.

Now create a sector inside of the doorway which almost reaches the other end. This will be the door sector. Tag it [0,25].

Insert three vertices on the one-sided wall of the door sector. They are colour-coded to help you keep track of where they are moved in the next step.

Move the vertices as shown below. Make sure the door has the triangular tip as shown below, it's important. Notice how the yellow vertex doesn't actually touch the end of the door sector (although it could, I'm just keeping things easy for this tutorial). The pink vertices will be moved in the next step.

Pull back the pink vertices a few squares. A one-sided wall will be attached to each of them. Insert a vertex on each one-sided wall with Insert (inserted vertices are shown as green).

Now move the green vertices to the points shown below.

Finally, you'll be adding sprites to the tiny portion at the end of the door sector. This is the reason the end of the door needed to be triangular, so there would be room left to add sprites. Turn grid locking off with L, and add an M[DoneSound,MovingSound], S[UniqueChannel,15], Speed[0,DistanceToOpen]. The DistanceToOpen value for the Speed indicates how far back the door will slide into the wall. A value of 512 is equal to the size of the largest grid square in Build. Change the angle of the S so it faces the direction that the door will close. Now you can texture the door and test it in the game.


Dual Sliding Doors

Create the door sector and tag it [0,25]. Split it in half for dual doors. When you split it, both sectors should retain the tag (make sure they do).

Insert three vertices on each one-sided wall. They are colour-coded to help you keep track of where they are moved in the next step.

Move the vertices as shown below. The two yellow vertices will overlap in the middle. The pink vertices will be moved in the next step.

Move the pink vertices back a few squares. A one-sided wall will be attached to each one. Press Insert on each one-sided wall to insert a new vertex (newly inserted vertices are shown as green).

Now move the green vertices to the points shown below.

Turn grid locking off with L, and add the following sprites to each door sector : M[DoneSound,MovingSound], S[Channel,15], Speed[0,DistanceToOpen]. The Channel is a unique value which both S sprites will share. The DistanceToOpen value for the Speed indicates how far back each door will slide into the wall. A value of 512 is equal to the size of the largest grid square in Build. Change the angle of each S so it faces the way that respective door will close. Finally, you can texture the doors and test them in the game.


Single Sliding Glass Door

Begin by creating a doorway.

Now create a door sector inside the doorway which almost reaches the other end. Tag the door sector [0,25]. The triangular tip at the end of the door isn't necessary, I'm just being consistent. The pink vertices will be moved in the next step.

Move the pink vertices back a few squares. A one-sided wall will be attached to each one. Press Insert on each one-sided wall to insert a new vertex (new vertices are shown as green).

You're finished with the pink vertices. Move the green vertices to the points shown below.

Enter 3D mode. Press M on the ground just below where the door should be. If you got it right, the brown brick texture will pop up, and there will be a small gap at the end of it (heed the small gap, it's your assurance that you masked the right wall). Texture the masked wall with glass (#503 is breakable, #504 is unbreakable), and use T to make it transparent. Mask all sides of the door (including the end of it) with a transparent glass texture.

Once the door has glass on all sides, switch to 2D mode. Point your mouse cursor at each of the door's walls and press B, then Ctrl + H to make the walls blocked and hittable. Place the following sprites within the door sector : M[DoneSound,MovingSound], S[UniqueChannel,15], Speed[0,DistanceToOpen]. For DistanceToOpen, a value of 512 is equal to the largest grid square in Build. Change the angle of the S so it faces the direction that the door will close.


Dual Sliding Glass Doors

Begin by making your doorway sector.

Create two separate rectangular sectors (they will be your doors). Insert a vertex on the end of each door and then overlap them to shape the doors like triangles. Your doors should look like the image below. Tag both door sectors [0,25]. The pink vertices will be moved in the next step.

Move the pink vertices back a few squares. A one-sided wall will be attached to each one. Insert a vertex on each one-sided wall as shown below (inserted vertices are shown as green).

Now move the green vertices to the points shown below.

Enter 3D mode and use masked walls to surround your doors with transparent glass textures (#503 is breakable, #504 is unbreakable).

Switch to 2D mode and make all of the masked walls blocked and hittable (using B and Ctrl + H). Add the following sprites to each door sector : M[DoneSound,MovingSound], S[Channel,15], Speed[0,DistanceToOpen]. The Channel is a unique value which both S sprites will share. The DistanceToOpen value for the Speed indicates how far back each door should slide into the wall. A value of 512 is equal to the size of the largest grid square in Build. Change the angle of each S so it faces the way that respective door will close.


Sliding Mirror Doors

It is even possible to turn a sliding door into a mirror. It is built much like a single sliding glass door, with a few exceptions. First, you can only mask one wall of the door, and that masked wall must be one-sided. Change it to the mirror texture (#560). Basically, this transforms the door into a combination of a sliding door and a 'behind-the-mirror' sector. The door will work now, but it will have an ugly HOM effect within the door sector. To hide the HOM effect, remove the triangular tip at the end of the door, and make the whole door sector as thin as possible (with grid locking off).




Return to top