Michal11
You could try adding a subevent with a loop that continues to reposition the object until it's found an empty space..
This will loop a lot of times though if there is very little space for it to occupy
Also I haven't tested so it might not work as it is, but it's an idea.
repeat x times
-> system create object x random (10,8000), y random (0,500)
[subevent]repeat (maximum number, just set to 20 or higher) times
object is overlapping object
->set object(1) position x random (10,8000), y random (0,500)
else
-> stop loop
object(1) is a way to single out one of the object instances after the "object is overlapping object" condition.
It's not perfect, there is probably a better way.