• 0
haremo

day and night

Question

Hello . Where can I change and how to set the day and night on a server . I restarting every four hours and wants three hours the day and one  hours night

Share this post


Link to post
Share on other sites

17 answers to this question

  • 0

You need to add this script on your server:

if (!isServer) exitWith {};

while {true} do
{
	if (daytime >= 19 || daytime < 5) then   // after 7pm and before 5am time multiplier changes
	{
		setTimeMultiplier 10      // adjust this value for slower or faster night cycle ( 24 hours will take 1 hour )
	}
	else
	{
		setTimeMultiplier 5      // adjust this value for slower or faster day cycle  ( 12 hours will take 1 hour )
	};

	uiSleep 30;
};

And put this start code in your init.sqf:

if (isServer) then {
[] execVM "addons\time.sqf";			    // Time
};

Create a folder called addons in your MPmissions and put the script inside, like this: "addons\time.sqf";

If you have any questions just talk... =)

Sorry for my bad english.

Edited by Laus
tutorial
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Thank you . I added this script but I'll check it later. I am going to sleep now . I do not have anything in it change it ?  Here it is three hours one day and  hours night  ?

Edited by haremo

Share this post


Link to post
Share on other sites
Advertisement
  • 0

Night work thanks . But the night is already underway for over two hours and still dark. How this set would three hours  day and one  hours night

Edited by haremo

Share this post


Link to post
Share on other sites
  • 0

Has anyone modified their cycle so it would start at dawn (morning) when the server restarts and progress into night?

This would follow the natural progression of a day for a server cycle. 

It would be night for about almost the last hour.

I found this was perfect as other mods did this as their standard day/night cycle.

Right now you log in and it seems that it's progressing to night shortly after the server restarts.

Edited by Brez

Share this post


Link to post
Share on other sites
  • 0

You need to add this script on your server:

if (!isServer) exitWith {};

while {true} do
{
	if (daytime >= 19 || daytime < 5) then   // after 7pm and before 5am time multiplier changes
	{
		setTimeMultiplier 10      // adjust this value for slower or faster night cycle ( 24 hours will take 1 hour )
	}
	else
	{
		setTimeMultiplier 5      // adjust this value for slower or faster day cycle  ( 12 hours will take 1 hour )
	};

	uiSleep 30;
};

And put this start code in your init.sqf:

if (isServer) then {
[] execVM "addons\time.sqf";			    // Time
};

Create a folder called addons in your MPmissions and put the script inside, like this: "addons\time.sqf";

If you have any questions just talk... =)

Sorry for my bad english.

added to server but still full daylight all 4 hours..

do i need to change

 

class Time
    {
        // Uses Dedicated Server time as ingame Time
        useRealTime = 0;

        // Will overide RealTime
        useStaticTime = 1;

        // time in ARMA FORMAT << CONFIG
        // https://community.bistudio.com/wiki/setDate

        staticTime[] = {2039,10,24,12,0};
    };

 

to use real time for this or not?

Share this post


Link to post
Share on other sites
  • 0

Why so complicated using a script?

Set your time to static at lets say 9 in the morning and adjust speed of time with

setTimeMultiplier

in the initserver.sqf

Edited by Flow

Share this post


Link to post
Share on other sites
  • 0

3 hours day 1 hour night with fog

if (!isServer) exitWith {};

while {true} do
{
    if (daytime >= 18 || daytime < 6) then
    {
    	1200 setFog [0.9,0.05,20];
        setTimeMultiplier 12
    }
    else
    {
        setTimeMultiplier 4
    };


    uiSleep 30;
};

edit config.cpp in exile_server_config.pbo

	class Time
	{
		// Uses Dedicated Server time as ingame Time
		useRealTime = 0;

		// Will overide RealTime
		useStaticTime = 1;

		// time in ARMA FORMAT << CONFIG
		// https://community.bistudio.com/wiki/setDate

		staticTime[] = {2039,10,24,6,0};
	};

 

Share this post


Link to post
Share on other sites
  • 0

Maybe someone could help.

Im looking for

1 hour of day

1 hour of night

then back to 1 hour of day

if i set the setTimeMultiplier to make time faster wont that effect server performance tying to cycle at a fast rate?

would not just a quick change from 1 static time like 12pm real time then switch to like 10pm for night then back hour later?

may look fast when it switch's but its not trying to rush the cycle

Edited by KillingRe

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.