If I understand your method correctly, it will distribute sprites in 10px intervals. I don't want this.
See my picture above - one sprite may be at x=8, another at x=21 etc.
Ok, well you said not overlapping, but possibly touching.
If non multiple of 10 was wanted, just do a randomiser afterwards
distance(sprite(loopindex-1).x,sprite(loopindex-1).y, sprite.x,sprite.y) >5 and distance(sprite(loopindex+1).x,sprite(loopindex+1).y, sprite.x,sprite.y)>5, set x to self.x+ random(-5,5)