Hello there,
If it helps, here is a basic guide on how I accomplished this. (Sorry this is not optimized, but it does get the job done.)
Let's imagine we have 2 pieces of our jigsaw puzzle.
Setting up the hotspot.
Moving the puzzle piece around the screen.
[A] - First thing we want to do is get the data for where the mouse is on the screen with the
Input Data function.
[ B] - Next, we'll assume the player won't always be clicking on the exact same spot of the puzzle piece, so we'll include an offset to fix the piece to be centered on the mouse.
[C] - Basic move picture command using our retrieved data points.
[D] - Checks whether or not the left click is being held or not, will end this event if the left click is released.
Snapping piece #1 into place.
[A] - We'll need to determine the screen coordinates of where piece #1 should be.
Note: An easy way to do this is simply drag the piece to where you want it to be, and then use the "Get object data : position" command. OR, you can use trial and error method of inputting your coordinates. Up to you.
[ B] - Once we know the coordinates of where piece #1 should be, (in this example X = 533, Y = 498) we'll have to assume the player won't be placing the puzzle piece into this exact spot.
[C] - Use the "Get object data" command to check where the user has placed this puzzle piece.
[D] - Create some tolerance for snapping the piece into place. I used a tolerance of 10, so if the user places the pieces anywhere between X = 523 - 543, and Y = 488 - 508, the process will still complete.
[E] - Erase the hot spot so the user can no longer move the piece if you wish, then use move picture command to place the puzzle piece into it's exact fitment position.
[F] - Create a switch that will tell the game that each piece is in place and call an event that checks that all puzzle pieces are in place.
Again, this is poorly optimized seeing as you'll have to most likely create common events for each seperate puzzle piece, but perhaps another could expand on this.