Touch Controls - Multiple simultaneous touches.

  • Hello! I've been trying to figure this out for a couple of hours, hunted around the forums a bit. I'm trying to make a game in which you're moving with a D-pad and shooting with the tap of a button. I'm testing on a Android phone running 4.3 through the Intel XDK app.

    The problem I'm having is whenever I'm touching a direction on the d-pad and then hit the fire button, the character stops. He'll resume if the fire button is hit again while the d-pad is still being touched, but a bullet will not fire. He'll stop again when the fire button is released. Everything seems to reset to normal when all the controls are released.

    Here's the .capx that I've been working on: <Edit: It won't allow me to post the dropbox URL.>

    Any ideas on how to fix this would be greatly appreciated,

    • Zenny
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Read this:

    https://www.scirra.com/tutorials/398/to ... ers/page-3

    the trick is the "on touched" - "is in touch"-"on touch ended" combination with using the TouchID

  • I'm looking at this tutorial and I'm not quite sure how it applies. I've got 6 objects set-up on my project. Four of those are the up, down, left, and right buttons for the d-pad and two are buttons to fire weapons. Currently if a fire button and a button on the d-pad are hit together then it glitches out. Though I'm only able to produce this glitch when testing through Intel XDK. I did a preview over WIFI and it seemed fine.

    Should I try building the project and seeing if that helps? I'm really not sure what's going wrong.

    I'm using "Is Touching" events for the d-pad and "On Touched" events for the firing buttons.

  • do you just use the "is touching" event or the <<<< "on touched" - "is in touch"-"on touch ended" >>>> combination?

    and do you use Touchid? Touch id is very important for multitouch, your touch controls can glitch around if you are not using it

    Or you really have a bug after building the game

  • Yeah, I ran through some more testing and there seems to be a problem with the test function in the Intel XDK. Built via crosswalk and everything worked wonderfully!

    Thanks for the help.

  • your welcome

    I got a question: How do you build your game for android if you dont have buyed a C2 license?

  • Zenny - It's always best to build an app and test it, versus just using App Preview. It sounds like you may have been testing the Android WebView and not Crosswalk. Crosswalk has better support for touches (including multi-touch).

  • EyeForcz, users that have an educational license or Steam license do not always have the medal that shows by your avatar. The medal only appears automatically when you have purchased using your account through the Scirra store.

    That is all.

    @Zenny good work getting everything to work correctly, and good luck on your endeavors!

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