Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Door with breakable lock

From HalfLife 2 Knowledge Base

Jump to: navigation, search

by XCloudX


DESCRIPTION

In this tutorial we will be creating a locked door with a physical lock on it. This must be hit/broken in order to unlock and open the door.

CONSTRUCTION

1) Open the Hammer editor programme and create a basic room.

2) Create a prop_dynamic and name it doorgate01, give it the world model models/props_wasteland/exterior_fence003b.mdl.

tut15iu.th.jpg

3) Now create a brush using the Block Tool that is the same size as the world model, give it the texture Nodraw.
Note: You may want to set this to a new Visgroup, so we can hide this as it may get in the way.

tut24qw.th.jpg

4) Next, with the Nodraw block selected, press CTRL+T to tie it to an entity. Select func_door_rotating from the dropdown list. Name this doorgate01_pivot01. Turn on the flag 'Starts locked' Turn off the flag 'Touch Opens' and set the Delay before reset to -1.

tut37rf.th.jpg

5) Move the pivot point of the door (looks like a white circle in 2d. blue ball in 3d view) to the side of the door, This is where it will pivot.
I have my door handle on the right, so the pivot should go on the left.

6) Now select the doorgate01 (gate model) and parent it to the doorgate01_pivot01 (nodraw door)

7) Now create another prop_physics and name this doorgate01_lock01 and give it the world model models/props_wasteland/prison_padlock001a.mdl. Place it in a good position. Turn on the flags 'motion disabled' 'prevent pickup' and 'prevent motion on player bump'.

tut42jn.th.jpg

8) With the lock still selected, goto the outputs and add the following:

tut51dm.jpg




Example Map

Personal tools