JeyR 2 Posted November 18, 2018 The possibility of it checking the same area is very small (or it would be if random would work as intended here). The chance of checking the same area is really small because: 1- the script calculates 4 random distances, and random headings for each distance, 2-since every distance and heading is random you can clearly see the impossibility. But for some unknown reason, the random functions gets stuck in 1 distance and heading on my PC . Share this post Link to post Share on other sites
Harzach 2517 Posted November 18, 2018 You might also want to try this very nice bit by Shuko: Share this post Link to post Share on other sites
JeyR 2 Posted November 18, 2018 Yes you see, the problem is that I don't want to create markers for this. I don't want anything in my mission editor nor I want to place any units/objects on the map . Share this post Link to post Share on other sites
gc8 977 Posted November 18, 2018 BIS_fnc_findSafePos takes blacklist where you can put positions already taken Share this post Link to post Share on other sites
pierremgi 4853 Posted November 18, 2018 Just now, JeyR said: The possibility of it checking the same area is very small (or it would be if random would work as intended here). The chance of checking the same area is really small because: 2-since every distance and heading is random you can clearly see the impossibility. Not saying you will re-run the same distance/heading, just saying that you don't optimize the finding. Share this post Link to post Share on other sites
JeyR 2 Posted November 18, 2018 Just now, pierremgi said: Not saying you will re-run the same distance/heading, just saying that you don't optimize the finding. Yes okey, I understand. But first off I just want this to work properly, then I can work on optimizing the algorithm. Share this post Link to post Share on other sites
Harzach 2517 Posted November 18, 2018 Just now, JeyR said: Yes you see, the problem is that I don't want to create markers for this. You don't need to. Share this post Link to post Share on other sites
pierremgi 4853 Posted November 18, 2018 Just now, gc8 said: BIS_fnc_findSafePos takes blacklist where you can put positions already taken Everything is in this function. So, it's probably a waste of code looping it. Share this post Link to post Share on other sites
JeyR 2 Posted November 18, 2018 What do you mean everything ? How do I tell that function to find a random position on the map then start searching? Nohow. It only searches for a designated small area. You have to give it the default position. And my script is trying to find a random default position. Share this post Link to post Share on other sites
JeyR 2 Posted November 18, 2018 Nevermind I just found this https://community.bistudio.com/wiki/BIS_fnc_randomPos 1 Share this post Link to post Share on other sites