Peg Puzzle with Snap To and Animate

Get help using Construct 2

Post » Wed Jan 07, 2015 1:54 pm

I would like to know if it's possible to create a Peg Puzzle with the same type of behaviours as in this Demo videohttps://www.youtube.com/watch?v=qC0fZZFB2XU.
Being able to drag the pieces from the side panel and allow them to snap into place from within say 35px and then animate the sprite, so far eludes me.
I would be most grateful if anyone has some code hints, tutorials etc to point me too.
Thanks
B
9
S
1
Posts: 61
Reputation: 929

Post » Wed Jan 07, 2015 3:22 pm

Put a detector sprite at each point you want to snap to. Make it as large as you need eg. 70px. Use the drag and drop behavior on your animations then check that the dropped sprite overlaps the detector. If it does set the sprite x,y to the centre of the detector. Then run your animation.
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 23 guests