Blowout Doors: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(finished cleaning. removed ''adding smoke'' as it didn't appear to work or add much to the tutorial.)
Line 1: Line 1:
[[Category:Level Design]]
[[Category:Level Design]]
[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]
{{cleanup}}


==Introduction==
==Introduction==
Line 37: Line 36:


To trigger the effect, you should trigger the <code>[[logic_relay]]</code> (e.g. with a <code>[[trigger_once]]</code>).
To trigger the effect, you should trigger the <code>[[logic_relay]]</code> (e.g. with a <code>[[trigger_once]]</code>).
===Adding Smoke===
Put a brush with trigger texture on it as big as you want your smoke to be, and tie it to [[func_smokevolume]], change the color to the color you want for your smoke, and put the density to 0
Now, to make you smoke appear, simply put :
SmokeVolume        SetDensity 1
And you'll have your smoke.

Revision as of 04:31, 21 January 2006


Introduction

This tutorial will detail how to create a door, which can be toggled open or closed, and will also detail how to make the door become a physics object. This is useful for when you require a simple door to be blown down, most likely for a scripted sequence which involves NPCs.

Construction

The Door

Fig. 1
Fig. 2
  1. Create your door as needed. See Creating Doors.
  2. Once you have created your door, you will need to create a door frame. To do this, use three brushes to create an outline of your door. For ideal performance, you should use vertex manipulation to slot the pieces of the frame together, as in fig. 1.
  3. Once your frame is complete, select all the pieces, press Ctrl + T to tie them to an entity, and select func_brush from the list. Then select Never Solid in the Solidity field. You should now have a door and a frame as in fig. 2.

Transformation

In order to transform the door and provide the door with physical properties, the phys_convert entity is used.

Place this entity near to your door and set the following values:

  • Name: DoorConverter
  • Entity to convert: Door

The Explosion

Fig. 3

To cause the 'blowout' effect, you need to place two explosion entities. To do so, follow these steps:

  1. Place an env_explosion entity on whichever side you want the door to be blown from. If you place it behind the door, the door will blow towards you. Name this entity DoorExplosion.
  2. To create the movement of the door, place an env_physexplosion entity in the same place as the env_explosion. You should also name this entity DoorExplosion.
  3. You should now have a set up similar to fig. 3.

Triggering the Effect

Place a logic_relay entity near to the door and name it RelayDoorBlow. Switch to the Outputs tab and add two new records:

  • OnTrigger > DoorConvert > ConvertTarget > Delay 0
  • OnTrigger > DoorExplosion > Explode > Delay 0

To trigger the effect, you should trigger the logic_relay (e.g. with a trigger_once).