VERC: Torching Open A Door (OpFor) Last edited 5 years ago2019-04-15 08:04:23 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

Introduction

Among the many new things the Half-Life: Opposing Force expansion pack introduces, one of the most interesting is the engineer NPC. It is possible to use him to open doors that are not accessibe to the player, for example, by cutting them open with a blowtorch.

Reference

The process of torching open a door is controlled almost entirely by using scripted_sequences. There are also some sentences available that you might want to use (with a scripted_sentence entity). The following information all applies to the monster_human_torch_ally engineer NPC.

Model Animations

Sentences

Setup

The Script

The first thing you need to do is script out how sequence is going to be played out. For this tutorial, I'm using the following "script":

Step #1

Player leads engineer to door area, engineer runs to the door, engineer lights torch.

This is a combination of two things. First, the player has to +use the engineer and lead him into the area where a scripted_sequence will find him. Setting up the scripted_sequence is the second part.

Place a scripted_sequence entity near the door (somewhere within a 128 unit radius of the door, but this is just my preference) that will be cut. Select it and set the following properties.

Step #2

Ah, yes, the all important witty remark.

Once the first script is completed, it activates 'script2'. The 'script2' event is obviously the next scripted_sequence that will be run, but it's also the name of a scripted_sentence. Place a scripted_sentence entity. It's location is unimportant but it should be kept near the door to keep everything in one area. Select it and set the following properties.

Step #3

Cutting around the door.

Once the script from step #1 is completed, as I mention above it activates 'script2'. Now we will create the scripted_sequence called script2. First of all, placement of this scripted_sequence is very important. The animation is meant to be applied on a door of the standard size - 64 units wide by 96 units tall. The scripted_sequence must be centered on the door, and placed 30 units away from it for it to work and look right. Once it is in place, select it and set the following properties.

Step #4

Hey devil doll, lets kick it!

So, the engineer has cut around the door, but that's all. The door is still there. The door must be kicked in! You are a lazy corporal, but thankfully your engineer is still eager to help. Along with the kicking effect are a few other effects that will go along with this. The door (a func_door_rotating) will rotate 90 degrees at a speed of 500 as the engineer kicks it in, debris (from an env_shooter) will shower down from the broken door frame, the ground will shake (with an env_shake), and the door will go boom as it hits the ground (an ambient_generic). This is all controlled by a multi_manager. For more information on these effects, please look at the example map included in this tutorial.

Note: The multi_manager in the example map is named script3. It is triggered at the same time the following scripted_sequence is so it can properly coordinate the events.

Now, create a new scripted_sequence entity in the exact same location as the last one from step #3. Select it and set the following properties.

Step #5

Engineers moves out of the way of the player and draws his gun.

Once the door is opened, you'll want the engineer to fall back and await orders. This is an especially good idea because its frustrating when an NPC is left blocking a door and you need to draw him out. So, create a scripted_sequence somewhere beside and away from the door. Select it and set its properties as follows. That's that. As you can see, the various animations give you a number of options for how you'd like to play the sequence out. When using this kind of thing, keep in mind that if the use of the engineer is the only way a player can progress through a level, you'll need to make use of trigger_autosaves and set the engineer's trigger conditions so he activates a player_loadsaved entity.
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.