Colobot Forum - International Colobot Community

Full Version: the space() function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The space() function. In colobot 1.9 /pl.
I've read its SatCom description.
Then I did some tests.
The results made no sense.
It returned points that did not fulfil the requirements specified by the function parameters.
Or points points inside buildings.

Does someone know how it really works?
I never fully understood parameters of this function. If you use all default values it'll find some free space, enough to leave a portable object there.
You can try with this function I've made a long time ago. https://github.com/krzys-h/colobot-super...#L241-L256
It's not perfect, you can clearly see the circle shape it uses to find positions.