Drag and drop puzzle

Get help using Construct 2

Post » Wed Oct 02, 2013 5:47 pm

Hello everybody,

I am a really new user of Construct2 and I am going through some tutorials so far.

I was looking for a tutorial or a capx example of a puzzle with drag and drop behaviour.

Basically I want to know how to implement something that would work like a 4 piece kid puzzle.

We would have 4 piece that can be dragged and dropped and a shape where we could drop the piece to make the puzzle.

When being close to the correct position the piece would be automatically places at the correct position.

Is that something that could be done with the basic version of the soft (I am currently practicing with the free version and will go for the licensed when I'll have better use of the tool).


Thx a lotLopimp2013-10-02 17:49:21
B
11
S
2
Posts: 40
Reputation: 811

Post » Wed Oct 02, 2013 5:52 pm

There is a preset drag and drop behaviour you can use. Consult the manual here plinkie2013-10-02 17:53:11
B
46
S
16
G
73
Posts: 2,083
Reputation: 43,675

Post » Wed Oct 02, 2013 5:58 pm

Thanks

My lack of knowledge would be more about the setup of the 'board' itself.
Would it be using sprites or is there some kind of grid element or other object that should be used?
B
11
S
2
Posts: 40
Reputation: 811

Post » Wed Oct 02, 2013 6:07 pm

A grid might be too complex but you are more than welcome to try and create a grid idea using arrays or something similar. For this kind of functionality though I would have slots and when a sprite object is dropped and touching a slot it is moved to match the exact position of the slot so it is locked in place. Other logic depends on what you want to happen when the player drops on an incorrect slot etc.
B
46
S
16
G
73
Posts: 2,083
Reputation: 43,675


Return to How do I....?

Who is online

Users browsing this forum: eochranek, fearfulelephants and 18 guests