How do I create multi touch for 2 players

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello everyone,

    I am trying to make an air hockey kind of game for mobiles and tablets but also want to make 2 players mode.

    I added drag and drop to both of the players and also did the following for both players

    Everytick>> Set Player1 Position to Touch.X - Touch.Y

    Everytick>> Set Player1 Position to Touch.X - Touch.Y

    When I do the above procedure for the player 2 things starts to gets messed up. Basically what happens is both player1 and player2 sets its positions to the first touch and player 2 can not be controlled with the second touch gesture on the tablets. I searched the Forums and also checked the manual. I guess I should use n-touch but really couldn't find any solution.

    I would really appreciate the help and advice.

    Kind Regards


  • You just told engine on any touch set positions of both P1&P2 (you wrote p1 for both line but i guest that was a mistake) so both trying to set in position on same axis of the touch.

    If you are making air hockey game i assume you have 2 paddles, one for player1 & one for player2. In this case you may try this:

    In everytick:

    ---> Touching Object(paddle1) set player1.X to paddle1.X / setplayer1.Y to paddle1.Y

    ---> Touching Object(paddle2) set player2.X to paddle2.X / setplayer2.Y to paddle2.Y

    Hope it will help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm Thank You I will try this. Thanks a lot for the help!

    Kind Regards

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