![]() ![]() ![]() Lesson 17 - Rotating Doors (Using Hipnotic's Pack)Hello again. Welcome back to class! If you've played the Quake Mission Pack #1 - Scourge of Armagon, you already know there are some cool new entities made by the guys at Ritual Entertainment (formerly Hipnotic). Some of the more interesting entities are the ones that allow you to make rotating objects. They allow for some neat effects in your levels, but there are some tricks to making them work properly. Since there is a lot of buzz right now about this pack, I thought a lesson on making rotating doors in BSP might be in order, so pull up a chair and let's dig in. This is going to be a long lesson, so we've got a lot of work ahead of us... Before we get started, there are some things you need in order to get these new entities to run:
Once again, in the interest of speeding things up, I have made a map for us to start with. Basically, it's two rooms, with a wall between them. There is a doorway cut out of the wall and a pit in the floor for our door to rest in when it's open. You can download it here. Now, with all that set up, load the map file into BSP (making sure you have the new ENTS.QC file) and let's get started... All right, the first thing we need to do is check our Worldspawn Entity to make sure there is no directory information on the texture wad name. Make sure no brushes are selected and switch over to the Entity Window. You should see "wad" "quake101.wad" listed in the box in the middle of the window. If you see a path before 'quake101.wad', then double-click on this and then edit the path in the Value box. Change it to read "quake101.wad" with no path (leave off the quotes). Click on 'OK' to make the change effective. The reason we have to do this is that older versions of BSP added this path statement and stored it in your map file. The newer versions of BSP don't do this, so you may not have to fix anything here. The new QBSP will crash if there is a path given here, so we have to delete it. Thanks to Chris Williams, Troy Dooley and Phillip Mansfield for figuring this out and sending the info to MagicMan. By the way, I made this map with the Quake101.wad file (obviously). If you don't have this wad, you may have to change some textures to match a wad you do have. If you try to compile the level and get a 'Bad Surface Extent' error, this is probably the problem. Just thought you would like to know. Now that we've taken care of that, let's make a brush for the door. Switch to the Front View and draw a brush from (-208, 128) to (-80, 0). Switch to the Top View and drag the northern edge of the brush to 144 and the southern edge to 112. This should make it line up with the center wall. Pick a texture you want to use for your door. I used WIZWOOD1_2. Switch back to the Front View and clip this brush from (-176, 128) to (-208, 96) and from (-80, 96) to (-112, 128). This will make it fit into our doorway. With that brush still selected, switch over to the Entity Window and make it into a 'rotate_object' entity. In order to rotate an object, you have to have a point around which it rotates. For that we need to make a new entity. Switch to the Top View and draw a 16x16 brush, centered on (-144, 128). In a side view make this brush 16 units high and drag it so that the top is at -8 on the Z axis. Now make this into a 'func_rotate_door' entity. This will be our point of rotation. How did I find where to put this point? Lots of trial and error. I ran this map several times, moving the entity around until I got it just right. In doing so, I learned something interesting. Where this entity is located seems to affect the texture alignment on the object it's rotating. That was kind of strange. I don't know if it's a quirk in Quake or BSP, but be aware of it. With this 'func_rotate_door' still selected, add two key/value pairs. The first is 'rotate' '0 0 90'. The second is 'angles' '0 0 90'. Note it is 'angles' not 'angle'. Both of these work together to make your door rotate. The first number in the series controls how much the door rotates in the X-axis; the second is the Y-axis and the third is the Z-axis. Since we want our door to lower to the ground, we want it to rotate 90 degrees in the Z-axis. Now switch back over to the Front View and with this new entity selected, CTRL-CLICK on the door entity. This will link them together and tell Quake what object we want this entity to rotate. De-select all brushes and select the door brush. Now, CTRL-CLICK on the rotate entity. I'm not sure why this is required, but it won't work without it. They both have to be linked to each other, not just one way, for it to work properly. Our door is now complete, but let's make a button to trigger it. Switch to the Top View and make a 32x32 brush centered on (-144, -104). In a side view make this brush 8 units high and drag it down so it sits on the floor. Give it a texture of +AFLOORSW, with a T value of +16 and an SX of .5 and an SY of .5. This should make a button on the floor with the texture properly aligned. Make this brush into a 'func_button' entity with a DN angle. With this button selected, CTRL-CLICK on the 'func_rotate_door' entity to link them together. Well, we should be ready to compile our map now. Here's where the fun begins... The following instructions work for me. If you know of a better way, by all means let me know: Save your map file as lesson17.map. Now copy your map file over to the C:\QUAKE\ID1\MAPS directory (or whatever you called it on your computer). Copy your texture wad (QUAKE101.WAD in my case) to the C:\QUAKE\ID1 directory - the directory immediately above the MAPS directory. The new QBSP looks for the wad in C:\QUAKE\ID1, but everything else has to be in MAPS. Go to an MS-DOS prompt and switch to C:\QUAKE\ID1\MAPS. Type the following commands:
If you get any errors from QBSP, check to make sure you have things set up properly. All files except your texture wad should be in the same directory (C:\QUAKE\ID1\MAPS). The texture wad should be in C:\QUAKE\ID1. The wad statement in your Worldspawn Entity should not have any path information on it. This works for me and a couple of friends, so it should work well for you. I think you could have made your wad entry '\maps\quake101.wad' in the Worldspawn Entity, but then then old QBSP won't work. Remember you only have to use this new QBSP and LIGHT if you want to use a rotating entity. Providing you got your map compiled and vis-ed without any errors, you are ready to run it in Quake. Start Quake with the '-game hipnotic' command line parameter. This assumes you installed the Hipnotic pack in C:\QUAKE\HIPNOTIC which is the default. You have to run it with this parameter to get the new entities to work with Quake. Hopefully you should see something like the following: ![]() Step on the button...
Thar she goes! After it's done, it looks like this:
Pretty cool, huh? Step on the button again and the door closes. Stand on the button and the door will open/close continuously. When you're done playing, make sure the door is open and walk over to stand on the door. What happened? Did you fall through? Thought so. It seems that rotating entities are not solid, so in order to prevent the player from walking through them, we'll need to do some magic to make them 'appear' solid. Actually, you can jump through the door while it's closed if you want. Not much of a door, eh? Switch back over to BSP. Go to the Right View window and draw a 32x32 brush, centered on (128, 16). Go to the Front View and drag the left edge of this brush to -208. Drag the right edge of this brush to -80. This should position it inside the door brush, at the bottom. Make this brush into a 'func_movewall' entity. This is a special entity designed to make invisible moving walls which are solid. Now we need to link this to the same rotating entity that our door is linked to, so select the Door entity and switch to the Entity Window. Look and see what the value is for the 'targetname' key. It's probably 't1', but check to make sure. Now select the func_movewall entity and give it a key/value of 'targetname' 't1' (or whatever value you saw in your map). This will give it the same link as the door has. It might be easier to do this if you drag the func_movewall entity out away from the door entity. This makes it easier to select it and make sure you're changing the value on the right entity. When you are done, copy it and paste three copies. Give each one a 'targetname' 't1' key/value pair and then move them so that they stack on top of each other and occupy the same space as the door. Re-compile your level in the same manner we did earlier - you are probably going to want to make a batch file if you do this very often. Now when you re-run your map, the door is solid and you can walk across it without falling through. Why do we have to make four movewalls? Well, the func_movewall entity doesn't rotate, it moves. If we made an entity the same size and shape as our door, it would merely move forward rather than rotating down into the floor like our door does. Then there would be an invisible wall blocking the player but it would be at the front edge of the door. If you want to see what I mean, select each of the movewall entities and set the VISIBLE flag. Then when you run Quake, you can see how they move. Just remember to clear the VISIBLE flag when you're done playing. That way you don't see them anymore. The best bet is to make a brush the same height and thickness as your door. then make enough of them so that they can stack together and occupy the same space as your door. Well, that should get a simple rotating door to work for you. Remember I said this was going to be a long lesson. Since we've put in such hard work, how about I show you something that's really cool (and pretty easy, too). Consider this a bonus for your hard work. If you've played around in Hipnotic's levels much, you know that you can control the gravity in various parts of your map. If you go to the HARD skill level hall in Hipnotic's start map, you know what I mean. There is one room where the gravity is a lot less than the rest of the level. Actually what happens is that while you're in that room, the gravity for you, not the room, has changed. To see what I mean, draw a 160 x 8 brush in the top view. Make this brush 140 units tall and position it so that it completely blocks the doorway from the front side. Now make this into 'trigger_setgravity' entity and give it a key/value pair of 'gravity' '101'. Now copy this entity and position it on the opposite side of the doorway, so that it blocks the doorway in the second room. Give this entity a key/value pair of 'gravity' '11'. Now compile and run your map in the same way you did earlier. Open the door and go into the second room. Now jump. Wheeee!! Gravity is really low now. Float back down to the floor and go back into the first room. Now jump again. Bummer! Gravity has returned to normal. Cool! Well, what do you say we take a break. We've been through a lot of material today, so you deserve a rest. Class is now dismissed. I'll play around with the Hipnotic entities some more and will probably cover them again in future lessons. For the next lesson, I think I'll return to regular Quake stuff and show you some odds and ends that are fun to make. See you soon... ![]() ![]() BSP is the sole creation of
Yahn Bernier. I am only a
dedicated user, reporting news and making tutorials so Yahn can spend
more time enhancing BSP. QUAKE is a registered trademark of Id Software,
Inc. QUAKE(r), the stylized reproduction of the QUAKE(r) trademark,
including, without limitation, the Q in QUAKE(r), and the images
depicted in QUAKE(r) are the copyrighted property of Id Software, Inc.
So there :-P
This web page was created and is being maintained by me (DeadMeat). The main logo for this site was made by QuakeGod. Most everything else was made by me.
All content appearing on this site after August 30, 1997 was written by DeadMeat. Also, DeadMeat's BSP Tutorials were created entirely by DeadMeat. All unauthorized use is prohibited. (c) 1997 |