multiple touches in areas

0 favourites
  • 5 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • i'm looking for a way to manage 4 touches on one screen.

    there should be 4 sprites. one at each corner and they should be movable by a touch in the appropriate corner.

    My idea was to divide the screen in 4 invisible large sprite which cover up each corner for sure. can i somehow give every touch a different ID, according to the invisible sprite touched?

    if i would do so, touch should be able to touch more than one sprite .. like sprite1 on layer1 and sprite2 beyond on layer0. is it possible to detect that with the event "is touching object" ?`

    do you guys know what i mean? its a bit hard to explain. at the end, four players should be able to move their own sprites in each corner and if their touches end and the touch again, it should't confuse my game.

    cheers!

    EDIT: Problem solved. See comment below for Live demo and capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • <SNAP> I think the scirra.com/manual/119/touch manual beat me to it.

    each touch has it's own ID. Just track with Touch ID touched what sprite and track it. All touches are passed through the layers. I'm not sure if it's top down or bottom up for even triggering.

  • thanks for your quick answer. i read the manual, but i'm still not getting it very well. I understand that every Touch is given an ID but i havent really figuered out how to use it right.

    hm its tricky.

    i tried something. have a look if you want to. its not quite working yet.

    Live Demo

    https(colon)//googledrive.com/host/0B7m-eoWIKsSMRklGenZEY1FMUlU/index.html

    capx File

    https(colon)//www.dropbox.com/s/ces4n4m04giuipa/id-test.capx

    i have to work on it much more but I haven't got much time right now. Have you ever achieved a good working multi touch game?

  • i made it.

    here's a live Demo

    googledrive.com/host/0B7m-eoWIKsSMeVNlVzBzMTdFanM/index.html

    and this is the capx file.

    dropbox.com/s/j5v8oi5ruuyyp4y/multiple_touching.capx

    maybie i'll do a tutorial later on.

  • Thanks for sharing philx!

    I've been trying to solve this for a while, but couldn't quite get my head around it. Great work!!

    <img src="smileys/smiley20.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)