General Half-Life 2/Effects
description
Create realistic Lightning and Thunder effects
keywords
light, lightning, storm, thunder, flash, weather, rain.
Ever wanted to create a stormy atmosphere? But you were thwarted by the seeming in-ability of Hammer to create a real lightning?
Well, the time has come to take off those nasty glasses of ignorance (no offence), and unleash the power of trigger delays!
First, of course, you will need a map. Doesn’t matter what it is. As long as it has no leaks and is completely functional.
Second, you will need a number of entities:
- trigger_once / _multiple (depends on what you want)
- 2 × ambient_generic (one for thunder, and the other for rain sound)
- func_precipitation
- light
For this tutorial I used a simple box map with a lamp post casting a spot light.(I did not want to have a blunt box.)
Now in that box, create a “light” entity. I recommend placing it somewhere in the middle of an open area. Go to the properties, and edit the “Brightness” parameter.
You can choose any colour you like, but the brightness itself, which is the 4th value, must be set to something high (I have 100000000).
Then go to the “Flags” tab, and tick “Initially dark”
Name the light any name you want, something like “light1”
Create the sound entities. I never really understood env_soundscapes (which is a bad thing I guess:p), so I recommend creating a simple ambient_generic entity. Create two of them, one for the thunder, and one for the rain. Name them both accordingly, so you do not get confused later. You can choose any sound you like from the vast VALVe database.
Go to the ambient_generic entity responsible for the rain sound, go to the “Flags” tab, and uncheck “Start silent” box, as well as “Is NOT looped”. Check “Play everywhere” box, however.
Conversely, in the thunder sound, check all boxes, since you want the thunder sound to be triggered, not played from the beginning.
What you then create is a trigger. Create a brush of any size, and tie (Ctrl + T) it to either trigger_multiple or trigger_once. This depends on whether you want the lightning to be triggered once (in SP games for ex.) or multiple times (for MP games for ex.). My trigger is trigger_once. Texture it by “tools/toolstrigger”.
This is the somewhat hard bit. Go to the “Output” tab, and click “Add”. Select the way you want it to be triggered. I have mine set to “OnTrigger”. Your target entity is your light entity, however you named it. Mine is named “light1”. Now in the “Via this input” parameter, choose “TurnOn” from the list. Basically what you’ve done now is created a trigger by which the light will turn on.
In the “After a delay in seconds of” parameter, leave it to be 0.00.
Now press “Add” again. Choose the way you want it to be triggered. I recommend using the same way as in the first output. Select your light entity again. Now in the “Via this input” parameter, put “TurnOff”. Go to the delay parameter, and insert any number within reason. You do not want to have your flash to be active for a second, nor do you want it to be so fast you can’t even see it. I have my delay set to 0.03. What you have done just now is created a trigger, which when one activates, turns on the light, and in 0.03 seconds turns off. Simple isn’t it.
Of course we should not forget that there is a thunder sound to be played at triggering. Click “Add” again, and now select your ambient_generic entity responsible for thunder. Instead of “TurnOn” or “TurnOff” select “PlaySound”.
As you have probably learned from your physics course (hopefully), light travels faster than sound. Therefore, we set a delay for the thunder sound. Just like with the lightning, input values within reason. I have my delay set to 0.09 seconds, which in my opinion is just enough to create a realistic flash-thunder event.
In the end, your “Output” tab of the trigger should look something like this:
Last, but not least, you should add rain into the map. Create a brush covering the area where you want rain to appear, and tie it to func_precipitation. Edit the settings to your preferences, and that is it.
You are done
Now all we need is for some experienced mapper to create an awesome abandoned city (i.e London after WW III), where you walk out of a building, there is a flash, a thunder, awesome rain on Episode 2 Source version, moaning of the wind, metal sounds, etc.
vcool

















