This tutorial explains how to create the airstrike like in the deathmatch maps of Crossfire and Doublecross. The included example map has a small outdoor area with an underground bunker. Ok, enough preliminaries. Let's get on with the tutorial!
From the Simple to the Complex...
First we're going to start off with a simple version of the airstrike, and I mean simple, and then keep adding to it. Make a button in your bunker and have it targetstrike_multi. Give it a Delay Before Reset value of 180. This causes the button to reset every 3 minutes (180 seconds). Now cover all of the areas affected by the strike with a brush. Tie this brush to the trigger_hurt entity. Give it a name of blast. For Damage Type put Blast and for Damage Amount put 200. The blast damage type causes gibs and the 200 damage amount makes sure everybody dies. There is one Flag we need to worry about. Make sure the Start Off flag is checked. Now place a multi_manager entity in the map and give it a name of strike_multi. Turn off Smart Editing and add a key called blast and give it a value of 21. Add blast again and give it a vlaue of 22. Now compile your map, play it, then hit the button. In 21 seconds the trigger_hurt will activate, killing anything in it and 1 second later it will deactivate. Pretty boring huh? Next, we'll add sound.
Place three ambient_generic entities in the map. Give one a name of siren, the other a name of jet, and the last one a name of explosion. Go into flags and for each one make sure Play Everywhere and Start Silent are checked. For the jet and explosion ambient_generics, make sure Is NOT Looped is checked. For the siren, the path of the wav should be ambience/siren.wav, for the jet the path of the wav should be ambience/jetflyby1.wav, and for the explosion the path of the wav should be Weapons/explode3.wav. Now go into the multi_manager and add the following keys and values: siren, .1 ; siren, 16 ; jet, 16 ; explode, 21. Now compile and play the map. It's a bit more realistic isn't it? Next we're going to finish up by adding a door to the bunker as well as env_fade, and env_shake entities.
Now add a door to you bunker. Give it a name of door, a speed of 25 and Damage inflicted when blocked should be 100. Oh yeah, and set the Delay before close to -1. You can define whatever sounds you want. In the multi_manager add door with a value of 10 and then add it again with a value of 25. Next place an env_fade in the level. Give it a name of fade and for Duration put 4. In flags make sure Fade from is checked. In the multi_manager add fade with a value of 21. Lastly, place an env_shake entity in the level. Give it a name of shake, an amplitude of 4, a duration of 2, and the last attribute should be 2.5. In the multi_manager add the key of shake with a value of 21. We are now done with the airstrike! Play your level and admire your work.
More on the Airstrike.
This airstrike is mainly meant for deathmatch type levels, but it could be used in single player. Also this airstrike is as close to the ones in Crossfire and Doublecross as I could get them. I still can't figure out what sound Valve used for the explosion though. Also the main entity tying all of this together is the multi_manager. This entity is a godsend. If we didn't have this entity, we'd have to use a bunch of trigger_relays to get this to work.
This article was originally published on 69th Vlatitude. TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.