Vlatitude Archive: Basic Doors Last edited 5 years ago2019-04-25 03:04:39 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
Doors are a critical part in every level. That's where this tutorial comes in, so roll up your sleeves and get ready to make some simple doors. Today we'll be covering making a simple door, triggering doors, and making double doors. New entities that we will be using are: func_door.

Simple Door

A basic door is a brush tied to the func_door entity. The func_door entity is very versatile and can be used for many things such as lifts. More on that in another tutorial. Ok first make your door and give it the texture of your choice, then select it and hit the To Entity button. Select func_door. Congratulations, you've just made your first door. Now compile and run your level and you'll notice it's a pretty damn boring door. It opens when you get close to it and makes no sound. Thankfully, we can change that. Select your door and hit Alt+Enter to get into its properties. The dropdown list for angle will let you select up or down. You can also make your door move left and right by setting the angle accordingly. 180 will make the door slide to the left (when looking from top down) and 0 (default) will make the door slide to the right (when looking from top down). Now for some sounds. If you look in the func_door 's attributes you'll notice move sound and stop sound. These are pretty self explanatory. Luckily you can select a sound from the dropdown list instead of having to type it in. If you want the player to have to press the use button to open the door then go into the flags tab and make sure use only is selected.

Triggering Doors

In this section we'll be talking about using triggers to open a door. We're going to start off with making a button to open a door and if you've read my Lighting Tutorial, then you should be familiar with buttons and the func_button entity. To make a button you make a brush and give it appropriate textures and then tie it to the func_button entity. Give you door a name and then put that name in the func_button 's targeted object attribute. For flags make sure Don't move and toggle are checked. You now have a button that will open your door.

Another way to trigger a door to open is to use trigger_once and trigger_multiple entities. For info on using these I suggest reading Vlad's Introduction to Triggers Tutorial.

Double Doors

You can make a double door by making two func_door doors and butting them up to each other. Included in the example map is a door that splits down the middle. Basically when one door gets triggered, it triggers the other, but sometimes that doesn't always happen. To keep that from happening, you can either make a button to open the doors or make a trigger_multiple brush in the door way and have it target the both doors by giving the two doors the same name. Stay tuned for my next tutorial on more advanced doors, the rotating door, and a momentary door.
This article was originally published on 69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.