Hi, trying to create a classic Jigsaw ''torn-up note'' for my game. I got as far as giving each piece of the note the pin behavior and the drag and drop behavior.
Then, I made sure that when you click a piece it goes to the top by adding ''Move to top of Layer", and the ability to turn them 90 degrees on right-click.
Then came the harder part. If I drop i.e. Note piece 1, it needs to connect to Note piece 2 when in range and at the right angle. So I gave both an image point at the edge and used the "Set Position" with: NastyNote_2.ImagePointX(1) - NastyNote_1.ImagePointX(1)-NastyNote_1.X) (NastyNote_2.ImagePointY(1) - (NastyNote_1.ImagePointY(1)-NastyNote_1.Y). Again, this works. Nice!
Then I used the pin behavior to first determine the distance where piece 1 should be pinned to piece 2 by using: distance(NastyNote_1.ImagePointX(1),NastyNote_1.ImagePointY(1),NastyNote_2.ImagePointX(1),NastyNote_2.ImagePointY(1)), and then I pinned the pieces to each other. This works great as well.
Now, my issue is that when note piece 1 is pinned to note piece 2, only note piece 2 remains functional. What I want to achieve is to get all the pieces that are pinned together to the top of the layer when clicked, just like the individual pieces when you click them, and I want the thing to be draggable as a whole unit no matter where you click. Those are the two final issues with my puzzle. So essentially I would like the pinned pieces to follow up on the behavior of whatever piece is selected, or I want to make some type of new object from the pinned pieces if possible.