Drag and drop on android

Get help using Construct 2

Post » Wed Dec 11, 2013 6:04 pm

Hi there,

Im struggling with this for almost a day, i would appreciate if anyone can help.

I want to make an item appears when an object is touched (i solved that), and drag it and drop to another object, wich is a field.Like taking a apple and dragging it into a basket where it stays.
Im using a touch function for android.

Can anyone help me on this?
B
5
Posts: 25
Reputation: 750

Post » Wed Dec 11, 2013 7:08 pm

You just need to put the "Drag & Drop" behavior on the object
B
21
S
8
G
7
Posts: 49
Reputation: 5,274

Post » Wed Dec 11, 2013 7:30 pm

[QUOTE=Seasky] You just need to put the "Drag & Drop" behavior on the object[/QUOTE]
Yeah i just figured out :).Thanks, but do you know how to do this?

When an apple is dropped in the basket, you can't drag it anymore.
I tried with global variables but it is still moving.Any idea?
B
5
Posts: 25
Reputation: 750

Post » Wed Dec 11, 2013 7:42 pm

Hmm... You just need to disable the behavior when it's overlapping the basket:

-> Apple: On drop
   Apple: Is overlapping Basket
      - Apple: Set DragDrop disabled
B
21
S
8
G
7
Posts: 49
Reputation: 5,274

Post » Wed Dec 11, 2013 8:08 pm

[QUOTE=Seasky] Hmm... You just need to disable the behavior when it's overlapping the basket:

-> Apple: On drop
   Apple: Is overlapping Basket
      - Apple: Set DragDrop disabled[/QUOTE]
You mean dragdrop enabled (invert)?
Tried and it is the same problem :/.
B
5
Posts: 25
Reputation: 750

Post » Wed Dec 11, 2013 8:30 pm

Well, let's see if I understood your problem... You need to click a button and spawn an apple, and then drag this apple to a basket and disable this drag, is that it?

Example: Spawn_Apple.capx
B
21
S
8
G
7
Posts: 49
Reputation: 5,274

Post » Wed Dec 11, 2013 8:38 pm

[QUOTE=Seasky] Well, let's see if I understood your problem... You need to click a button and spawn an apple, and then drag this apple to a basket and disable this drag, is that it?

Example: Spawn_Apple.capx[/QUOTE]
Yeah exactly, and i solve the problem, thanks for the help mate! :).
B
5
Posts: 25
Reputation: 750


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, ST314, tarek2 and 34 guests