Desperate Help needed with Array's

Hey all so I have created some arrays and i need desperate help with what i do next:

Y = {} Y[1] = 333 Y[2] = 493 Y[3] = 653 Y[4] = 813 Y[5] = 973 X = {} X[1] = 126 X[2] = 282 X[3] = 439 X[4] = 597

In these arrays they are the X and Y pixel coordinates for where I want images to be randomly placed! Easy enough but How do i prevent one image overlapping another!?

There are 20 different possible places that the images can be place!

I need the images to spawn one image at a time on different coordinates every second.

How do I do this?

Please help I will be so grateful.

James Mallon

Probably you use math.random() to choose the X and Y coordinates. Simply store those pairs that you have already randomly picked and ignore them on subsequent math.random() calls.

EG. random: X[1] Y[3]  -> you store it in picked[1] = {x=1, y=3} and then with following random picks you check agains picked array.

Probably you use math.random() to choose the X and Y coordinates. Simply store those pairs that you have already randomly picked and ignore them on subsequent math.random() calls.

EG. random: X[1] Y[3]  -> you store it in picked[1] = {x=1, y=3} and then with following random picks you check agains picked array.