Car Explosions: Difference between revisions
No edit summary |
(Rough clean-up.) |
||
Line 2: | Line 2: | ||
==Introduction== | ==Introduction== | ||
This tutorial will explain how to create an explosion effect for an automobile. You will require basic knowledge of the [[Valve Hammer Editor]]. This tutorial is not hard to follow and is an extended function of [[trigger_push]]. | |||
You | |||
This tutorial is not hard to follow | |||
==The Car== | ==The Car== | ||
To start, create a [[prop_physics_override]] | To start, create a [[prop_physics_override]] with the following settings. | ||
* '''Name:''' Car1 | * '''Name:''' Car1 | ||
Line 14: | Line 12: | ||
* '''MinDamageToHurt:''' 90 (I'll explain later) | * '''MinDamageToHurt:''' 90 (I'll explain later) | ||
Once the vehicle it created, it must be place above the ground level. | |||
In order to add more realism and interactivity, a fuel tank should be placed close to the car that will explode if shot. | |||
Create a brush on the car | Create a brush on the car whereever the fuel tank may be located, choose a good texture for a fuel tank and make the fuel tank a [[func_breakable]]. | ||
* '''Name:''' FuelTankCar1 | * '''Name:''' FuelTankCar1 | ||
Line 24: | Line 22: | ||
* '''MaterialType:''' Metal | * '''MaterialType:''' Metal | ||
For design purposes, the fuel tank may be a cylinder or another similar shape. | |||
==The Effects== | ==The Effects== | ||
Create five [[env_explosion]] entities and place them at five points around the vehicle, like on a die, i.e. the sides, front, back, and bottom. | |||
Create | |||
* '''Name:''' ExplosionCar1 | * '''Name:''' ExplosionCar1 | ||
Line 36: | Line 32: | ||
* '''Magnitude:''' 100 | * '''Magnitude:''' 100 | ||
Then create an [[env_physexplosion]] at the center of the | Then create an [[env_physexplosion]] entity at the center of the vehicle. | ||
* '''Name:''' PhysExplosionCar1 | * '''Name:''' PhysExplosionCar1 | ||
Line 42: | Line 38: | ||
* '''Magnitude:''' 500 | * '''Magnitude:''' 500 | ||
Create an [[env_smokestack]] entity and place it where the smoke will be emitted. | |||
* '''Name:''' SmokeCar1 | * '''Name:''' SmokeCar1 | ||
* '''Parent:''' Car1 | * '''Parent:''' Car1 | ||
* '''Color:''' | * '''Color:''' You may choose any color you wish. | ||
==The Thrust== | ==The Thrust== | ||
Though there are several explosion entities in place surrounding the car, it is still not enough to lift the car due to its weight. | |||
Create a brush at the center of the vehicle and make it large enough to encompass the top side while starting from the bottom. Apply the trigger texture and TieToEntity [[trigger_push]]. The car will fly as high as the trigger is configured. | |||
* '''Name:''' PushCar1 | * '''Name:''' PushCar1 | ||
Line 62: | Line 57: | ||
* '''Flags:''' OnlyOnce, Physics, Pushables | * '''Flags:''' OnlyOnce, Physics, Pushables | ||
Please make sure the Client flag is not enabled. | |||
==The Outputs== | ==The Outputs== | ||
At this point, the explosion effect will not work. The outputs of the car entity must now be configured in order for this to happen. | |||
First, go in the car's properties. | First, go in the car's properties. | ||
MinDamageToHurt allows entities to ignore all damage less than a specified amount and 90 is best for explosions like grenades and rockets. | |||
The outputs of the car entity should be as followed: | |||
{| | {| | ||
|+Car | |+'''Car Outputs''' | ||
! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ||
|- | |- | ||
Line 93: | Line 86: | ||
|} | |} | ||
The car will now ignore damage less than 90 and therefore, when a damage amount above 90 is applied to the car, the explosions ignite, the smoke starts, the fuel tank is destroyed, and the [[trigger_push]] entity loses its parents. If it is still parented to car1, the entity would pursue the car up in an infinite cycle. | |||
To destroy the Fuel Tank, the outputs of the car can be reused with OnHealthChanged changed to OnBreak to destroy it, like so: | |||
{| | {| | ||
|+Fuel | |+'''Fuel Tank Outputs''' | ||
! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ! || My Output || Target Entity || Target Input || Parameter || Delay || Only Once | ||
|- | |- | ||
Line 115: | Line 106: | ||
|} | |} | ||
The car outputs are not disabled by the fuel tank explosion such that the explosions would inflict damage to the car and cause a second explosion for added effect. | |||
The map can now be compiled and tested. | |||
[[Category:Level Design Tutorials]] | [[Category:Level Design Tutorials]] |
Revision as of 21:22, 22 February 2006

Introduction
This tutorial will explain how to create an explosion effect for an automobile. You will require basic knowledge of the Valve Hammer Editor. This tutorial is not hard to follow and is an extended function of trigger_push.
The Car
To start, create a prop_physics_override with the following settings.
- Name: Car1
- World Model: (In the prop_vehicles folder, choose a car with a physic model.)
- MinDamageToHurt: 90 (I'll explain later)
Once the vehicle it created, it must be place above the ground level.
In order to add more realism and interactivity, a fuel tank should be placed close to the car that will explode if shot.
Create a brush on the car whereever the fuel tank may be located, choose a good texture for a fuel tank and make the fuel tank a func_breakable.
- Name: FuelTankCar1
- Parent: Car1
- MaterialType: Metal
For design purposes, the fuel tank may be a cylinder or another similar shape.
The Effects
Create five env_explosion entities and place them at five points around the vehicle, like on a die, i.e. the sides, front, back, and bottom.
- Name: ExplosionCar1
- Parent: Car1
- Magnitude: 100
Then create an env_physexplosion entity at the center of the vehicle.
- Name: PhysExplosionCar1
- Parent: Car1
- Magnitude: 500
Create an env_smokestack entity and place it where the smoke will be emitted.
- Name: SmokeCar1
- Parent: Car1
- Color: You may choose any color you wish.
The Thrust
Though there are several explosion entities in place surrounding the car, it is still not enough to lift the car due to its weight.
Create a brush at the center of the vehicle and make it large enough to encompass the top side while starting from the bottom. Apply the trigger texture and TieToEntity trigger_push. The car will fly as high as the trigger is configured.
- Name: PushCar1
- Parent: Car1
- PushDirection: Up
- StartDisabled: Yes
- Speed: 1500
- Flags: OnlyOnce, Physics, Pushables
Please make sure the Client flag is not enabled.
The Outputs
At this point, the explosion effect will not work. The outputs of the car entity must now be configured in order for this to happen.
First, go in the car's properties.
MinDamageToHurt allows entities to ignore all damage less than a specified amount and 90 is best for explosions like grenades and rockets.
The outputs of the car entity should be as followed:
The car will now ignore damage less than 90 and therefore, when a damage amount above 90 is applied to the car, the explosions ignite, the smoke starts, the fuel tank is destroyed, and the trigger_push entity loses its parents. If it is still parented to car1, the entity would pursue the car up in an infinite cycle.
To destroy the Fuel Tank, the outputs of the car can be reused with OnHealthChanged changed to OnBreak to destroy it, like so:
The car outputs are not disabled by the fuel tank explosion such that the explosions would inflict damage to the car and cause a second explosion for added effect.
The map can now be compiled and tested.