Track only one touch?

0 favourites
  • 3 posts
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • Hello, I am trying to make a reflex based game where the use can move certain objects around the screen. For balance reasons, only one touch should be used to manipulate objects.

    One solution I tried was to have a variable track the fingers by adding one for every new touch and subtracting one for every touch end. Then every manipulable object would have a condition stating that the touch count must be fewer than one.

    The problem with this is that whenever I touch a second finger and then remove it, the variable changes to zero, which makes all the object manipulation stop. This inadvertently punishes the player for trying to use two fingers, but also causes problems for players who might be holding a phone and let a thumb slide onto the edge of the screen. I am not sure why the variable changes to zero, since the event is to subtract 1 per touch end.

    Is there a simple way to make the game only track whatever the first touch point was?

    Thanks for your time!

  • Bump!! i need to know this too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I haven't tested this on a tablet, but I think this may work. It makes only one sprite dragable at any given time, so the use of a variable isn't nescisarily needed.

    dl.dropbox.com/u/108799982/Capx%20Demos/TouchDrop.capx

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