Onliners

Affiliates

The Bendy Door

By Chris 'autolycus' Bokitch

Introduction

There was a scene (er, well it was like a scene) in Half-Life where an alien busts through a door. He didn't just bust through the door though. He pounded against it a few times first. Each time he pounded, the door would bulge out a little bit where, presumably, the alien's blows landed. It was a really cool effect and it's something that you can easily add to your own level.

How is it done?

The technique is actually pretty simple. The door is composed of three groups of (one of more) objects.

The normal door

The door bulges

The broken door

Initially, the normal door is shown. Some event is needed to trigger stage two (ie: the player activates a trigger_once), then the door bulges start to appear, commonly accompanied by sounds of banging. After a certain amount of time, the door enters stage 3 (broken open), possibly accompanied by an explosion and debris.

Example

The example below takes you through this process in more detail. You will be creating a door that gets shot open by a group of grunts.

The first thing you do is create the control entities. In the picture below, the control entities are the two blue entities to the left of the door. (The grey entities are game_text entities and are not relevant to this tutorial.)

The first control entity is a trigger_auto entity. The following values were set:

In the multi_manager properties listed above, everything listed after the Name property are key/delay pairs. The keys are the Name's of entities that will be created later in this example, and the delay values are the delays that will occur between when the multi_manager is activated and when the listed events will be triggered.

The above two entites automatically run through the door bending events with no interaction from the player. If you wanted the player to activate these events by walking through a trigger, you'd use a trigger_once entity instead.

Now, as shown in the above picture, create the door. Select the door object and press Ctrl+T to turn it into a func_wall_toggle entity. In the func_wall_toggle properties, set the Name (targetname) to "door1".

Now we'll create the door's bulges (the one's that occur when the door gets hit by the gunfire). As shown in the picture above, each bulge is a six-sided spike. I've used the clipping tool to clip off the end of each spike. Create three spikes, turning each into a func_wall_toggle entity. In their properties, set their names to "bulge1", "bulge2", and "bulge3". Also, in each of their flag properties, enable the "Starts Invisible" flag.

It's not shown in this picture, but also create an ambient_generic entity on the side of the door opposite the bulges. This sound will get played each time a bulge is created to simulate the gunfire. In it's properties, set the following values:

Name (targetname) - "sound1"

WAV Name (message) - "ambience/biggun3.wav"

In the ambient_generic flag properties, enable the "Large Radius", "Start Silent", and "Is NOT Looped" flags.

Now we've got another fairly simple task - creating the broken door. For the example map, I made a copy of the original door in the exact same place, then I clipped it into a number of pieces. Some of the pieces I then deleted, and others I clipped more to create a jagged opening.

Select all of the broken door pieces and press Ctrl+T to turn them into a func_wall_toggle entity. In the entity properties, set the Name (targetname) to "door2". In the flag properties, enable the "Starts Invisible" flag.

Finally, we create the explosion and debris effects. In the above picture, there are 6 orange entities. The five outside ones are env_shooter entities. All of them have the following properties.

Name (targetname) - "explosion1"

Model Name (shootmodel) - "models/metalplategibs.mdl"

Material Sound (shootsounds) - Metal ("")

In addition, set the angle compass for the env_shooter entities so that they are aimed away from the door in the direction the explosion would shoot them (so, generally towards the player).

The middle of the six is an env_explosion entity. Set it's Name (targetname) to "explosion1". In the example map, I've also enabled the "No Damage" flag, but this is a matter of preference.

Last, throw some grunts behind the door. When the door sequence ends (with the gaping hole), they'll attack the player on site, so be prepared.