How do I create multi touch for 2 players

Get help using Construct 2

Post » Thu Nov 13, 2014 11:14 pm

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

Volkan
B
19
S
6
Posts: 179
Reputation: 2,202

Post » Mon Nov 17, 2014 10:15 am

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.
B
21
S
4
G
4
Posts: 161
Reputation: 3,803

Post » Mon Nov 17, 2014 10:50 am

Hmm Thank You I will try this. Thanks a lot for the help!

Kind Regards
B
19
S
6
Posts: 179
Reputation: 2,202


Return to How do I....?

Who is online

Users browsing this forum: jasontoups, OddConfection, Yahoo [Bot] and 3 guests