L4D2 Level Design/Hard Rain

= Creating the Hard Rain Campaign's Rain Storm Effect =
The thunderstorm effect in the Hard Rain campaign is a very cool effect, and it is actually simpler to get it working than you might think. The information in this article is based on a tutorial, that can be found here. However, I had to make some changes to get it working. Instead of editting the storm entities instance files yourself as in the tutorial linked above, here is a .zip file containing the already updated files for your convenience. 
StormEnts.zip
After downloading the storm_ents.zip file, go into your Left 4 Dead 2 \mapsrc\ folder. Create a new folder called \myinstances\ or something similar, and unzip the storm_ents.zip file into it. This is to ensure that these files won't get overwritten the next time the L4D2 Authoring Tools get updated.
== Getting Started ==
First, you need to have a map with a 3D Skybox. Once you have a 3D skybox setup in your map, go into your Map Properties and set the SkyBox Texture Name to sky_l4d_c4m4_hdr. This is the skybox texture that Valve used in the Hard Rain campaign. 
== Creating the Storm ==
We are going to use the func_instance entity to setup the storm, by instancing the storm instance files that you downloaded (in StormEnts.Zip above). First, go to the center of the playable area of your map. Create a func_instance entity.
Now set up the following properties on the func_instance entity:
* Set the Fix Up Name field to "c4m4_storm_logic"
* Set the VMF Filename field to "myinstances/c4m4_storm_logic.vmf" 
* Set the Entity Name Fix Up field to "None"
Next, create a second func_instance entity somewhere nearby, and setup its properties like this:
* Set the Fix Up Name field to "c4m4_environment_ents"
* Set the VMF Filename field to "myinstances/c4m4_environment_ents.vmf" 
* Set the Entity Name Fix Up field to "None"
For the third and final func_instance entity, go to the sky_camera entity in your 3D skybox. Place a func_instance at about the same place as the sky_Camera entity and set up its properties like this:
 
* Set the Fix Up Name field to "c4m4_storm_ents"
* Set the VMF Filename field to "myinstances/c4m4_storm_ents.vmf" 
* Set the Entity Name Fix Up field to "None"
== Creating the Rain ==
Now we just need to add the rain into the map. To do this, create a brush that covers your entire playable area, cover it with the tools/trigger texture, and make this brush a func_precipitation entity. Set its Precipitation Type property to "Particle Rain Storm", and set its Name property to "rain".
Next, we want to keep the rain fog out of our buildings. To do this, create a brush and cover it with the tools/fogvolume texture. Make this brush a fog_volume entity. Then move and resize the brush so it covers all of the interior area of your building. Use multiple fog brushes if you have multiple indoor rooms and corridors. Set up your fog_volume entity (or entities) like this:
* Set the Fog Name field to "foginteriorcontroller"
* Set the Postprocess Name field to "fx_settings_interior"
Lastly, we just need to add the sound effects for the rain. For this, go to where you placed the first two func_instance entities. Somewhere nearby, create an env_soundscape_triggerable entity and set up its properties like this:
* Set the Name field to "rain_interior"
* Set the Radius field to "0"
* Set the Soundscape field to "rain.interior.med"
Now create a second env_soundscape_triggerable entity here and setup its properties like this:
* Set the Name field to "rain_exterior"
* Set the Radius field to "0"
* Set the Soundscape field to "rain.water.med"
All that's left to do now, is trigger these rain sounds. For this, go to the entrance of your building.
Place a trigger brush covering the entrance on the outside of the doorway. This brush should be covered with the tools\trigger texture, and make it a trigger_soundscape entity. Set its Soundscape field to "rain_exterior".
Now place a second trigger brush covering the entrance on the inside of the doorway. This brush should be covered with the tools\trigger texture, and make it a trigger_soundscape entity. Set its Soundscape field to "rain_interior".
These two triggers will switch the soundscape when the player enters or exits the doorway. This makes the rain sound different when you are outside, than it does when you are in an interior area. Now, make a copy of the trigger that you placed on the inside of the doorway. Move and resize this copy so that it covers most of the starting room. This way the survivors will spawn inside this trigger, and it will then activate the interior rain soundscape. Otherwise, when the map starts, the player will not hear the rain until they go outside.
== Testing Your Storm ==
That's it! You should now have a working storm in your map. To test it, you can setup a button and have it target the entity "relay_storm_start" via the input "Trigger". 
A second way to test your storm is by opening the console (make sure sv_cheats is set to "1") and type in the following command:
ent_fire relay_storm_start trigger
Here is a sample map with the storm working. The button just outside the saferoom door will trigger a storm. The other button further away simply triggers a panic event.
There is also a ladder near the safe room door, allowing you to get onto the safe room roof. 
L4D2_StormSampleMap.zip
If you want to tweak this setup, there is a lot you can do. You'll probably want to make copies of the storm instance files to experiment with so you still have the originals from the StormEnts.zip file (the download link is at the top of this page).
= See also =
* func_instance
* Sky_camera
* env_soundscape_triggerable
* trigger_soundscape
Category:Left 4 Dead 2
Category:Level Design
Category:Skybox