This article relates to the game "Portal". Click here for more information.

Test Chamber Door

From Valve Developer Community
Jump to navigation Jump to search

English (en)Translate (Translate)

This tutorial will show step-by-step how to create the test chamber doors seen throughout the Portal test chambers. Test chamber doors are often used to gate the player until they have completed a puzzle, but can also be used as a puzzle element themselves.

Construction

Step 1

Create a 32w*128l*128h brush. Next use the clipping tool to create three horizontal clips at 24, 48 and 84 units from the top, respectively.

After that, select the second brush from the top and create a diagonal clip 48 units from the side of the brush at the top to 16 units in from the side at the bottom. Do the same thing on the other side of the brush and delete the wedge that remains in the middle.

Next, select the brush below the previous brush and create a diagonal clip from 16 units in from the side at the top to the bottom side corner of the brush. Do the same on the other side and delete the remaining wedge.

Now, select the bottommost brush and create a diagonal clip from the top side corner to 20 units in from the side at the bottom. Do the same thing on the other side of the brush, then delete the remaining wedge.

Finally, select all of the brushes and tie them to a func_detail entity. After that, texture the front and back sides with the same texture of the wall that the door is set into. Texture all of the remaining faces with tools/toolsnodraw.

Gallery (These photos have 4 unit grid snap)

Step 2

The door frame prop

Create a prop_static entity and set its World Model to models/props/door_01_frame_wide_reference.mdl. Align the door frame model within the frame brushes.

Step 3

The left door
The right door

Create a 8w*56l*104h brush textured with tools/toolsnodraw. Align it to the left of the center of the door frame, and tie this brush to a func_door entity. Make sure that all of its flags are unchecked and set the following keyvalues on it:

Property Name Value
Name door_left
Speed 250
Stop Sound Doors.FullClose8
Delay Before Reset -1
Lip 12
Move Direction 0 270 0

Next create an identical 8w*56l*104h nodraw textured brush, but align it to the right of the center of the door. Tie this brush to a func_door entity, make sure all of its flags are unchecked, and set the following keyvalues:

Property Name Value
Name door_right
Speed 250
Stop Sound Doors.FullClose8
Delay Before Reset -1
Lip 12
Move Direction 0 90 0

Step 4

The left door model
The right door model

Create a prop_dynamic entity and set the following keyvalues on it:

Property Name Value
Parent door_right
World Model models/props/door_01_rtdoor_reference.mdl
Name model_door_right

Align it so it covers door_right.

Next, create another prop_dynamic entity and set the following keyvalues on it:

Property Name Value
Parent door_left
World Model models/props/door_01_lftdoor_reference.mdl
Name model_door_left

Align this model so it covers door_left

Step 5

The info_lighting_relative entity

Create an info_lighting_relative entity in front of the door, about 56 units above the ground. Name this entity lighting_relative. Now set the Lighting Origin keyvalue of both model_door_right and model_door_left to lighting_relative.


The test chamber door is now finished and is ready to be implemented in a map.

Implementation

The test chamber door in-game

Step 1

Place the door within the wall the door should be in so that the sides of the frame brushes are flush with the wall. If the door is rotated, the Pitch Yaw Roll keyvalues of the doors must be altered so that the door opens in the right direction.

Step 2

Set up the item that should open the door so that it sends the Open input to both door_left and door_right when the door should open, and the Close input when the door shoul close.

See also