Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Space don't work as expected
#1
I'm trying to use goto(space(spaceShip.position)); drop(); to store Titanium Ore in my spaceship. For the first ore it works ok, but for next program ignores existence of first one trying to put second ore on place occupied by first one. I'm doing something wrong or space() is broken?
#2
In my case third ore threw error, but I can confirm there might be something wrong with space().


Attached Files Thumbnail(s)
   
Spoiler :
[Image: unknown.png]
#3
At space command what means

dist: float (default value: 4)
Required distance between two free spaces.

??? I don't understand
#4
This is the nearest place for next dropping.
#5
From what I gather, space() searches for a free place that is a circle with given radius (the dist parameter). When a free space is found, it is guaranteed not to have any items within that circle. When searching for a space to drop items, this controls how densely they will be placed. Small radius will result in denser item placement while bigger radius will result in quite a spread. You can see how it works if you add a parameter to space() in CollectTitanium3().
"After three days without programming, life becomes meaningless."
~The Tao of Programming


Forum Jump:


Users browsing this thread: 1 Guest(s)