1para{god-father} 105 Posted March 28, 2013 I have a side mission that I would like to have come up at a random time , then once complete start again with at a random time Any idea how i can do that ? Thanks Share this post Link to post Share on other sites
jacmac 2 Posted March 28, 2013 (edited) ExecVM a script with this in init.sqf? if (! isServer) exitWith{}; _sleepTimeMax = 2000; _sleepTimeMin = 1000; while { true } do { waitUntil {Global_Side_Mission == 0}; sleep ((floor random _sleepTimeMax) + _sleepTimeMin); Global_Side_Mission = 1; }; Then have your side mission sqf do the reverse: if (! isServer) exitWith{}; while { true } do { waitUntil {Global_Side_Mission == 1}; ....execute side mission code... waitUntil {Global_Side_Mission == 0}; }; Somewhere, when the side mission is complete, set Global_Side_Mission back to 0. Edited March 28, 2013 by Jacmac Share this post Link to post Share on other sites
1para{god-father} 105 Posted March 28, 2013 Cheers works a treat ! Share this post Link to post Share on other sites