Vindicta icon indicating copy to clipboard operation
Vindicta copied to clipboard

Added Random Weather

Open Jasperdoit opened this issue 4 years ago • 1 comments

After cracking my brain on how SQF worked, I managed to whip up this simple script that's able to change the mission's weather. It also does this over time giving the game a less static environment. I like the sun, but cloudy weather is also nice sometimes!

Jasperdoit avatar Aug 24 '21 16:08 Jasperdoit

That's definitely a step in the right direction, as we didn't have any 'weather system' in the mission before.

@Lazejun suggested that it would be nice to be able to disable this, and I think that we should really try to add a CBA settings option to enable/disable this. Here's a suggestion of how it might work:

  • Add a global variable gWeatherScript which stores the handler of that spawned script.
  • At game start, spawn the script if the bool is enabled.
  • When user enables it, spawn the script.
  • When user disables it, terminate the script, and probably set some generic sunny weather.
  • Be super careful whenever you are about to spawn the script, because we don't want to spawn it twice. Therefore, if gWeatherScript is not null (for whatever reason), terminate the old one.

Sparker95 avatar Aug 24 '21 21:08 Sparker95