Pick up the crowbar of research scientist Gordon Freeman, who finds himself on an alien-infested Earth being picked to the bone, its resources depleted, its populace dwindling. Freeman is thrust into the unenviable role of rescuing the world from the wrong he unleashed back at Black Mesa. And a lot of people, people he cares about, are counting on him.

Post tutorial Report RSS Metrocop kicking down a door

Learn how to make a Combine officer kick down the door of a room that your player is in.

Posted by on - Intermediate Mapping/Technical

In this tutorial, you will learn how to make a Combine metro police officer kick down a door. This is an effective cinematic scripted sequence that can really freak out your players if done properly. This tutorial assumes intermediate knowledge of Hammer.

(Note: I’ve cut away the walls so you can see better.)
Firstly, construct two small, connected rooms linked with a doorway as in the picture.
Tutorial Image
Create a “prop_door_rotating” and set the “World Model” property to models/props_c17/door01_left.mdl. Place it in your doorway.
Tutorial Image
Name it “Door” and set the “Speed” property to 250. The only flag that should be checked is “Ignore player +use.”
Tutorial Image

Next create an “npc_metropolice” entity behind the door. Name him “cop”. All of his other properties and flags are optional. The player won’t even see him until he kicks the door open.
Tutorial Image
Go to his “Model” tab and select “Kickdoorbaton”. You can now see how far the cop’s foot extends when he kicks. Move him forward or back so that his foot just starts to go through the door.
Tutorial Image
{Note: I apologize, in this picture, I have already added a scripted_sequence and am too lazy to retake it. Please ignore the presence of the scripted_sequence.}

Next, create a “scripted_sequence” somewhere on the map, preferably behind the cop.
Tutorial Image
Name it “DoorKick”. The properties should be as follows.

Name: DoorKick
Parent: (Blank)
PitchYawRoll: (Unnecessary)
Target Npc: Cop
Pre action idle animation: (Not necessary, the player won’t see him at the time.)
Entry Animation: (none)
Action Animation: Kickdoorbaton
{Leave the rest as default, except for…}
Move to position: No
On player death: Do nothing.

Next, create an “ambient_generic” somewhere near the door.
Tutorial Image
Create the following properties for it.

Name: Knock
Sound Name: ambient/materials/clang1.wav (or some other similar sound)
Volume: 9 or 10.

Next, create another ambient_generic entity.
Tutorial Image
Set the following properties:

Name: Bam!
Sound Name: ambient/materials/door_hit1.wav
Volume: 10

The rest of the properties are fine as they are.

Once this is done, create a logic_auto somewhere in the corner.
Tutorial Image
Add the outputs in the picture below.
Tutorial Image

After doing this, return to your scripted_sequence. Click on the “Outputs” tab. Add the following outputs.

My Output Named: OnBeginSequence
Target Entities Named: Door
Via This Input: OpenAwayFrom
After a delay in seconds of: 0.75

My Output Named: OnBeginSequence
Target Entities Named: Bam!
Via This Input: PlaySound
After a delay in seconds of: 0.75
Tutorial Image

Believe it or not, at this point, you’re pretty much done. Create an info_player_start somewhere in the map and run it (making sure that yours has walls, unlike my example :p ).
Tutorial Image
If you did everything correctly, the map will load up, and after about three seconds, you should hear three loud knocks on the door. A few seconds later, the door will be kicked open by the cop. If you’re having trouble seeing it, you can turn go to the console by pressing the ~ tilde key. (You may have to turn on “enable developer console” under “Advanced Options” of the “Keyboard” tab in the options menu.) Enter “mat_wireframe 1” in the console and press enter. Oooh, pretty Tron effects… but seriously you can see what the cop is doing behind the wall.

If this is all that you wanted to do, than great, but chances are that you wanted the cop to actually enter the room after knocking the door down. I will cover that next...

Create a “path_corner” entity in the middle of the room that the metro cop enters. Name it “Corner”.
Tutorial Image
{Once again, please ignore the ground nodes in the picture :/}

