Frictional Games Forum (read-only)
Lightning FX Tutorial & Download - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Articles (https://www.frictionalgames.com/forum/forum-40.html)
+---- Thread: Lightning FX Tutorial & Download (/thread-8156.html)



Lightning FX Tutorial & Download - palistov - 05-21-2011

Hey guys, posting a thread with the attachment tutorial I promised! Here are the videos for the lightning effects in my mod if you haven't seen them yet.

v1.1
v1.2


I highly suggest that you read the README file. You NEED to read the warning file, but in case you don't, you're gonna read this instead!

Do NOT open the .map file if you are sensitive to flashing lights. The map file has flickering lights and billboards. On that same token, try to avoid working on lightning effects for more than 20-30 minutes, as it can give you headaches (gave me some a few times, and some dizziness)

EDIT: Forgot to mention the ThunderSFX function in the README! Change that function to play the sound at any place you want. You can create multiple areas named "thunder_area_1", "thunder_area_2", etc, and have the function do PlaySoundAtEntity("", "general_thunder.snt", "thunder_area_"+RandInt(1,6), 0, false);. Change 6 to the total number of thunder areas you have.

Now that all is said and done, the attachment can be downloaded below! Enjoy!


RE: Lightning FX Tutorial & Download - WatzUpzPeepz - 05-21-2011

Well done but I have a question,do I need to redo the script to have more than 1 of these lightning effects? Like in the video you showed.


RE: Lightning FX Tutorial & Download - palistov - 05-21-2011

Nope! If you check out the script you'll see a for loop that says:

for(int i=1;i<100;i++) //function here

When you duplicate your lights, the duplicated version will have the next number on the end. Duplicating flash_1 will give you flash_2, duplicating flash_2 gives flash_3, etc.

The for loop applies the function it precedes to all of the lights and billboards in your map, as long as the name stays flash_x, flash_point_x, etc (where x is any integer between 1 and 99)

You can create up to 99 of each type of light. If you make more than 99 windows (for some bizarre reason), just change the 100 to a larger number in the appropriate for loop.

No need to worry about scripting the billboards though, they're connected to the flashing lights, that means that when the connected light flickers, so do the billboards. They're all connected to flash_1 I believe, so don't delete or rename it! Smile