Hello
I have a button that skips in 2 different positions randomly. Now I want that if I click on the button somenthing must happen but if click on another part of the screen should happen something else. this is what i coded at this moment.
local button = display.newImage("button.png") local position = { 123, 23, } funciton skip(event) transition.to(button{time = 0 , x = position[math.random=(1,2)]}) end button:addEventListener("touch" , skip)
Now I don’t know how to proceed