Next, create a “aiscripted_schedule”.
Tutorial Image
Name it “schedule” Set the “Target Npc” property to “Cop”, and the “Goal Entity” to “Corner”.

Return to your “logic_auto” and click on the “Outputs” tab. Add the following output:

My Output Named: OnMapSpawn
Target Entities Named: Schedule
Target Input: StartSchedule
After a delay in seconds of: 7.5
Tutorial Image
Finally, add in a bunch of “info_node” entities. As far as I know, there’s no exact science to this, so just pretty much cover the floor with them.
Tutorial Image
If you haven’t already, create an info_player_start somewhere in the room and run the map. If you don’t want the cop to attack the player as he enters, you can create an “ai_relationship” entity somewhere on the map.
Tutorial Image
If you do, set the properties to:

Name: (Unnecessary)
Subject: npc_metropolice
Target: !player
Disposition: Like
Radius for subject: 0
Disposition priority: 10
Start Active: Yes
Reciprocal: (Unnecessary)

Now, after the cop kicks in the door, he will come inside the room. Congratulations! You’re done!

The finished map
The finished map


As a completely optional extra bit, I will write out how to make a change to this sequence, in which after the cop kicks down the
door, his escort of two soldiers enters the room with weapons drawn, followed by him. This is just for those interested.

Extra Bit

