Results 1 to 4 of 4

Thread: Skipping time script.

  1. #1

    Post Skipping time script a.k.a. sunrise or sunset script

    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:

    Code:
    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.
    Last edited by Domcho; Jan 7 2012 at 05:42.
    OFP will never die!

  2. #2
    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...
    Sabelzahntiger

    2RTR SOMNUS
    "From Mud, Through Blood, to The Green Fields Beyond"

  3. #3

  4. #4
    Quote Originally Posted by sabelzahntiger View Post
    Quick on for you,
    30 seconds to move time 6 hours
    Hi. Here:

    Save to mission directory and activate like 0 exec "skip.sqs"
    Code:
    ; 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"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •