Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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:
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.
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!