On Touch Released?...

Discussion and feedback on Construct 2

Post » Thu Oct 15, 2015 11:37 pm

@rinesjoseph and @ankushtaneja

The easiest way to do it is to only handle one touch at a time - and use the On Nth touch Start, Has Nth touch, and On Nth touch End.

Use N=0 (zero), so you will have events for On touch 0 Start, Has touch 0, and On touch 0 End. Your game will ignore 2nd, 3rd or more simultaneous touches, but at least it will work. The vast majority of the time, for a simple game, people will only try to use one touch at a time anyway.

If you want to properly handle multi-touch, you use On any touch Start, Is in touch, and On any touch End. But then you have to use touchID to tell the various active touches apart. Use Touch.XforID and Touch.YforID to track where the touches are going. And then On any touch End you check the touchID to see which of the touches has ended, and process accordingly.

I would start with the single touch method until you have a good handle on how it all works, and only add multi touch support if you really need it.
Posts: 438
Reputation: 17,960

Post » Thu Dec 24, 2015 5:19 pm

Allan R you just dropped some gems :) meaning i learning something for the future. Thank you
Posts: 47
Reputation: 478


Return to Construct 2 General

Who is online

Users browsing this forum: rozpustelnik and 4 guests