Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Door tutorial.

Recommended Posts

Ok, I remember reading at least one person's comments about how they were having trouble with doors, and for a while I was also having problems with doors appearing perpendicular to the doorway they were supposed to be in (while they were shown as being properly aligned on the map), but after some tweaking I managed to figure out what was I was doing wrong. So, to prevent anyone else from dealing with the trouble I had to, here is a tutorial on simple doors.

In this lesson we'll be making three doors; two model based, and one brush based. Start off by making a brush 512 units (left to right)long and 128 units wide (on grid '4' it will be 8 large blocks by 2 large block, with a thickness of one small block) and lower it so that the top of the brush is hitting 0 on your 'Z' perspective. Press spacebar to make a duplicate and raise it so that the bottom of the brush is at the 128 on the 'Z' perspective. Now go ahead and make your walls along the outside to enclose this 'room'. So now you have a free 512x128x128 of space to work with.

Lets start off with a brush based door. At about 128 units into the room make a brush 128x128x16 (centered on the 128 unit point). Now, with the brush selected, go into Entity tab on the Inspectors window. Under the Entity Class label, scroll up to func_door and press Create. That's it. It's a door now. All you have to do now is tell it how to open. That's the important part, mind you. If you don't tell a door how to open then some buggy crap can happen (such as the perpendicular door problem I ran into). Notice in the lower left corner of the Entity tab that there is a set of buttons (angles) going counterclockwise. That's what you'll use to tell you're door how to open. Go ahead and select 90 for now. (If you're working from left to right on your room, then [from the start position on the left of the map] the door will slide to your left as you approach is; basically the degrees correspond to the XY top alignment). Now the door should be functional.

But what if you want to go beyond just a flat door? What if you want to use some of the models from the game? Lets get a little saucy and make a doorway with two doors, sliding left and right, shall we? First of all, lets get a doorframe in place so we know where to put our doors. At the 256 unit mark (center) Right Click, and go to New Model. The frame we want is under base/models/mapobjects/doors/techdoor2/techdr2frame.lwo. The model should appear on your map, and you can not center it at the 256 unit mark. (*Note* If you ever select a model and it appears as a black square, just press spacebar to duplicate it, and the duplicated version should appear properly; you just have to delete the original after that [thanks to BNA! for figuring that one out]) Now, just for asthetic purposes, you can go to grid size '1' and raise this model a single unit off the ground so the textures don't fight with each other. However, it's not exactely necessary to learning the process, so you can skip that if you wish.

Now that our door frame is in place, lets place our doors. Right-click and under func go to func_door. This spawns a generic block. In the lower right part of the Entity tab select model. In the same place you found techdr2frame.lwo you'll find techdr2lft.lwo and techdr2rt.lwo. Select whichever one you wish, all you're doing for the moment is aligning them with your doorway. Notice how there's a red dot on the bottom of the door models? That corresponds with the red dot on the bottom of the doorway, so you'll be able to line it up perfectly. Ok, so now that you have your doors lined up, it's time to tell them what to do. In top down view, select the door that is in the uppermost position (should be techdr2lft), and select 90 for it's movedir. Now escape and select the lower door (techdr2rt) and choose 270 for it. Now each of the doors will slide away from the center.

I'm sure you're probably thinking 'Damn, this is so easy, I can do this with my eyes closed', and you're probably right, but lets do one last door just for the hell of it. Our last door will be centered at 384 units (from the left), and although it's taller and thinner than our walkway, it'll still serve as practice. Our doorway will be at base/models/mapobjects/doors/cavedoor1/cavedoor1frm.lwo with the door parts being cavedoor1dn.lwo and cavedoor1up. Go ahead and put everything together as you did with the previous door (frame as model, door panels and func_door). Now, for door panels that move up and down, you won't be using the degrees as you would for sliding doors. But what's that right next to them? That's right, for the bottem panel select Dn (moverdir -2) and for the top panel select Up (movedir -1). Now just add a start position, a light or two, BSP the map, save it, and press F2 to load Doom3 and test it out.

Share this post

Link to post

i made an airlock-style one through one of Doom3World's tutorials, but this seems a hellll of alot easier, ill try it.

O, might you know how to activate the door with a GUI???

Share this post

Link to post

I haven't learned how to do GUIs yet, but as soon as I learn how (or learn anything else as far as door creation for that matter) I'll be sure to update this post with that info.

Share this post

Link to post

Thanks for the well written tutorial. I've made doors before in 3d games (Half-Life, HeXen II, Quake) but haven't done any of that kind of editing in ages so I was very rusty. I was also scratching my head the other day as to getting the models in the game.... now I know how. Your tutorial helped me twice so that's cool.

By the way what's with the big block on the doorframe that isn't renedered in the game? Is that supposed to line up with the existing floor somehow (didn't look like it to me)...

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this