Snarkpit Articles


Here I will explain how to make a nifty rotating door for HL2 or any of its mods. Also check out our func_door_rotating tutorial for details on more advanced doors.

First we will make a court yard divided by a wall. So, how will our player get from one side to the other? Through a door!



Above is the court yard with a dividing wall, this is where we will place our door.



Create a doorway- perhaps with the carve tool- and note that I am using the dev_measuredoor01 texture to help get the dimensions right (they are printed right there on the texture!)



After we have the door we have to make the frame. This is easy because the frame is part of the door texture. All we have to do is cut along the white lines just like you see above. Be sure to change your grid size ( "[" and "]" keys) so you dont cut too much!



We now can make this simple brush into a rotating door! Simply press the toEntity button (or press ctrl+T) and use the drop down menu under to find func_door_rotating.

Ok the hard part is over, you can leave most of the values on default. But we don't want just some crappy door, we want something people will believe is a door! First lets add some sounds.

(NOTE: sound is great in CS:S because it can alert the enemy and make the player think twice about using it... But don't over use sound, too many doors with the same sound will drive people mad)

speed 150
-in multi-player faster is better so people don't get stuck on the door
Start Sound Doors.Move3
Stop Sound Doors.FullClose3
-there are many sounds to choose from, in the sound menu filter "door"
Delay Before Reset (-1 stay) 4
-4 is the default, the higher the number the longer the door stays open before it closes its self. you can set -1 so the door stays open.
Distance 110
-this is how far in degrees the door will swing open.

Lets take a look at the Flags tab now.

(NOTE: be sure to press the Apply button, this sets all the options to the door you just made. If you don't press apply you wont see any flags!)



Most of these options speak for themselves. So I wont go over all of them.

X Axis & Y axis These will change the way the door rotates (don't check these, they are used when you make a door that swings up and down)
Use Open If checked the player will have to press +use (the E key in game) to open the door
Touch Opens This is the default, the door will open if the player bumps into it.

Now to complete the project! Press Apply and exit the properties box. resize the door like in the picture below.



That's a better size for a door.

Because this is a rotating door we need to tell the game where the door will rotate. If you used to map for HL1 you will remember the Origin Brush, but now we have no need for that! All entities now have an origin built in, see the circle in the middle of the door?

That is the origin, imagine that a vertical line travels through that circle. That line is the point where the door will rotate around. All we have to do is drag that circle to the point where the door's hinges would be.



Just like that.

Congratulations! you've made your first rotating door! Now just slap a texture on it and have fun.



Post ReplyView Topic
Discussion
0 starsPosted by kingtoke on Wed Dec 15th 2004 at 6:04pm

The dev/measuredoor texture doesn't exist in my editor, im using CS:S, is it simply a Hl2 texture, or have i to do something to set up my editor to encompass this. ( i set up my editor before the full SDK was released)
0 starsPosted by Yellonet on Tue Dec 14th 2004 at 10:36pm

I already knew how to make a door... but I really want to know how you can make it just swing open in one direction. It should be openable from both sides, but only open to one side.
Post ReplyView Topic