How do i swap object between 2 places.?
example would be :
A at position 1.
B at position 2.
when i drag A(at pos 1) and move to B(at pos 2, B will automatic move to Pos 1(which is previously held by A)
Thanks..
Develop games in your browser. Powerful, performant & highly capable.
You use the drag and drop behavior for objects, and when A is over position 2, on mouse release you can set A.x and A.y to position 2. Visa versa for B.
Can you show me an example capx? thanks.
I was afraid you would ask this... give me a bit.
https://drive.google.com/open?id=0B-xiq ... GRfSlpHd00
Seriously though, you need to learn to search Google or the Scirra forums for stuff. You can even use cascaded searching in the Scirra forums.
Thanks for the capx gumshoe2029 . But how do i swap back to original position?
Just reverse the original variables for A & B.