Question about x / y positioning.

Hi there code-masters!

I have a question for you guys, here it goes:

The following code is an example.

local function MOVE ( event ) if event.phase == "began" then IMAGE.x= 50 IMAGE.y= 50 end end

When this code is started, the IMAGE is moving 50x and 50y everytime.   I want it not to do that!
I want my IMAGE to get back to the x/y=50 position.   If i have a drag function so i can drag around IMAGE and place it on a new position. I want my example code above (MOVE)  to get it back to where it first started, and not add 50pixels aside each time.

Hope i made myself clear enough, sorry for the bad English and grammar.

Ask if there is something you guys dont understand in my question!

Thank you!

So you want the image to be draged, then return to it’s original position?

This is my problem.

I want my Image1 to start at x=50 and y=50.

Image1

Button1

And if you drag Image1 and dropps it, it should stay at that position.

But when you press Button1, i want Image1 to get back to x50 and y50, but if i press Button1 3times, Image1 will move where it shold be times 3. So it ends up at x=150 y=150 and what i really want is that it just returns to its original position everytime i press Button1 (x50 , y50).

But i would really like to know to how to get it to its original position after i realease it :slight_smile:

Thank you for your time!

So you want the image to be draged, then return to it’s original position?

This is my problem.

I want my Image1 to start at x=50 and y=50.

Image1

Button1

And if you drag Image1 and dropps it, it should stay at that position.

But when you press Button1, i want Image1 to get back to x50 and y50, but if i press Button1 3times, Image1 will move where it shold be times 3. So it ends up at x=150 y=150 and what i really want is that it just returns to its original position everytime i press Button1 (x50 , y50).

But i would really like to know to how to get it to its original position after i realease it :slight_smile:

Thank you for your time!