Results 1 to 9 of 9

Thread: Stop time changes

  1. #1

    Stop time changes

    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!!!

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

  3. #3
    Master Sergeant TheRev709's Avatar
    Join Date
    Jun 11 2009
    Location
    bluegrass
    Posts
    733
    Author of the Thread
    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.

  4. #4
    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:
    Code:
    While {(true)} do {
    	sleep 300;
    	skipTime -300;
    };


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

    Nicolai
    Work in Progress

  6. #6
    Master Sergeant TheRev709's Avatar
    Join Date
    Jun 11 2009
    Location
    bluegrass
    Posts
    733
    Author of the Thread
    Itsa workin guys, thanks for the help!

    And yes, it is in hours not seconds

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

  8. #8
    Master Gunnery Sergeant
    Join Date
    Dec 13 2003
    Location
    Melbourne, Australia
    Posts
    1,362
    Code:
    while {true} do {
    	sleep (60*5);
    	skiptime -(1/(60 / 5));
    };
    Reverses the clock by 5 minutes every 5minutes.

    Australian Armed Forces - Dedicated Tactical Coop Squad for ArmA2

  9. #9
    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..

Posting Permissions

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