{"name":"skipTime","operator":null,"title":"skipTime","type":"command","url":"https://community.bistudio.com/wiki/skipTime","revid":369075,"updated":"2024-09-02T20:25:00Z","groups":["Time","Environment"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":true},"exec":null,"description":"Jumps the specified number of hours forward or backward.\nThe time of day and tides are adjusted, but no changes are made to any units. If present, the lower level of clouds instantly jump to the position they would be in if time had passed normally.","syntaxes":[{"syntax":"skipTime duration","since":null,"effect":null,"exec":null,"params":[{"name":"duration","type":"Number","optional":false,"default":null,"description":"hours to skip. A positive value will create a forward time jump, a negative value will jump backwards.","types":["Number"],"since":null,"text":"duration: Number - hours to skip. A positive value will create a forward time jump, a negative value will jump backwards."}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"duration","types":["Number"]}}],"examples":[{"text":"```sqf\nskipTime 5;\n```","code":["skipTime 5;"]},{"text":"```sqf\nskipTime (5/60); // be sure to use parentheses, otherwise here (skipTime 5)/60 will happen\n```","code":["skipTime (5/60); // be sure to use parentheses, otherwise here (skipTime 5)/60 will happen"]},{"text":"```sqf\nwhile {true} do \n{\n    skipTime 0.00333;\n    sleep 0.1; // smooth time transition\n};\n```","code":["while {true} do \n{\n\tskipTime 0.00333;\n\tsleep 0.1; // smooth time transition\n};"]},{"text":"```sqf\nskipTime ((_timeToSkipTo - dayTime + 24) % 24); // skip forward to a specific time, irrespective of the current mission time\n```","code":["skipTime ((_timeToSkipTo - dayTime + 24) % 24); // skip forward to a specific time, irrespective of the current mission time"]}],"multiplayer":"In Arma 3 (around v1.14) skipTime executed on the server will get synced in 5 seconds or so with all the clients. It will also be JIP compatible. skipTime executed on a client will change time on client for about 5 seconds after which it will sync back to server time.\n\nFor other games' behaviour, see Multiplayer Scripting#Join In Progress.\n\n> [!IMPORTANT]\n> Since Arma 3 v2.10 skipTime is limited to max +/- 1000 hours per skip for game stability. The command is intended for short time jumps. For large intervals, use setDate.","problems":null,"aliases":[],"see_also":["setDate","accTime","setTimeMultiplier","timeMultiplier","BIS_fnc_setDate"],"notes":[{"user":"Ceeeb","date":"2007-04-17T04:01:00Z","text":"In ArmA & OFP, skipTime does not actually estimate weather changes beyond moving the clouds across the sky.\nWeather counters continue as if no time has passed.\nThe setDate command can be used instead of skiptime to change the time *without* the visual give-away of the lower clouds jumping."},{"user":".kju","date":"2011-11-02T22:06:00Z","text":"I cannot confirm this for OA 1.60 beta (85889):\nMP: Even though the immediate effect of skipTime is only local,\nthe new time will propagate through the network after 30 seconds or so.\nInstead the date, which includes time, is synced automatically for new JIP clients - NOT for present instances.\nSo one has to apply skipTime on all instances in MP (server + all present clients)."},{"user":"Killzone_Kid","date":"2013-08-25T02:45:00Z","text":"This command is blocking and in some cases it may take up to 1.5 seconds (probably depends on CPU) for it to calculate the changes to the environment, during which the game will microfreeze. It largely depends on weather changes, which are quite random. However one thing remains consistent, skipTime 24 hours is always almost instant. This is quite helpful when used in conjunction with commands such as setOvercast for instant and seamless effect. To try it yourself use this script:\n\n```sqf\n0 spawn {\n    for \"_i\" from 1 to 24 do {\n        _time = diag_tickTime;\n        skipTime _i;\n        diag_log  [_i, diag_tickTime - _time];\n        sleep 3;\n    };\n};\n```\n\nOne of the results (results will vary depending on weather conditions):\n\n```\n[1,1.44507]\n[2,1.46118]\n[3,1.33105]\n[4,1.396]\n[5,0.0310059]\n[6,1.37891]\n[7,1.4502]\n[8,1.37817]\n[9,1.37695]\n[10,1.37012]\n[11,1.448]\n[12,1.32593]\n[13,1.45508]\n[14,1.448]\n[15,0.0349121]\n[16,0.0368652]\n[17,1.25903]\n[18,1.38599]\n[19,1.4519]\n[20,0.052002]\n[21,0.0400391]\n[22,0.0490723]\n[23,1.35205]\n[24,0.0151367] // this is always the lowest\n```"}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Environment","Command Group: Time","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Server Execution","Take On Helicopters: Scripting Commands"]}