Snow effect

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1854
Joined: Sun May 15, 2011 8:47 am

Snow effect

Post by enric » Mon Aug 06, 2012 5:49 am

How is the snow effect controlled?
Several scenarios of Bulge have snowing effect, I tried using its lighting.txt but don't seem to work.

rf900
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 339
Joined: Fri May 04, 2012 6:59 am

Re: Snow effect

Post by rf900 » Mon Aug 06, 2012 6:51 am

There is a script function that can be used to do it:

SetWeather(1); //rain
SetWeather(2); //snow

enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1854
Joined: Sun May 15, 2011 8:47 am

Re: Snow effect

Post by enric » Mon Aug 06, 2012 9:09 am

Thank you!.

Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1012
Joined: Fri Apr 30, 2010 3:13 am

Re: Snow effect

Post by Old_Warrior » Sat Aug 18, 2012 9:56 pm

Under which function would you place this script? This one?:

FUNCTION PreBattleSetup()

I did a search for this string:

SetWeather(1);

but could not find it in any script. I am sure I have seen rain in the missions. Odd that I could not find the text string.

Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1012
Joined: Fri Apr 30, 2010 3:13 am

Re: Snow effect

Post by Old_Warrior » Sat Aug 18, 2012 10:07 pm

Ok - found it. Yes, goes in the function I list above.

Brummbar44
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 689
Joined: Sun Oct 16, 2011 3:53 pm
Location: Canada
Contact:

Re: Snow effect

Post by Brummbar44 » Sun Aug 10, 2014 5:30 pm

Odd, I've added the SetWeather(1) to my PreBattleSetup function but I don't get rain?

I also have include"Functions.bsf"; so I'm not sure what I am missing?

enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1854
Joined: Sun May 15, 2011 8:47 am

Re: Snow effect

Post by enric » Sun Aug 10, 2014 7:26 pm

Take a look at the Vitality scenario, there is a random, every turn , to make rain or not.

SetWeather(Rand(0,1);
set the weather. 0 = none, 1 = rain. 2 = snow.

Brummbar44
2nd Lieutenant - Panzer IVF/2
2nd Lieutenant - Panzer IVF/2
Posts: 689
Joined: Sun Oct 16, 2011 3:53 pm
Location: Canada
Contact:

Re: Snow effect

Post by Brummbar44 » Sun Aug 10, 2014 7:47 pm

Thanks Enric!

Excellent scripting...my error was that I had the SetWeather in the PreBattleSetup when it should be in the StartTurn (for anyone else who has this problem).

jcb989
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1418
Joined: Fri Nov 05, 2010 12:02 am
Location: Bradenton, Florida

Re: Snow effect

Post by jcb989 » Mon Aug 11, 2014 11:09 pm

enric wrote:Take a look at the Vitality scenario, there is a random, every turn , to make rain or not.

SetWeather(Rand(0,1);
set the weather. 0 = none, 1 = rain. 2 = snow.
random, very clever idea.

Post Reply

Return to “Battle Academy : Modders Corner ”