How do I Detect "In is Touch" and "On Touch End" from a certain TouchID ?

0 favourites
  • 3 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Hi..

    I try to implement multitouch. I want to move 2 separate object following touch position (2 separate touch)

    I can detect the touch ID and move it...

    but When I release the touch (test .apk in Phone not in browser), I need the object disappear or invisible.

    How to do that ? Anyone ? thanks in advance :)

    here is the .c3p

  • you cant use greater that like that for touch id

    Every new touch gets a new id +1 each time

    so it will break your game.

    to do what you want to do keep the AB touch id variables but set them depending on if left of right of the screen. then

    to test if a particular touch has let go you set a condition to test for that id


    on touch off

    touch id (AB for left or right) = xxxx then do whatever

    but looking at your picture I cant help thinking you would be better just testing if the grey boxes were touched instead no?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Net :) thanks

    I figure out something but kind of weird.. :D

    Like you say new touch gets new id +1 each time.

    since I do this stuff on laptop and my laptop screen is not touch screen, when I try the intermediate template like Touch Zooming, the ID only blink between 0 and -1

    But when I try to export it to .APK and run it on phone (with touchscreen), I saw touchID keep increasing in every touch.

    and yes.. i am thinking to make the grey box (sprite) separately become 2 different sprite object

    then use "on touch object [ ]" to indentified the touchID and save it in certain variable

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