VulturARG 5 Posted May 19, 2020 Hi, I tried that an scripts start running 2 hrs after game started. This code is from EOS script if (_pause > 0 and !_initialLaunch) then { for "_counter" from 1 to _pause do { if (_hints) then { hint format ["Attack ETA : %1",(_pause - _counter)]; }; sleep 1; }; }; They code after that never started. Is there any way to wait for long period? Regards Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 20, 2020 Doesn’t say much Share this post Link to post Share on other sites
VulturARG 5 Posted May 20, 2020 10 hours ago, killzone_kid said: Doesn’t say much I need that a process wait 2 hours for start. Meanwhile the mission is running It's possible? With that code that I wrote before, the code never started to run after those lines. Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 20, 2020 waitUntil { sleep 1; time > 7200 }; // your code 1 1 Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 21, 2020 13 hours ago, VulturARG said: I need that a process wait 2 hours for start. Meanwhile the mission is running It's possible? With that code that I wrote before, the code never started to run after those lines. sleep (2*60*60); // your code 1 1 Share this post Link to post Share on other sites
VulturARG 5 Posted May 21, 2020 14 hours ago, killzone_kid said: sleep (2*60*60); // your code Some people told me that Arma 3 can kill process if it are in a long waiting loop. I don't know is that is true. This was the reason to my question. Share this post Link to post Share on other sites
Harzach 2517 Posted May 21, 2020 A sleep isn't a loop. A while/do loop will, in specific situations, terminate itself after 10k iterations, but that's not relevant here. Other than that, not sure what "some people" are talking about. 1 Share this post Link to post Share on other sites
Dedmen 2700 Posted May 22, 2020 On 5/20/2020 at 6:37 PM, M1ke_SK said: waitUntil { sleep 1; time > 7200 }; // your code If you want to wait 2 hours, checking every second seems a bit excessive doesn't it? Checking once per minute would be more than sufficient.. 1 1 Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 22, 2020 1 hour ago, Dedmen said: If you want to wait 2 hours, checking every second seems a bit excessive doesn't it? Checking once per minute would be more than sufficient.. Not very much information to go on how OP want to use it tho. This is general idea that works for every case. It depends on use. From what I see, he is using it for some counting ETA to some wave, so you probably want to have precise counter there. 1 Share this post Link to post Share on other sites
killzone_kid 1330 Posted May 22, 2020 20 hours ago, VulturARG said: Some people told me that Arma 3 can kill process if it are in a long waiting loop. I don't know is that is true. This was the reason to my question. unless you terminate the script with 'terminate' command or overload the scheduler so that it gets broken, the script won't be unloaded from scheduler 1 1 Share this post Link to post Share on other sites
VulturARG 5 Posted May 23, 2020 On 5/22/2020 at 7:15 AM, M1ke_SK said: From what I see, he is using it for some counting ETA to some wave, so you probably want to have precise counter there. Yes, I count for a few minutes, to long waits. It's will be used in different situation in parallel Share this post Link to post Share on other sites
VulturARG 5 Posted May 23, 2020 Thanks to all!!! I run some test and I saw that using for with sleep, have delays in busy servers. I'll try this solution: On 5/20/2020 at 1:37 PM, M1ke_SK said: waitUntil { sleep 1; time > 7200 }; // your code Share this post Link to post Share on other sites