Hi All
Im trying to come up with the most efficient way to do this but can’t seem to get to an end point, tried a while statement but that only compares one value to another.
I have these coordinates on a screen set in a table array:
cordx = {
[1] = 160,
[2] = 260,
[3] = 60
}
cordy = {
[1] = 100,
[2] = 250,
[3] = 400
}
x = cordx[math.random(1,3)]
y = cordy[math.random(1,3)]
But I want to assign x and y to 9 objects on the screen. However, I would like all of them to be placed in a unique set.
e.g.
object 1 = 160 (x), 100 (y)
object 2 = 160 (x), 250 (y)
object 3 = 60 (x), 100 (y)
But no clashes or overlaps of more than 1 object on the same coordinate x & y.
Any help would be greatly appreciated