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: 1855
Joined: Sun May 15, 2011 8:47 am

Snow effect

Post by enric »

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 »

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: 1855
Joined: Sun May 15, 2011 8:47 am

Re: Snow effect

Post by enric »

Thank you!.
Old_Warrior
Major - Jagdpanther
Major - Jagdpanther
Posts: 1019
Joined: Fri Apr 30, 2010 3:13 am

Re: Snow effect

Post by Old_Warrior »

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: 1019
Joined: Fri Apr 30, 2010 3:13 am

Re: Snow effect

Post by Old_Warrior »

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 »

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: 1855
Joined: Sun May 15, 2011 8:47 am

Re: Snow effect

Post by enric »

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 »

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: 1423
Joined: Fri Nov 05, 2010 12:02 am
Location: Bradenton, Florida

Re: Snow effect

Post by jcb989 »

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 ”