Jump to content

Recommended Posts

I made a DayZ type MPmission for me and some friends using a combination of mods and it works great so far.  However once it gets dark, we can't just hop servers like in DayZ.  So I used to skip time module in the editor (set to skip 12 hours) and attached it to a Radio Alpha trigger and set the trigger to repeatable.  So in game, in got dark, 0-0-1... boom it's daylight again.  Everything seemed to be working great, but then the next night... 0-0-1... nothing.  Is there something more I need to do?  Maybe I need a script for this?  I should have known as this is Arma... nothing is that easy.  I should point out that I am using modules from the Ravage mod by Haleks.  Could it be overriding it somehow?  But then why did it work the first time?  Kinda stumped... and help would be greatly appreciated!

Share this post


Link to post
Share on other sites

You could ask Haleks, who apparently made the modules.

Alternatively you could add this to players (initplayerlocal.sqf and onPlayerRespawn.sqf) who are allowed to skip time:

player addAction ["Skip to next morning", {

	params ["_target","_caller","_ID"];

	_date = date;
	_date params ["_year","_month","_day","_hour","_minute"];
	_day = _day + 1;
	_hour = 7;
	_minute = 30;
	_newdateNum = dateToNumber [_year,_month,_day,_hour,_minute];

	_rndSkipText = selectRandom [format ["%1 skipped to next morning!",name _target],format ["%1 is afraid of the dark!",name _target],format ["%1 can't see in the dark!",name _target]];

	if (_newdateNum >= 0.99726) then {_year = _year + 1;_newdateNum = 0.00085618};
	[(numberToDate [_year,_newdateNum])] remoteExec ["setDate",2];
	[_rndSkipText] remoteExec ["systemchat",0];

}, nil, 0, false, false, "", "_this isEqualto vehicle _this AND {_this isequalto _target} AND {daytime > 18.5}"];

This will skip to next days morning at 7:30am, adjust hour and minute accordingly.

Action will only be available past 6:30pm, set this to your liking.

It will also correctly skip to next month at the end of a month and to next year on december the 31st.

The player who used the action will also be announced.

SkipTime command will be executed on the server only, since it automatically syncs every client after 5 seconds.

 

Cheers

  • Like 1

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

×