[Solved]Can I get the initial X/Y of a specific object?


I want the draggable object to go back to its original place if you don’t drop it in the right place. Since this is going inside a Function for all my draggable objects- is it possible to get the initial X and Y values of the specific object before it gets dragged? My intention is for each object to go back to its rightful place.

Thanks !

You could use object variables to store the specific X and Y co-ordinates. Make two object variables for it, say “startPosX” and “startPosY” and when the object is first touched, give the variables the object.X() and object.Y() data (make sure this only runs once).

Then, if the object is dropped, you can position the object at the X and Y values in the object variables. Example : Set position X of object to object.Variable(startPosX)

1 Like

It worked perfectly, thank you so much!!

1 Like