How do I create a touchscreen drag and drop system?

Get help using Construct 2

Post » Wed Jun 17, 2015 10:02 pm

Hi Guys, I'm creating a child game which is drag and drop and basically the player will have to decorate a cake for example... and he will drag and drop the objects above the cake.


I would like to know how to create an effective drag and drop system..



Thanks!
B
5
S
1
Posts: 60
Reputation: 495

Post » Wed Jun 17, 2015 10:44 pm

Olá, colega brasileiro! Interessante o foco em um jogo infantil, legal!
Bom, basta atribuir o behavior "drag and drop" para os objetos os quais você deseja que sejam arrastaveis. Você deseja configurar para que o objeto arrastado fique fixo no bolo, correto? Se sim, posso te ajudar passo-a-passo.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
26
S
8
G
4
Posts: 336
Reputation: 4,050

Post » Wed Jun 17, 2015 10:58 pm

as DaniellMesquita said, use drag and drop behavior. Then when the object overlap with a cake, do a checking whether it is on drop condition then set the action to drop. Additionally you can include pin behavior to attach the object to the cake as the cake move.
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394

Post » Wed Jun 17, 2015 11:21 pm

Yes. The idea is pinning the chooseen objects in cake to prevent objects falling when cake have an movement, and prevent the people to remove objects of cake in occasions that will be necessary.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
26
S
8
G
4
Posts: 336
Reputation: 4,050

Post » Wed Jun 17, 2015 11:28 pm

Oh thank you so much Guys !!!!! I will try this !
Just to know, may I must do something to make the game recognize touchscreen using this drag and drop behavior? or it recognizes automatically?

@DanielMesquita , manda seu facebook por pm !! valeu pela ajuda.
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Jun 18, 2015 1:18 am

@caiocesar , ele irá reconhecer automaticamente, tanto Touch quanto Mouse. Quanto ao FB, te envio quando eu puder, tendo 500 rep. Boa sorte com o jogo. Assim que possivel irei te contactar no Facebook e poderei dar uma ajuda mais próxima do jogo.
Liked something I say?
Tip. My Bitcoin address: 1PLaeKmXQ8vEdGGJqXMq3KyB8hxeddxeSv
B
26
S
8
G
4
Posts: 336
Reputation: 4,050

Post » Thu Jun 18, 2015 10:58 am

@DaniellMesquita Muito obrigado!
B
5
S
1
Posts: 60
Reputation: 495


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 45 guests