I have 2 objects. I want to drag one up and the other one to move down the same pixels as the first object. Please help.
want to metion that the 2 objects are in fact only one object but with different UID
Here is one way to do it.
You need to add two instance variables to your object:
initY
master
Set master=1 for the first object that you want to drag up. Set master=0 for the second object that will move down.
Then add this code:
Develop games in your browser. Powerful, performant & highly capable.
Hey robertg92!
It's just like dop2000 mentioned above, but, since you want it to respond to dragging, you'd have to give the sprite the drag behavior and use an isDragging event, instead of Every tick. Here's a capx:
https://www.dropbox.com/s/34p9qj7gg4qw4 ... .capx?dl=0
Hope it helps. Cheers!