I figured this out on my own, and published it to the doom editing
mail list in October 1994. However at the time this was a well known
effect, and even id used it in DOOM ][. However I'll include my
example wad from back then: doors.zip (9K)
2. The Descending Stair
When you have made this map, you should assign a floor height of 48 to the sectors 2, 3, 4, 5, 6 and 7 while sector 1 should have a floor height of 0. Now you can set up the normal raise stair linedef and tag it to sector 1. When the linedef is activated, the stair will snap into place immediately. Be careful when you design the stair, as each step will have a height of at most 8 pixels, which can easily prove to be too little.
The descending stair was first demonstrated by Sean Malloy (malloy@crash.cts.com) who released the dnstair.zip (3K). The effect is also demonstrated in special1b.zip (73K), where you can find it by going through the SKY door, turn right and press the switch. This should lower the floor you're standing on into a descending stair.
To get around the 8 pixels limit on the height of each step, you can create "dummy" sectors where the floor height of the dummy sector sets the level you want the step to drop to. To illustrate, consider the following map:
Here you can set the height of sector 1 to be 0, and set a height of 120 for the sectors 2, 3, 4, 5, 6 and 7. The sectors 8-12 should be a stair from height 0 to 120 with a step height of 20. You can set the ceiling height of each of these sectors to equal the floor height, which should conceal the sectors completely (if you align the textures). Now set up a linedef like 23 to all the sectors 2, 3, 4, 5 and 6. The linedef 23 drops the sectors to the lowest floor height in the adjacent sectors, which means that each step is lowered to the floor height of the adjacent "dummy" sector.
This special effect is also demonstrated in spcial1b.zip (73K). You can find it by taking the door to the south east. Go straight through the following room, and press the switch in the hallway. The hallway behind you should then drop into a combined stair that goes down and back up. This effect was described by Ray Greenwell (ray@frappe.extern.ucsd.edu).
The previous way of creating the descending stair works well if the
stair goes down alongside a wall. If that's not the case, you'll have
to experiment with other linedefs and other ways of concealing the
dummy sectors. (Like making them small, or creating them away from the
map in a place where the player never enters. See how it's done in the
invisible raising stairs section).
3. Switches and textures
Now you can turn left, where you will see a new type of switch with four actions. The first four times you activate this switch, a new door will open.
Now go through the fourth door you have opened, and operate the switch straight ahead. That should start the "road runner" animation. (At the same time the door back to the main area is opened again).
You can't make your own new switch texture, but you can override one of the old ones. This means that you should be very careful when you're selecting the textures you wish to redefine. Only redefine textures when you're sure you don't need the original.
To make the special effect you need to Apply a switch on a 2 sided linedef. This is impossible with the original DOOM switch textures, as they are all multipatch textures. So you need to redefine one of the SW1nnn, SW2nnn pairs, where the "nnn" is any switch name. Both the SW1nnn and SW2nnn textures should be redefined to be one-patch textures, or a texture suited for a 2s wall. In my WAD I've created a texture that consists of the switch and nothing else (one patch). The second texture (SW2nnn) should be almost the same as the first texture except now you have added cyan where you want a hole in the switch. You might also change the look of the switch around the hole so that it looks bent.
In the WAD, the effect looks like this:
Where sector 1 is the room you walk around in, and sector 2 is a small sector used to create the switch. The switch texture should be applied to the 2-sided wall between sector 1 and 2. At the same time a G1 action should be associated with the linedef. This way the texture will change when the switch is shot. On the back of sector 2 you can put any kind of texture you wish the player to see through the hole in the switch. In my WAD I've put another switch here.
So why does it work? Why can't the switch at the back of sector 2 be activated before the new exploding switch has been shot?
The answer is quite simple:
When the player presses the spacebar, DOOM will look at the linedefs
inside the reach of the player with the closest lindef first. Only
linedefs with an associated action is considered, and linedefs that
can only be activated once (S1, G1 or W1) will only be considered if
they haven't already been activated. At the end DOOM will have the
closest non-activated linedef with an associated action. If this
linedef can't be activated by the spacebar, nothing happens. If it can
be activated by the spacebar, the action is performed.
The rules for linedef activation (As I know them - There are errors in this):
Line type: | Activated by: |
---|---|
G | The player shoots through or at the line. Any shot can trigger multiple "gun" actions. |
W | The player moves so that his centre crosses the line. If the linedefs are overlaid, the player can activate as many as 9 "walk" linedefs just by moving one pixel. |
S | The player presses spacebar standing in front of the line (facing the line). There must not be any non-activated lines (of ANY type) between the player and the line in question. The player can only activate one "switch" linedef at a time. |
Which in this case means that before the front switch is shot, it will be impossible to activate the switch at the back of sector 2.
The switch textures I use only change a little from action to action,
but remember that they need to be applied to 2 sided walls, so you
can't use overlaid patches.
With normal DOOM textures
It's also possible to make multiple action switches using only the
normal DOOM textures. This special effect was invented by John
Kugelman (khalad5131@aol.com), who also created the example WAD
manyswtc.zip.
The effect only works for switches on a lower or upper
texture part. To create this special effect, you should make the
following map:
To make the switch animate the first time it's pressed you have to change the sidedef reference so that the side S1 points to the SW side on the line bordering sector 2. This way the texture will change both when the internal line (S1,S2) is activated and when the SW line is activated. The reason this only works on a lower or upper texture part is that the internal line (S1,S2) can not have a original DOOM switch texture as a normal texture, because all original DOOM switch textures are multipatch textures.
To set up the effect, you need to define the SW2nnn texture as a part of the animation between the "anim start" texture and the "anim end" texture. For instance your texture definitions could be like this:
SW1nnn # The first frame of a switch ANIM_START # The start of an animation (Select one of the start points from the WinTex menu) SW2nnn # This is the second frame of the switch from before. Since it's between ANIM_START and ANIM_END, it will become part of this animation. SOME_TEX # Then follows a few frames of the animation SOME_MORE ... ANIM_END # This is the last frame corresponding to the animation started before. You can select this from the same WinTex menu. |
Remember not to use the actual names listed above. Instead you should find original animation and switch textures from DOOM and redefine them.
You may want to be able to start an animation elsewhere, meaning that you don't want the animation to be displayed at the switch being activated, but want it somewhere else. To achieve this you need to overlay two linedefs. To overlay linedefs, you have to merge the end vertices, but keep two (or more) separate lines between the same two vertices.
Only one of the overlaid lines will be shown when the WAD is playing, so the other will be completely invisible. This other line could be set to hold the animation, while the line that shows should contain a switch texture. Remember though that the line that shows will not be activated when the animation is turned on. You might think that it's stupid to create an animation that doesn't show, but now you can set up a line elsewhere, and give it the same sidedef as the hidden overlaid line. That way the animation is displayed here.
This last effect requiring overlaid linedefs has not been implemented in my example wad.