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 hope someone can help me with this.
What i want to do is when an object1 is placed on top of object2, object2 position will be in the previous origin position of object1 and vice versa
Is this even possible? Thanks in advance!
Develop games in your browser. Powerful, performant & highly capable.
When you pick up object 1, you set object1.x and object1.y to some global variables. When you drop object 1, you set object 1 position to object 2, then set object 2 position to those global variables.
Thank you for your reply —
However this is easy if there are 2 sprites.
Sorry i didn't mention but this is only 1 sprite appearing as 2 object. How can i differentiate them from one another?
Thanks again if you could answer :)
put the sprite in a family, and check if sprite is put on spritefamily.
then you will have both instances picked under different names: sprite.x and spritefamily.x