FrostbiteX92
07-16-2006, 01:42 AM
err... sorry if this isn't the right place to put this and the stuff thats required...(Take this down if you wish...or take the link down but keep the tut)
Lightning
Ever wanted to add lightning to your map? Well now you can! Just follow this tutorial and you to can add Lightning to your Source Map.
Required Files:
>>FileFront<< (http://files.filefront.com/Lightning_Tutorial_Files/;5261042;;/fileinfo.html)
Tutorial:
Ok to start this tutorial off I have to say this will automatically start the lightning you'll have to do some random triggers if you want it to only be on at a certain part of the map.
Note: Before you go through this tutorial create a 3d skybox (The one I use in this tutorial is 1322x1674 Units) With Fog off!!!
http://img205.imageshack.us/img205/1747/step0100tk8.png
Ok place 2 sprites about 2-10 units away from each other. (Make sure ones in front of the other) Select the one closes to the skycamera entity. In the Sprite Name box write (Not Including Quotation Marks) "materials/sprites/lightningglow.vmt"
Then click on scale and type in 7. After that make sure Render Mode is addictive and that the FX amount is 50. Also change the Name to (Not including Quote Marks) "lightning1glow". After that click apply and then Cancel.
http://img291.imageshack.us/img291/9894/step101gf2.jpg
Now goto the properties on the other sprite. Type in the name "lightning1" and change the sprite name to "materials/sprites/lightning.vmt" and also make sure the Render Mode is Addictive and also that the FX Amount is 255. Change the scale amount (Under Scale) to .75
http://img81.imageshack.us/img81/8363/step102ul0.jpg
http://img205.imageshack.us/img205/1729/step0200mp3.png
Now that you've setup your sprites you must setup a logic_timer. This will take longer than placing the sprites. Ok first place a logic_timer somewhere near your sprites. Open it up in properties and set its name to "lightning1timer". Now make sure "Use Random Time" is set to yes and that Min Random Interval is set to 1 and Max Random Interval is set to 10. Then set Refire Interval to "0.35". Now click on outputs tab and add some things to make it look like this:
http://img162.imageshack.us/img162/6269/step202af5.jpg
(Important Note: The example i'm using shows the number 2 but in this tutorial i used number 1 so just replace the 2 with 1. Also the Last line is an optional part of this tutorial!)
Once you're done that click on the flags tab and make sure the only flag that showing is checked!
Ok!! You're Done!! Yay! Save it and test it out or follow these optional steps and add some cool additions to your map!
http://img207.imageshack.us/img207/1289/step0300sz2.png
Ok wanna add some Thunder to your lightning? well simply place an ambient_generic (Soundscape recommended but not covered by this tutorial sorry!) in a part of your map (not in the 3d skybox) and change it's name to Thunder.01 change its sound name to "k_lab.teleport_post_thunder" or another good thunder sound. Then go back to that logic_timer and add
"OnTimerLow"
"Thunder.02"
"PlaySound"
to the output tab and thats it :).
Wanna make your Lightning rotate around the skybox? (doesn't actually show the sprite moving great effect since lightning usually never hits the same spot twice.)
Well make a small brush using tool_invisible and make it a func_rotating and call it lightningrotator change the max rotating speed to 3 and change the friction to 20. Click apply and then close the window. go back to your two sprites and change their parent to lightningrotator. After your done that add a logic_auto to the map (Not sure if this is needed or not...) Then in the outputs tab add this:
"OnMapSpawn"
"lightningrotator"
"Start"
and then save your map and test it out!!!
Congrads your finish!!
The End Result
http://img392.imageshack.us/img392/2974/lightningtest01screenshot0003nh6.jpg
and now
http://img116.imageshack.us/img116/9468/lightningtest02dd8.png
Credits:
Sprites - Troika Games
Vmf - Troika Games, Frostbite
Tutorial - Frostbite
I've included the vmf I used to make this. Well the skybox is from the decompiled sm_hub1.bsp so thats why Troika is in the credits for the vmf. Hope you guys find this useful =)
I suggest you get your own lightning Texture since this one includes part of water which isn't that good =\
Lightning
Ever wanted to add lightning to your map? Well now you can! Just follow this tutorial and you to can add Lightning to your Source Map.
Required Files:
>>FileFront<< (http://files.filefront.com/Lightning_Tutorial_Files/;5261042;;/fileinfo.html)
Tutorial:
Ok to start this tutorial off I have to say this will automatically start the lightning you'll have to do some random triggers if you want it to only be on at a certain part of the map.
Note: Before you go through this tutorial create a 3d skybox (The one I use in this tutorial is 1322x1674 Units) With Fog off!!!
http://img205.imageshack.us/img205/1747/step0100tk8.png
Ok place 2 sprites about 2-10 units away from each other. (Make sure ones in front of the other) Select the one closes to the skycamera entity. In the Sprite Name box write (Not Including Quotation Marks) "materials/sprites/lightningglow.vmt"
Then click on scale and type in 7. After that make sure Render Mode is addictive and that the FX amount is 50. Also change the Name to (Not including Quote Marks) "lightning1glow". After that click apply and then Cancel.
http://img291.imageshack.us/img291/9894/step101gf2.jpg
Now goto the properties on the other sprite. Type in the name "lightning1" and change the sprite name to "materials/sprites/lightning.vmt" and also make sure the Render Mode is Addictive and also that the FX Amount is 255. Change the scale amount (Under Scale) to .75
http://img81.imageshack.us/img81/8363/step102ul0.jpg
http://img205.imageshack.us/img205/1729/step0200mp3.png
Now that you've setup your sprites you must setup a logic_timer. This will take longer than placing the sprites. Ok first place a logic_timer somewhere near your sprites. Open it up in properties and set its name to "lightning1timer". Now make sure "Use Random Time" is set to yes and that Min Random Interval is set to 1 and Max Random Interval is set to 10. Then set Refire Interval to "0.35". Now click on outputs tab and add some things to make it look like this:
http://img162.imageshack.us/img162/6269/step202af5.jpg
(Important Note: The example i'm using shows the number 2 but in this tutorial i used number 1 so just replace the 2 with 1. Also the Last line is an optional part of this tutorial!)
Once you're done that click on the flags tab and make sure the only flag that showing is checked!
Ok!! You're Done!! Yay! Save it and test it out or follow these optional steps and add some cool additions to your map!
http://img207.imageshack.us/img207/1289/step0300sz2.png
Ok wanna add some Thunder to your lightning? well simply place an ambient_generic (Soundscape recommended but not covered by this tutorial sorry!) in a part of your map (not in the 3d skybox) and change it's name to Thunder.01 change its sound name to "k_lab.teleport_post_thunder" or another good thunder sound. Then go back to that logic_timer and add
"OnTimerLow"
"Thunder.02"
"PlaySound"
to the output tab and thats it :).
Wanna make your Lightning rotate around the skybox? (doesn't actually show the sprite moving great effect since lightning usually never hits the same spot twice.)
Well make a small brush using tool_invisible and make it a func_rotating and call it lightningrotator change the max rotating speed to 3 and change the friction to 20. Click apply and then close the window. go back to your two sprites and change their parent to lightningrotator. After your done that add a logic_auto to the map (Not sure if this is needed or not...) Then in the outputs tab add this:
"OnMapSpawn"
"lightningrotator"
"Start"
and then save your map and test it out!!!
Congrads your finish!!
The End Result
http://img392.imageshack.us/img392/2974/lightningtest01screenshot0003nh6.jpg
and now
http://img116.imageshack.us/img116/9468/lightningtest02dd8.png
Credits:
Sprites - Troika Games
Vmf - Troika Games, Frostbite
Tutorial - Frostbite
I've included the vmf I used to make this. Well the skybox is from the decompiled sm_hub1.bsp so thats why Troika is in the credits for the vmf. Hope you guys find this useful =)
I suggest you get your own lightning Texture since this one includes part of water which isn't that good =\