Jump to content
Sign in to follow this  
mr_shadow

Time acceleratin without Zeus

Recommended Posts

Hello, does someone know how to use the time acceleration from zeus?

Not interested in skip time, but placing module in Zeus every time isn't fine.

Share this post


Link to post
Share on other sites

The below is just a wrapper for setTimeMultiplier/timeMultiplier commands. This block accelerates time after a certain hour and stops accelerating time at a certain hour. Example application is an accelerated dark schedule.

// Run on server only

_startTimeX = 19.5;		// time of day (24hrs) you want time accelerator to start
_endTimeX = 5;			// time of day you want accelerator to end
_timeX = 120;			// accelerator variable: number between 0.1-120
_timeNormal = 1;		// non-accelerated default time-speed variable

TIME_X = TRUE;
while {TIME_X} do {
waitUntil {((time > _startTimeX) || (time < _endTimeX))};
if (!(TIME_X)) exitWith {};
setTimeMultiplier _timeX;
waitUntil {((time < _startTimeX) || (time > _endTimeX))};
if (!(TIME_X)) exitWith {};
setTimeMultiplier _timeNormal;
};

Edited by MDCCLXXVI

Share this post


Link to post
Share on other sites

Is that corerct in the init.sqf?

if(isServer) then

{

_startTimeX = 0.5;		// time of day (24hrs) you want time accelerator to start
_endTimeX = 23.5;			// time of day you want accelerator to end
_timeX = 120;			// accelerator variable: number between 0.1-120
_timeNormal = 1;		// non-accelerated default time-speed variable

TIME_X = TRUE;
while {TIME_X} do {
waitUntil {((time > _startTimeX) || (time < _endTimeX))};
if (!(TIME_X)) exitWith {};
setTimeMultiplier _timeX;
waitUntil {((time < _startTimeX) || (time > _endTimeX))};
if (!(TIME_X)) exitWith {};
setTimeMultiplier _timeNormal;
};
};

I mean calling it by isserver, because its stops some other scripts for some reason.

Edited by mr_shadow

Share this post


Link to post
Share on other sites

You can put it in the init with a little edit:

if(isServer) then

{
 [] spawn {  
_startTimeX = 0.5;        // time of day (24hrs) you want time accelerator to start
_endTimeX = 23.5;            // time of day you want accelerator to end
_timeX = 120;            // accelerator variable: number between 0.1-120
_timeNormal = 1;        // non-accelerated default time-speed variable

TIME_X = TRUE;
while {TIME_X} do {
   waitUntil {((time > _startTimeX) || (time < _endTimeX))};
   if (!(TIME_X)) exitWith {};
   setTimeMultiplier _timeX;
   waitUntil {((time < _startTimeX) || (time > _endTimeX))};
   if (!(TIME_X)) exitWith {};
   setTimeMultiplier _timeNormal;
};
};
};  

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  

×