Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Random Weather #812

Open
wants to merge 7 commits into
base: development
Choose a base branch
from
Open

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