Page 1 of 1

How to add lightning

Posted: Sun Feb 06, 2011 11:02 pm
by modmaster13
Hey I couldn't find this in the FAQ's, so hopefully this will be added.

1. First, copy an .fx file from the assets folder (C:\BF2_ModTools\assets\worlds\KAM\world1).

2. This will take us to the kamino world source files. Copy the kamino1.fx file

3. Paste it into C:\BF2_ModTools\data_***\Worlds\***\world1 folder

(replace *** with your map ID).

4. Open up your kamino1.fx file

5. Scroll down until you see this:
Hidden/Spoiler:
Effect("Lightning")
{
Enable(1);
Color(255, 255, 255);
SunlightFadeFactor(0.1);
SkyDomeDarkenFactor(0.4);
BrightnessMin(1.0);
FadeTime(0.2);
TimeBetweenFlashesMinMax(3.0, 5.0);
TimeBetweenSubFlashesMinMax(0.01, 0.5);
NumSubFlashesMinMax(2, 5);
HorizonAngleMinMax(30, 60);
SoundCrack("kam_amb_thunder");
SoundSubCrack("kam_amb_thundersub");
}
6. This is the code that will make your lightning ingame

8. Rename your kamino1.fx to "***.fx"

9. Have fun! :P

NOTE: If you only want lightning, you can remove everything else in the .fx file, exept for the code above.

Re: How to add lightning

Posted: Mon Feb 07, 2011 5:48 am
by agentsmith38
Hey, good idea man. Nice simple tutorial

Re: How to add lightning

Posted: Mon Feb 07, 2011 6:43 am
by naru1305
yepp, this is very useful :thumbs:

Re: How to add lightning

Posted: Mon Feb 07, 2011 7:31 am
by Jendo7
Good little tutorial, although it's basically the same principal as adding rain/snow/fog etc from the FAQ: How do I add rain? (FAQ) , Adding fog to your map.

Just saying!

Re: How to add lightning

Posted: Mon Feb 07, 2011 10:43 am
by commander501stappo
Nice tutorial :)

Re: How to add lightning

Posted: Mon Feb 07, 2011 5:42 pm
by modmaster13
Jendo7 wrote:Good little tutorial, although it's basically the same principal as adding rain/snow/fog etc from the FAQ: How do I add rain? (FAQ) , Adding fog to your map.

Just saying!
Yeah I know what you mean, but there wasn't any lightning tutorial, so I said to myself "Why not?" :wink:

Re: How to add lightning

Posted: Mon Feb 07, 2011 5:50 pm
by Jendo7
Yeah, you've got a good point. :)