Source Mapping, Materials, Modeling and Code tutorials.
Main Custom Files All Downloads Search all TutorialsSearch all Tutorials
Hosted by GBC Game Design program
Check out more Source tutorials at City 7: Toronto Conflict
 

Printer Friendly

One-way door



There are other Door tutorials on this site

 This door can be Flagged to be Oneway and Reverse direction:  Breakable door

 These doors can be made to move in directions:  Sliding doors

 This is the most simple door:  Prop door


This tutorial was by request.
Several mappers recently requested a door that would only open in one direction and could also be used at angles.   For example, cellar doors that swing open.

With this project I also created a swinging door that can be broken.
That’s a bonus; I used it to create the other two doors.

Once you have created your brush based door and have it in place press Ctrl+T and make it a func_rot_button.
Button? Yes and I know that seems funny but it’s going to work just like a door and it will only open in the direction you want.

In the example I’ve created for this tutorial all three of the doors are identical to start with then two are converted to func_rot_button and of those two one will open in each direction but only in that direction.

Use the Hammer Helpers, (View, Show Helpers – or click the Diamond on the top toolbar), and place the hinge for your door.








Note: I’m not going into a lot of detail; please review the other Door tutorials for more information about some of these topics.

These are the properties for both func_rot_button doors:
Pitch Yaw Roll: 0 0 0
Speed: 100
Sounds: Squeaky
Delay Before Ret: 3
Distance: 90

Note: The Property Flags differ, this will determine the direction.

Flags for Right door:
Toggle: Checked
Use Activated: Checked

Flags for Left door:
Reverse Dir: Checked
Toggle: Checked
Use Activated: Checked

Both doors will open when the player presses the Use key, one door will open inward and the other outward but they will each only open in that direction, and they will wait if the player is blocking them, then they will complete their 90 degree turn.

These doors can be locked and unlocked and they can be opened or closed via inputs and you can make this door move at just about any angle you desire.

There’s a lot more you can do, I hope I’ve stimulated your imagination.Smile

  DownloadThe example used in this tutorial.





Valve, the Valve logo, Half-Life, the Half-Life logo, and the Lambda logo are trademarks and/or registered trademarks of Valve Corporation Site.