How do I get multitouch working?

Get help using Construct 2

Post » Tue Sep 27, 2016 10:54 pm

Message: theryan722 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello,

I built this example project with the touch plugin, and tested it on mobile.
When you tap on a block, it disappears adding 1 to the score. However, if you use more than one finger, it stops working.

Can somebody please explain how to fix this?

You can get the project capx here: https://mega.nz/#!J4BBQaqB!fpSRSp8kdywgTT_3PDLBlcSt3M7FcZWo7hHR9uafDdc

Thanks in advance.
B
7
S
1
Posts: 5
Reputation: 387

Post » Wed Sep 28, 2016 1:48 am

Simple, don't use the "tap" guessture, and instead use "is touching object" or "on touched object" instead.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Wed Sep 28, 2016 5:30 am

I have tried that, same problem.
B
7
S
1
Posts: 5
Reputation: 387

Post » Wed Sep 28, 2016 5:54 am

It works fine if you change it to On touched Sprite.

Your project has a few other problems though:

Your hammer position is set to touch.x, touch.y, which is always the first touch's position. You'll want that to be Touch.XAt(Touch.TouchCount-1) and Touch.YAt(Touch.TouchCount-1) to set it to the position of the LAST touched position.

Also you are using Trigger once improperly. It should not be in a subevent. This can cause your event to break in certain cases, where the health can keep going below 0 and the sprite can never get destroyed again as the event will never run again.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Thu Sep 29, 2016 2:46 am

If I place Trigger once as a condition, it stops working. If I remove it completely, the score goes up by like 10 points every time. :(
B
7
S
1
Posts: 5
Reputation: 387

Post » Thu Sep 29, 2016 2:56 am

Mistakes were made.
B
53
S
27
G
114
Posts: 1,695
Reputation: 64,438

Post » Thu Sep 29, 2016 3:08 am

Thank you so much!! I will remember this for future use :)
B
7
S
1
Posts: 5
Reputation: 387


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 8 guests