VERC: Torching Open A Door (OpFor) Last edited 15 years ago2003-03-05 01:52:00 UTC by Penguinboy Penguinboy

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a 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 (Link: index.php?game=opfor&ent=scripted_sequence) . There are also some sentences available that you might want to use (with a scripted_sentence (Link: index.php?ent=scripted_sentence) entity). The following information all applies to the monster_human_torch_ally (Link: index.php?game=opfor&ent=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. Note: If you'd chosen to make your engineer start without a gun, you'd instead use the pull_torch_nogun animation here.

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 (Link: index.php?ent=func_door_rotating) ) will rotate 90 degrees at a speed of 500 as the engineer kicks it in, debris (from an env_shooter (Link: index.php?ent=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 (Link: index.php?ent=ambient_generic) ). This is all controlled by a multi_manager (Link: index.php?ent=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.

Example

For a more concrete illustration, check out the example map linked below.
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.