Drop and Drag Touch problem

Just started using Construct 2? Post your questions here

Post » Tue Nov 01, 2016 7:41 am

Message: chafickolaylat can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Dear , I have small problem for touch ( drop and drag ) , it works late or does not work.

I have 5 colors' shapes ( Orange , Yellow , Blue , popular and green ) . at start of game, Orange , yellow and blue are work but others does not work even though it will too late to work.

Please check this link to download CAPX file at google drive.

https://drive.google.com/open?id=0B0eLlJRjd3fjVkpVUnZIVEgxSGs

sorry for my language is weak but hope you understand well
B
4
Posts: 3
Reputation: 206

Post » Thu Nov 03, 2016 3:09 am

Well, your .capx contains one or more plugins.
Either remove the used plugins and reduce the .capx to what matters to your question or provide links to the plugins used.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Thu Nov 03, 2016 11:00 pm

I have 5 colors' shapes ( Orange , Yellow , Blue , popular and green ) . at start of game

You dont. You have 3 - 4 instances of each Orange , Yellow , Blue , popular and green SPRITE.
Some are outside the viewport.
Most are on invisible top layers.

Since you dont specify witch instance you want to drag, it drags mostly those that are on the invisible layers.

Besides that. If you really gonna use a new sprite for each puzzle piece, you gonna end up with more code then can be hold by your local library.

So, lets do this drag&drop thingy (including a rough solution for detecting the right place) in just 5 events and with no more then 2 sprites.
https://www.dropbox.com/s/pa6qce7lgngoe ... .capx?dl=0






(for others then the opp ... LiteTween plugin needed .. behavior-litetween_t70700)
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests