Jump to content
Sign in to follow this  
domcho

Skipping time script.

Recommended Posts

Hi, guys. If you ever played the CWC campaign, remember the mission called "Escape" where you play as pilot Sam Nichols and are captured by the Soviets, then taken to a camp and told to stay in a tent? When you get in the tent, wait a bit the time starts to change and you can see the cool sunset. I was very impressed by this and wanted to do this 1 day in one of my missions. Here is how to do it:

setacctime 1.0

_i = 0

#loop
_i = _i + 1
skipTime 0.015
~0.1
? _i > 150 : goto "end"
goto "loop"
#end

titleCut ["A few hours later...","BLACK OUT",3]

~3
skipTime 3

~1

titleCut ["","BLACK IN",3]

You can combine it with camera script to be even cooler.

Edit: I made a little change to the script and uploaded a demo of it:

http://www.megaupload.com/?d=3CFTOYR5

Hope you like it.

Edited by Domcho

Share this post


Link to post
Share on other sites

Quick on for you,

I can add a skiptime to a trigger, 6 hour advance every time you access the radio trigger... But, I wanted it to slow down and take 30 seconds to move time 6 hours when pressed... How might I do this...? Whats the easiest way to get this to work...? I am terrible at scripting...

Thank you in advance for any help... Could you maybe please fire me a PM with the answer as well so I can track it via email...? Cheers, and thanks again for you help...

Share this post


Link to post
Share on other sites
Quick on for you,

30 seconds to move time 6 hours

Hi. Here:

Save to mission directory and activate like 0 exec "skip.sqs"

; skip.sqs
; 0 exec "skip.sqs"

; eg shift 6 hours in 30 seconds
_shift = 6
_perioid = 30


_tgt = (dayTime + _shift + _perioid/3600) % 24
_sk = 0
#loop
_pt = _time
; 1 / 30 fps ~= 0.033 spf
~0.033
_d = (_shift / (_perioid / (_time - _pt)))
?_sk + _d > _shift: _dt=dayTime; if(_dt > _tgt) then {_tgt=_tgt+24}; skipTime (_tgt - _dt); exit
skipTime _d
_sk = _sk + _d
goto "loop"

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  

×