Space don't work as expected - Printable Version +- Colobot Forum - International Colobot Community (https://colobot.info/forum) +-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76) +--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58) +---- Forum: General (https://colobot.info/forum/forumdisplay.php?fid=59) +---- Thread: Space don't work as expected (/showthread.php?tid=750) |
Space don't work as expected - Smok - 03-28-2016 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? RE: Space don't work as expected - tomangelo - 03-28-2016 In my case third ore threw error, but I can confirm there might be something wrong with space(). RE: Space don't work as expected - DungeonLords - 05-29-2017 At space command what means dist: float (default value: 4) Required distance between two free spaces. ??? I don't understand RE: Space don't work as expected - Bhudh - 05-30-2017 This is the nearest place for next dropping. RE: Space don't work as expected - tomaszkax86 - 05-31-2017 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(). |