Jump to content
Sign in to follow this  
therev709

Stop time changes

Recommended Posts

I'm trying to develop a mission which takes place in the evening. I got my ppeffects and all that down and I'd like to keep this atmosphere throughout the mission. Sadly, the mission takes a while and halfway through the sun sets.

I've been searching all around the place but I can't figure out how to stop time from changing in the game.

Thanks in advance for the help!!!

Share this post


Link to post
Share on other sites

I wish I could stop the time in RL but unfortunately that's not possible. So why you should be able to do so in the Simulation. :)

What you can try is setting the time back using the skipTime command.

Share this post


Link to post
Share on other sites

sounds like a good place to start :)

Any good ideas on how to properly loop it in a script where every five or so minutes it sets the time back? I'm sure I can work something up using triggers and scripts, but my scripting abilities is very basic. As long as I can get the result I want I'm happy, but I'm sure theres a much better way of doing this.

Share this post


Link to post
Share on other sites

Ok, so five minutes = 5 x 60 = 300 seconds.

So, you could create a file called init.sqf and place the following code in it:

While {(true)} do {
sleep 300;
skipTime -300;
};

Share this post


Link to post
Share on other sites

IIRC skiptime value is in hours, so -300 would result in 300 hours back in time.

Nicolai

Share this post


Link to post
Share on other sites

Itsa workin guys, thanks for the help!

And yes, it is in hours not seconds :)

Share this post


Link to post
Share on other sites

Alright I'm not sure if its worth making a new thread on this so I'll post it here, tell me if I'm wrong otherwise. Using the Skiptime command, I'm trying to make a time lapse in a scene using this script:

_camera = "camera" camcreate [0,0,0]

_camera cameraeffect ["internal", "back"]

;=== 19:58:32

_camera camPrepareTarget [92634.27,-32177.13,25730.94]

_camera camPreparePos [2552.36,2764.77,5.86]

_camera camPrepareFOV 0.700

_camera camCommitPrepared 0

@camCommitted _camera

#loop

skiptime 0.00066;

? time = 0800 : goto "nextscene"

goto "loop";

#nextscene

player cameraeffect ["terminate","back"]

camdestroy _camera

end1=true;

exit;

As you can see I looped the skiptime command, and tried to make it stop when time reaches 8am (Obviously I have done it incorrectly). the lapse starts at 4am, and I want it to stop at 8am on the dot. So if there is any command I can use to make it recognise it is 8am, then skip the loop, I'd appreciate if you would share. Thanks you.

Share this post


Link to post
Share on other sites

while {true} do {
sleep (60*5);
skiptime -(1/(60 / 5));
};

Reverses the clock by 5 minutes every 5minutes.

Share this post


Link to post
Share on other sites

Nooooooo not skiptime :( everything jumps around like the clouds and stuff - u wanna use setdate and loop it every 30 - 60 secs..

This does not effect the clouds and stuff..

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  

×