I have this function
local function cambiodesp(old,new)
block[new]= block[old]
end
and i have this:
random=4
local image = display.newImage(images[random], 0, 0)
image.value = random
image.x = 161
image.y = 451
block[0] = image
random=1
image.value = random
local image = display.newImage(images[random], 0, 0)
image.x = 161
image.y = 515
block[1] = image
i want to change the block.value of the images, the reference of the images in block, but i dont want to change the coordinates. I'm calling the function:
cambiodes(0,1)
but the coordinates are changing and i don`t know what to do.
I hope you can give me an answer, advice or whatever you think.
Thank you very much