Skip to content

Conversation

@Jasperdoit
Copy link
Contributor

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!

@Sparker95
Copy link
Owner

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.

Finally figured it out. Sorry, but the unappealing table is necessary!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants