hi,
I use a grid to position element and i use a random function to put this element.
My question is how to have single value gX or gY to be sure that some element are not at the same position?
the problem is that “numberelement” could be change between my levels.
local grid={} .... local function randomGrid() --to have random number to my grid gXc=math.round(mathr(1,row)) gYc=math.round(mathr(1,line)) gX=grid[gYc][gXc].x gY=grid[gYc][gXc].y end
for i=1, numberElement do--numberElement = 5 or much... randomGrid() transition.to(element,{time=400,x=grid[gY][gX].x, y=element,x=grid[gY][gX].x}) end
