User:Neobenedict/Creating a Turret door

From Valve Developer Community
< User:Neobenedict
Revision as of 03:44, 29 August 2019 by Mandrew (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Portal Level Creation
A turret door in the escape levels of Portal


This tutorial will teach you how to make a turret door which opens revealing a Turret, like in the Escape Levels of Portal, in Hammer Editor.

Step One: The Cube

End of step One

Firstly, create a block which is 192w x 160l x 160l. This is the size Valve uses in the game. If you want to make the box a bit longer, you can, but don't ajust the height and length. This is the box where the turret will be sitting, and where the door will be on. Make the cube hollow (I gave the walls a thickness of 4, but it doesn't matter). Now texture the inside walls with concrete_bts_modular_wall001b, the floor with concrete_bts_floor002a and finally the ceiling with concrete_bts_ceiling002a. If you have the guts to go into that place again, you'll see inside the ceiling has a hole in it with white light coming out of it. We'll get to that later.

Important: Press the "fit" button on each of the textures to make them look right.

Delete one of the walls (one on the front or back, long-wise) for the entrance. We're ready to move on. Don't texture the outside faces yet - You can do that when we move the block into a wall later on.

Step Two: The Door

Now for the fun bit. If you've read the door tutorial here, you'll already know what to do. If you haven't, I would advise you do that tutorial first before attempting this one!

End of step Two

Create a prop_static with a world model of vert_door_frame.mdl. Line it up with the box. Now, the box may be a little big for the frame. You can ajust that later.

Next, make a prop_dynamic with the world model of vert_door_upper.mdl, and name it turretDoor1_model_top and parent it to turretDoor1_top. Align it perfectly in the frame. Then, repeat, but this time make it with a world model of vert_door_lower.mdl. Parent it with turretDoor1_bottom, and name it turretDoor1_model_bottom.

Make a shape with dimensions of 120w x 4l x 81h Place it in the top door (align it perfectly, but a little bit behind the door in the box). Rotate it 90 degrees around Z. Turn it into a func_door and name it turretDoor1_top. Texture it with nodraw. Repeat for the bottom part, this time the dimensions are 120w x 4l x 48h and the name is turretDoor1_bottom!

Now you're done with the door... for now.

Step Three: The Script

Time to add in the things that make it move.

Create a logic_relay and place it inside the box. Call it turretDoor1_openRelay.

Give it the following outputs:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnTrigger turretDoor1_top Open <none> 2.00 No
Io11.png OnTrigger turretDoor1_bottom Open <none> 2.00 No

Next goto your turretDoor1_top and add this:

Property Name Value
Speed 30
Start Sound Portal.moving_pistons
Stop Sound Portal.stair_clack
Delay before Reset -1
Lip 20
Move Direction (This will be different for which way your door is facing)

Also make sure that you un-check Touch opens under Flags.

Repeat for turretDoor1_bottom, changing the Lip to 2, and not filling in the start/stop sound. Now you could just leave it at that, but it is kinda boring, isn't it? Lets move on.

Step Four: The Additions

I think first we need to put this in a wall. So go ahead, clip away. I don't need to tutor you on how to do that, surely?

When you've done that... make a button and test it to see if it opens right. If you can not see the doors (the whole door) after they open, move ahead. If you can, start ajusting so you can't.

See Also