Jump to content
Sign in to follow this  
wizbomb

dynamic time and weather?

Recommended Posts

hi i am making a free roam map and i would like dynamic time and weather. is this possable?:confused:

Share this post


Link to post
Share on other sites

Time and weather change all the time. Can you explain what you mean by dynamic?

And is this for single or multiplayer?

Share this post


Link to post
Share on other sites

i dunno what it means just im on editor and i need random time and weather

Share this post


Link to post
Share on other sites

To fiddle with the time setting use the command skipTime

To mess with the weather change setFof, setRain, setOvercast (all of them uses a scale from 0 to 1, where zero means nothing and oine means full effect.)

Share this post


Link to post
Share on other sites

oh btw its for single player

---------- Post added at 10:03 AM ---------- Previous post was at 10:02 AM ----------

i dont want it toskip time but have real time like 24 hours ina day and random weather

Share this post


Link to post
Share on other sites
i dont want it toskip time but have real time like 24 hours ina day

Time in ArmA 2 already passes in real time (24 hr days). Perhaps you want to accelerate it (ex: 1 min real time = 1 hour game time)?

As for random weather, isn't there a module for that?

Share this post


Link to post
Share on other sites

hmmmm maby 2 minute hours would be cool... but i did not know arma2 was real time i thought it was set time.

how do you make 1 minute hours?

Share this post


Link to post
Share on other sites

while{true}do{
  sleep 60;
  skipTime 1;
};

Of course if you want smoother transitions you could decreas the intervals in which it skips (Ex. 0.5 every 30 seconds). However it could also decrease performance.

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

where do i put this in mission.mqf? and also im ganna have 30 minutes to an hour so can you plz edit your code

---------- Post added at 11:34 AM ---------- Previous post was at 11:17 AM ----------

big dawg ever since i put tha command in my mission sqf it crashes when i try to load it and gives me this error message file c:/username/Documents/ArmA2/missions/free roam.chernarus/mission.sqm,line 7766 '.while.' '{' ecountered instead of '='

Share this post


Link to post
Share on other sites

If I were you I would create a file called accTime.sqf in the mission folder alongside the mission.sqm.

In that file use this code:

_ratio = _this select 0;
_skipInterval = _this select 1;

while{true}do{
  sleep _skipInterval;
  skipTime ((_skipInterval / 3600) * _ratio);
};

Then make another file called init.sqf with the folliwing:

[0.5,60] execVM "accTime.sqf"

Assuming my math is correct, this will make 0.5 hours real time equal to 1 hour game time, and update the time every 60 seconds.

If you change the 0.5 or the 60 you can change the speed and skip interval.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×