Jump to content

JeyR

Member
  • Content Count

    61
  • Joined

  • Last visited

  • Medals

Community Reputation

2 Neutral

About JeyR

  • Rank
    Corporal
  1. Nevermind I just found this https://community.bistudio.com/wiki/BIS_fnc_randomPos
  2. 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.
  3. Yes okey, I understand. But first off I just want this to work properly, then I can work on optimizing the algorithm.
  4. 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 .
  5. 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 .
  6. Find a safe spot for a composition to spawn , randomly.
  7. Okey, I have to be missing something then. I am calling this script via debug console. like this : [100] spawn CHAB_fnc_findSpot; Each of my functions are listed in CfgFunctions.hpp. What do I do wrong?
  8. 17:49:03 "_spot = [9666.13,3028.81,0]" 17:49:03 ">>> [9531.69,2972.07] 167 [9666.13,3028.81,0] " 17:49:03 ">>> [9455.88,3236.07] 38 [9666.13,3028.81,0] " 17:49:03 ">>> [9409.98,3141.88] 44 [9666.13,3028.81,0] " 17:49:03 ">>> [9784.95,2756.75] 103 [9666.13,3028.81,0] " 17:49:03 ">>> [9478.4,3219.99] 66 [9666.13,3028.81,0] " 17:49:03 ">>> [9432.54,3081.66] 112 [9666.13,3028.81,0] " 17:49:03 ">>> [9464.37,3226.52] 45 [9666.13,3028.81,0] " 17:49:03 ">>> [9672.66,2894.3] 131 [9666.13,3028.81,0] " 17:49:03 ">>> [9427.07,3079.41] 109 [9666.13,3028.81,0] " 17:49:03 ">>> [9411.67,3120.7] 75 [9666.13,3028.81,0] " 17:49:03 ">>> [9499.26,3231.2] 92 [9666.13,3028.81,0] " 17:49:03 ">>> [9650.26,2901.7] 129 [9666.13,3028.81,0] " 17:49:03 ">>> [9455.83,3235.39] 38 [9666.13,3028.81,0] " 17:49:04 ">>> [9454.94,3095.55] 126 [9666.13,3028.81,0] " 17:49:04 ">>> [9778.71,2757.8] 105 [9666.13,3028.81,0] " 17:49:04 ">>> [9486.06,3108.22] 126 [9666.13,3028.81,0] "
  9. I can't see it, the 2nd run just printed _spot as [6000.58,4245.9,0] 20 times in a row. What do you mean it varies ?
  10. No it doesn't, I can see it clearly. The _spot didn't change in the last 20 cycles [6000.58,4245.9,0]. Don't tell me you don't see it. _spot is supposed to be random, not the same number in each cycle. Get it ?
  11. _howbig is always more than 100 meters, of course it works with 11. I might have forgot to mention that.
  12. How do you get only 1 print? Here is my output, and I just raw copied my script into pastebin : https://i.gyazo.com/0a4263a9d70009a2ebbe9b1418d6e196.png
  13. https://pastebin.com/dvaUQzZu
  14. Yes it does, and if you don't believe it, try it. I can upload the whole file if need be.
  15. I know that the output is correct. Did you read my question? I want to know why the "[ (random 2000), (random 350)]" keeps giving back the same numbers in each cycle ?
×