Firstly, if your rooms were as small as mine were in the tutorial images, I reccomend that you make them larger. {You don't need to worry about having so many nodes yet}
Tutorial Image

Next, create two "npc_combine_s" entities behind the cop, as sort of a guard or escort. Name them "Soldier1" and "Soldier2".
Tutorial Image

Move your path_corner from here
Tutorial Image
To here.
Tutorial Image

This is where the cop will backpedal to, allowing the soldiers to enter the room first.
Go to the properties of your cop and change"Pistol Starts Drawn" to "Yes" if you haven't done so already.
Tutorial Image

Go to your "logic_auto" and change the following output:

My output named: OnMapSpawn
Target entity: Schedule
Trget Input: Start Schedule
Delay: (Change to 6.75)
Tutorial Image

Create a new "aiscripted_schedule" somewhere on the map. Give it the following properties:

Name: Soldier1Schedule
Target Npc: Soldier1
Search Radius: Unnesscesary
All in radius: No
Ai State to set: Set state to COMBAT
Schedule to run: Run to goal entity
Interuptability: Damage or death
Goal entity: (Nothing yet)
Tutorial Image

Create another aiscripted_schedule. Set the following properties:

Name: Soldier2Schedule
Target Npc: Soldier2
Search Radius: Unnesscesary
All in radius: No
Ai State to set: Set state to COMBAT
Schedule to run: Run to goal entity
Interuptability: Damage or death
Goal entity: (Nothing yet)

It's redundant, I know. Create one more aiscripted_schedule. Set the properties to the same as the last two, except for:

Name: copSchedule2
Target Npc: cop

Next, you're going to need a few path_corners in the room. Create one about here and name it "SoldierPath2".
Tutorial Image
Create one about here and name it "SoldierPath1".
Tutorial Image
Create one more about here and name it "copPath".
Tutorial Image

Return to your aiscripted_schedule entites and set the "Goal Entity" properties to the following:

Name: Soldier1Schedule
Set "Goal Entity" to: SoldierPath1

Name: Soldier2Schedule
Set "Goal Entity" to: SoldierPath2

Name: copSchedule2
Set "Goal Entity" to: copPath

Finally, go to your logic_auto. Change any outputs that may be different to the ones in the picture, and add the new ones.
Tutorial Image
{I hope that's clear enough to read...} You may have to fiddle with the timing of the schedules on here, depending on how far away the soldiers are from the door, etc, because only one soldier can fit through the door at a time. Messed-up timing here can make it look like an episode of The Three Stooges. Lastly, add in a bunch of nodes, pretty much covering the floor.
Tutorial Image
Combine soldiers are pretty picky about their nodes, so if they aren't getting to their path_corner properly, chances are that they either don't have enough nodes, or they are spaced too far apart.

Well, it appears that the "extra bit" has turned out to be longer than the actual tutorial. Sorry about that :/

For questions or feedback, you can email (hambandito@gmail.com) or PM me.

-Psalm

Post comment Comments
Sallycin
Sallycin - - 635 comments

Great tutorials, keep up the awesome work :D

Reply Good karma Bad karma+1 vote
Arxae
Arxae - - 718 comments

cool, what will your next tut be? :p
cant wait

Reply Good karma Bad karma+1 vote
Suduki
Suduki - - 49 comments

Nice you listen to people :D I can really use this. You would be the most awesome guy if you could make a cop that kicks a door open, and two(2) cops enter and the first enter after. That would be friggin awesome.

Reply Good karma Bad karma+1 vote
Psalm Author
Psalm - - 32 comments

Wow, thanks for the positive feedback everyone! Suduki, I think I know what you mean... I'll see what I can do :D

Reply Good karma+1 vote
Suduki
Suduki - - 49 comments

THAT IS SO FRIGGIN AWESOME!!!!!!!!!!!!!!!!!!!!!!!! YOU JUST MADE MY DAY!!!!!!!!!!!!!!! Gonna use this to convert my CSS map into a SP HL2 map :D Im out of requests now...

Reply Good karma Bad karma+2 votes
YelloSnoLvr
YelloSnoLvr - - 34 comments

wow sweet man

Reply Good karma Bad karma+1 vote
big_boy
big_boy - - 4 comments

sweet

Reply Good karma Bad karma+1 vote
BrianInSuwon
BrianInSuwon - - 2 comments

Great tutorial. I learned alot from it. The only problem I had was when the cop kicked the door. It didn't really move; it seemed stuck. But later..when the schedule kicked in..the door opened fine. Any thoughts?

Reply Good karma Bad karma+1 vote
MadWolf
MadWolf - - 29 comments

hi Great tutorial but the images are not working properly when i click the
image to go the the big version it opens Moddb.com

Reply Good karma Bad karma+1 vote
MadWolf
MadWolf - - 29 comments

hi

Reply Good karma Bad karma+1 vote
Triden007
Triden007 - - 243 comments

Really Good!

Everything worked nicely!
Looks like S.W.A.T tactics, really cool!

Reply Good karma Bad karma+1 vote
Wulfen91
Wulfen91 - - 1 comments

How am I supposed to add the outputs in the picture when you can't maximize it, help please.

Reply Good karma Bad karma+1 vote
Psalm Author
Psalm - - 32 comments

In case anyone can't read the properties in the 10th picture from the top, (of the Logic_Auto) here they are:

My Output Named: OnMapSpawn
Target Entities Named: knock
Via This Input: PlaySound
Delay: 3
Only Once: Yes

My Output Named: OnMapSpawn
Target Entities Named: knock
Via This Input: PlaySound
Delay: 3.2
Only Once:Yes

My Output Named: OnMapSpawn
Target Entities Named: knock
Via This Input: PlaySound
Delay: 3.4
Only Once:Yes

My Output Named: OnMapSpawn
Target Entities Named: doorkick
Via This Input: BeginSequence
Delay: 6.0
Only Once: Yes

Reply Good karma+1 vote
CrazyZach
CrazyZach - - 7 comments

THANK YOU SOOOOOOOOOOOOOOOOOO MUCH!!!! I was really worried there for a second.

Reply Good karma Bad karma+1 vote
i_speel_good
i_speel_good - - 88 comments

2021 and this guide is still helpful to people. Cheers.

Reply Good karma Bad karma+1 vote
aguywholikeshalflife
aguywholikeshalflife - - 34 comments

what about hl1 grunts kicking down doors?

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: