satexas69 0 Posted March 21, 2007 In a mission I'm making, it starts out at night, and it's a long mission. I'd like it to "cycle" not just "day to night" or "night to day", but a full cycle of night-day-night-day.... Is there a function to have the clock run "abnormally fast" while the mission is running? I can't seem to find one, and it seems like I played some old OFP maps that used to do that. Share this post Link to post Share on other sites
Maddmatt 1 Posted March 21, 2007 You can make a script to do that using the skiptime command. Click here for info from the wiki. Share this post Link to post Share on other sites
TiGGa 0 Posted March 21, 2007 Here is some SQF code for you: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sleep 5; setDate [2007,6,21,0,startminute]; for [{_i=0},{_i<1},{_i=_i}] do { sleep 5; startminute = startminute + 1; if (startminute >= 1440) then { startminute = startminute -1440; }; setDate [2007,6,21,0,startminute]; }; A day will be 2 real hours. Note that the date will be always the same though (june 21). With a small tweak, you can have that changed. I used setDate, because it doesn't calculate the cloud formations unlike skiptime. Looks really odd if the clouds are jumping around everytime the time is skipped. You have to set the variable startminute in your init.sqf. 0 for midnight, 720 for noon. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted March 21, 2007 If it's single player, you may want to try this: http://www.armaholic.com/page.php?id=654 Share this post Link to post Share on other sites
satexas69 0 Posted March 21, 2007 Tigga, Thanks, that's exactly what I'm after. After I made the SQF file (say, time.sqf) and put it in my missions directory, how do I "call it" active into the mission itself? When you speak of the setminute variable, I assume for midnight it would be: startminute = 0; COLSanders: I author MP maps for dedi servers, not SP.. but thanks. Share this post Link to post Share on other sites
TiGGa 0 Posted March 21, 2007 Just write this in the init.sqf or sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">startminute = 0; //Or whatever you want _timescript = [] execVM "time.sqf"; If you want to make it JIP-Ready , write your init.sqf like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (local server) then { startminute = 0; publicvariable "startminute"; }; _timescript = [] execVM "time.sqf"; onplayerconnected "publicvariable ""startminute"""; Now you need a gamelogic called server on your map and your ready to go. Share this post Link to post Share on other sites