Problem with touch

Get help using Construct 2

Post » Tue May 07, 2013 2:11 pm

Hi,

I got problem with my c2 project.

I got a sprite, if a user click the sprite, the sprite will disappear and sprite2 will be spawned in the same location as the sprite.

if the sprite2 is clicked, then another action will be executed.

The problem is that everytime I click/touch the sprite, the sprite will disappear but it will make the sprite2 clicked.

How do i resolve this problem?

Thanks,

B
17
S
3
G
3
Posts: 109
Reputation: 2,747

Post » Tue May 07, 2013 3:01 pm

It might be because it's happening so fast that one click triggers both sprite 1 and sprite 2 as it's created. I would put a short "wait" action somewhere in the process to avoid that.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Tue May 07, 2013 6:40 pm

Put the sprite 2 clicked event before the sprite 1 event. This way the sprite 2 event wont happen on the same tick
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,134

Post » Tue May 07, 2013 8:00 pm

you can create a variable canClick for sprit1 and sprite2 it can be true or false. The init value is false, when you think the spirte is ready to click,change the value to true.

on Click sprite
canClick == True ---> Then do something

B
5
Posts: 8
Reputation: 294


Return to How do I....?

Who is online

Users browsing this forum: jeffige, Yahoo [Bot] and 0 guests