|
|
|
| |||||||||||||||||||
Breakable DoorThere are other Door tutorials on this site In this project we are going to create a door that will function they way you would expect and can be destroyed. The first thing is to determine the size of the door you need. With Prop doors, (Model doors), I place the door and then build the wall around it. This door allows us a bit more flexibility in that we need only be concerned with the player height/width and the appearance we desire. I’m re-using the mini map from the Prop door tutorial for this so our breakable door is going to have the same size as the previous one. Create a brush with the nodraw texture: 4 x 48 x 109 units (The wall is 4 units thick) ![]() Now let’s texture our brush based door. Door faces: wood/wooddoor008a Door edges: plaster/plasterwall012a Use the Face Edit tool to apply any textures you like for your door. Some textures, filter with keyword “door”, have door handles and windows, of course these are not functional. Note: You can create your own handle from small brushes, just for appearance. Now select the door and press Ctrl+T then convert your door to func_door_rotating. Set these properties: Name: door01 (Set any other properties you may want, such as sounds and speed.) Flags: Use Opens: Checked Turn on the Hammer Helpers (Little globe on top toolbar) and in the 2D Top View port drag the helper handle until you have created the hinge for your door. ![]() Create another brush with the nodraw texture the same size as your door except for the width which will be one unit thicker than the door on both faces. 6 x 48 x 109 units. Tie this brush to func_breakable and move it so it covers your door. (The door will be inside of it.) Set these Properties: Name: door02 Disable Shadows: Yes Parent: door1 Prop Data: None Strength: 90 Material Type: Wood Disable Receiving Shadows: Yes Flags: None are Checked Note: This door can be Flagged to open in one direction and reverse direction. ![]() Now set these Outputs for the func_breakable: OnBreak, door1, Kill OnUser1, door1, Toggle This is but one method for creating a door that can be destroyed; I believe this may is best. When the player presses the Use key our door will either open or close. If the door gets a lot of damage it will break apart and then it will be gone. ![]() The hardest part of this method has to be texturing the door, you may need to Scale and Shift the door texture you want to use, but it shouldn’t be too difficult. Have fun. |