Snarkpit Articles


Doors are really one of easiest things to learn to do. The entities we will be dealing with (and there are only two door entitites!) are:

Func_door
Func_door_rotating

I shall be starting of with func_door_rotating, as it the easiest to master. This entity allows you to have a normal door that rotates on its hinge that you will fin in your home, for example. The func_door_rotating is made of two parts. First is the door itself, made of two parts- the brush that will be the door, and the ?hinge?. First off, create a brush with a suitable door texture applied to it. (NB: make sure that the doors thickness is less than that of the surrounding walls. Although this does not matter with the rotating door, when it comes to sliding doors, if the door is parallel to the wall, then both textures will merge and look ugly when the door slides) Now you?ve got your door, you need the ?hinge?- this is created by another brush covered in the origin texture. This brush needs to stand at one corner of the door, i.e. where the hinge would be on a normal door. The picture below shows this in Hammer:



Now all you need to do is click on ?toEntity? scroll down and find func_door_rotating and that?s about it for a func_door_rotating. You can change the distance setting so that the door can only open certain fraction of 90?; for example 70 means it only opens 7/9ths of the way. Its best to leave this though, as if the door doesn?t open enough, then the connectivity can suffer.

The second type of door this tutorial deals with is the standard func_door. This type of door is a sliding door, and moves for the length of the door on the plane its on for the length of the door. (It will move out of sight) func_door are created by having your brush with the appropriate textures on, then clicking ?toEntity? and selecting func_door. Unlike the rotating door, the sliding door requires a lot more use of their properties. In order for the door to slide the right way, you need to set the Yaw. Its difficult to explain this without a diagram, so have a look at this:



You can set the lip to a value, usually quite low, will mean that the door will stop x units away from its full slide. So a lip of 8 will stop eight units away from where it would if it had no lip. If you have two doors, and you want them to move apart, do the same except with two doors together. Now give both entities the name ?door1? or similar. Create a brush near your door and cover it with the AAATRIGGER texture. Click ?toEntity? and scroll to trigger_multiple. Now put the name of your door in the target field. And that?s it. Just compile it and test it.



Post ReplyView Topic
Discussion
0 starsPosted by tnkqwe on Sat Sep 29th 2007 at 6:26pm

Thanks
0 starsPosted by WillC on Wed Feb 14th 2007 at 4:38pm

Good tut, but how do you make the "hinge" work together with the door? I know the program doesn't know it is a hinge right off the bat.. Do you have to call the brush anything? Or what do you have to do? Where is the origin texture?
0 starsPosted by Le Chief on Fri Aug 25th 2006 at 9:15pm

Thanks man. I didn't know about the Yaw thing. But now I do so I'm going to make a sliding door now. For some reason, i thought Yaw pitch and roll didnt work.
0 starsPosted by lagrabit on Sat Mar 12th 2005 at 3:01am

You forgot to lick my c**k thats what u did wrong
0 starsPosted by keevee on Sat Sep 25th 2004 at 3:40am

Wtf i tried to door_rotating and first is was in some wierd part of the map then i put originin and made error, then i put to entity and said like nothing was visible. WHAT AM I DOING WRONG!!
0 starsPosted by parakeet on Sat May 1st 2004 at 2:37am

it seemed to help me out when i started
0 starsPosted by Sinner_D on Sat Feb 7th 2004 at 9:35pm

just a small addition, it is important to atleast set some of a lip, i have had problems with sliding doors flying off into space and come back from a different direction when there was no lip :O can u say weird?!?!

anyways, average tut for a beginner. GJ
0 starsPosted by Forceflow on Sat Feb 7th 2004 at 6:25pm

Good tut.
[author]
Posted by matt on Mon Jan 26th 2004 at 12:02pm

Yeah but no but yeah but ok then. Your right, it is up to the mapper.
0 starsPosted by Crono on Sun Jan 25th 2004 at 9:51pm

or sloppier? lol

I was just saying, if you do it the way I mentioned it's kind of a guarontee that your door will work. thats all. it is entirely up to the mapper.
Post ReplyView Topic