How to implement Touch (X & Y) for 2 players on same screen?

0 favourites
  • 2 posts
From the Asset Store
Save hours of work by resizing items on your game screens.
  • Hi..

    For an example, imagine a Air-hockey type of game (horizontally), split in two halves with a vertical line in the center.

    Now to control the paddles, I cannot find a way with the existing Touch events like "Nth touch", because in Two-player game, any player can lift and press their touch at anytime, which will change the N'th number.

    Can someone please help me with an algorithm to enable controlling two objects' position (X and Y), based on the nearest Touch?

    Note: I already tried with: If Touch.X > Layout.Width/2, and its Else. But the action (let's say Paddle.X set as Touch.X) does not refer to the correct player's touch.

    Please help,


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would "Drag and Drop" behavior work for what you want? It works that way already. Two things can be dragged at the same time.

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