Blowout Doors: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 14: Line 14:


== Transformation ==
== Transformation ==
In order to provide the door with physical properties, the <code>[[phys_convert]]</code> entity is used.


Here, we are going to place a [[phys_convert]] in the map
Place this entity nearby your door and set the following values:
 
* <code>Name</code>: DoorConverter
Name : DoorConverter
* <code>Entity to convert</code>: Door
Entity to convert: Door
 
The [[phys_convert]] entity, is an entity that can convert any other into a physic entity, in that case the door.
 


== The Explosion ==
== The Explosion ==

Revision as of 03:36, 21 January 2006

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

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.

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_detail from the list. You should now have a door and a frame as in fig. 2.
  4. If you'd prefer your frame not have any collisions, you can change the entity to a func_brush and select Not Solid in the Solidity field.

Transformation

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

Place this entity nearby your door and set the following values:

  • Name: DoorConverter
  • Entity to convert: Door

The Explosion

This part is in case you want the door to explode

Simply put an env_explosion in the other side you want to door to blow at. For example, if you want your door to blow and fly to the east, put the env_explosion to the west, if you want it to blow to the west, put the env_explosion to the east...ect...

Now, the env_explosion is just the visible part for the explosion, but if you really want your door to FLY you must put an env_physexplosion

This entity is like an env_explosion but its more for physics, and it does not has a physical explosion.

So put it near the env_explosion

Name : DoorPhysExplosion Magnitude : Depends on the size of the door Clamp Radius : This is the radius at which the physexplosion touches the physics, if you don't want all the physics near the door moving and killing your fps, then put the radius only so it includes the door.

The Trigger

Now, put a logic_relay in your map

Name: RelayDoorBlow

In the outputs

OnTrigger : DoorPhysExplosion Explode Delay 0

OnTrigger : DoorExplosion Explode Delay 0

Now all you have to do so your door explodes, is to trigger the logic_relay RelayDoorblows and your done!

If you want more, put a func_smokevolume for smoke

Here is how to use the smokevolume :


The 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.