First of all you need a mapeditor (I recommend using QERadiant, because it's the editor of choice for other games like Kingpin or Quake3, too).
Then you need the textures for the escalators - if you don't know how to make your own textures, you can read my tutorial about texture making here (look for it in the Files section).
You also should have installed Quake2 (or how do you want to actually test the things you just have build? :)
You should know what a path_corner is and where to place it (If not, read the corresponding tutorial at rust).
First Thoughts About Your Escalator
Before we can start with our escalator, we have to thing about some issues in relation with it:
- How many steps should it have? (to many steps will slow down the frame rate, but if you're using not enough or big ones, it doesn't look real).
- Where do I want to place it? To reduce the polygon count (r_speeds), you should consider placing the escalators in their own room or behind a corner in the room, so it can only be seen from this room.
- Try to use the escalators seperatly - don't use two or more of them in the same room - your framerate will go down very fast.
- Try to light the escalators right from front above (the light should see the upside and the front of the steps) - when we discuss the lightning below, you'll see why that is important.
First Step: Create The Steps And The "path_corners"
This one is a little bit tricky, but not to complicated. Let's start with a little drawing:
Picture 1: Overview (one square is 8*8 units)
As you can see, we actually have 15 path_corners, but only 14 steps. Hm, why that? Easy: you can never see more than 14 steps at once, but you need 15 positions where they have to pass, one for the "teleport" of the step to the other end.
Ok, so let's start with our first step - we'll start at the upper end of the escalator. First create the path_corner for the teleport. Place it 26 units below your actual floorheight (see picture 1). The steps are brushes with the following dimensions: width 48, height 24, depth 32. Place the first one 2 units below your floor height (have a look at a real escalator, the steps are always a little bit below the floor, because they'll have to slide under it). Assign the proper textures and allign them. Create the corresponding path_corner for this step.
Now we have to assign some values to the path_corners and the step itself. First edit the "teleport" path_corner (the name is a little bit wrong, because this corner is the one where the teleport starts, not the one where the teleport ends - and in Quake 2 you've to assign the TELEPORT flag to the destination of the teleport). Set targetname to "e1up" and target to "e1down". Now select the path_corner of the first step. It should have set the targetname to "e113" and the target should be "e1up" (our escalator is an upward one). Next we have to add the func_train entity to the brush representing the step, then we select the START_ON flag for this entity and we set target to "e113" and team to "e1" (as you may have recognized, the e1 stands for "escalator 1", if you build more than one escalator in your map, name them arcordingly).
Place the next step 16 units below this one and repeat the steps for creating a step for all 14 steps with the corresponding e1xx set to the previous one (The next path_corner would have set targetname to "e112" and target to "e113", the next func_train would have set target to "e112" and so on). The last path_corner (the one on the same height as the one before, see picture 1) uses the following settings: target=e101 and targetname=e1down and it has set the flag TELEPORT, the corresponding step has set target=e1down.
That's all, your escalator will run when you build a map... but we'll have to add some more to make it work like it should :)
Tip: If your steps aren't aligned correctly when you've build the map, then you might be using Qoole or another editor which has rounding bugs. I strongly recommend using QERadiant, because this editor hasn't got any of these bugs.
Second Step: Setting up the casing and the floors
We already have our stairs, now we need the casing of the escalator (you need to put a casing below your escalator, because entitites can't touch the void). Have a look at picture 2 and picture 3 and the .map file how I made it (I removed one side of the casing in the pictures so you can look inside).
Picture 2: Overview of the casing
Picture 3: 3D View of the casing
Tip: the casing should be to narrow for a player to stand or even crouch. Sometimes the Action Quake 2 unstick code has a little fault, and if you could actually stand there, you won't be able to get out. This effect can sometimes be encountered in the map Highrise for AQ2 in the building with the catapult.
Third Step: Lightning
When you make a test map with this escalator, you'll sure encounter a problem: some of the steps are pitch black. Why? Easy: these are the steps which are under the floor while calculating the lights - the Q2 engine sets all moving parts (like doors and func_trains) at their start positions and calculates the light they get there. So we'll have to do the lights for this brushes ourself. The two steps which aren't lit are the ones at the bottom of the escalator. Select the last one and edit the textures of the upper and front side. Assign both of them the Surface flag light and a light value of about 50 (worked with my lightnings, just play around a little bit). Repeat this step for the other step. Now you understand why I said above that you should place the light in front and above - if you place the lights in a way that the steps were in the shadow by half, you've got a serious problem...
Last Step: Make it "unblockable"
Our escalator is done - nearly. There's only one problem: when a person stands on the escalator and reaches the top, it will be squished and the escalator will block. That's nonsense, nobody could get squished by an escalator (normally :-), nor it will stop if it happens. So what can we do to change this?
With a little imagination the solution is really simple: we don't use the escalator for moving... we use some invisible brushes above it as conveyor. So let's have a look at pictures 4 and 5. The selected brushes (red) are the ones moving the player. As you can see there are three new brushes: 2 triangle like and one trapezoid (from the side view). These are our "movers". We use the e1u1/clip texture and assign them the following surface settings:
- Surface flags: nodraw
- Content flags: playerclip, monsterclip, current_270 (or whichever direction you've choosen)
Picture 4: The clip brushes which really move the player
Picture 5: The same in a 3D Version
Now you've got working escalators which don't hurt the players and run smoothly!
That's all folks!
I hope that this tutorial has cleared up the map making specials of quake 2 a little bit. As you can see, you just have to use a little bit imagination and combination of features to get the desired results. If you have further questions, just send me an email or even better: Ask your questions in the forums about mapmaking at rust, the Action Quake 2 Mapdepot or the mapmaking forum of Terror Quake 2 (the last one is read by me on a regular basis, so if you want me to answer your question, then you should consider asking there ;)
If you liked this tutorial it would be nice if you visit my personal homepage and the Rock-Clan homepage (the place you'll find other tutorials, maps and skies made by me).