Get TouchIDs on different sides of the screen

Get help using Construct 2

Post » Wed Apr 17, 2013 2:08 am

Based on this thread here: http://www.scirra.com/FORUM/topic66471.html.

I'm trying to make it so that a different touch ID is assigned depending on where the user touches the screen. I have two large invisible sprites that each cover half the screen. You can see one of them here:



Does anyone know how to get a different touch ID based on where the user touches the screen?

CAPX FileExcal2013-04-17 02:11:38
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Wed Apr 17, 2013 9:48 am

Do you just want to get if the player clicked on the left or the right side ? Or what do you try to do with the touch.Id
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Wed Apr 17, 2013 4:34 pm

You can do it 2 different ways.

Either add another condition that checks if the touch is over the "left side screen box" or the right side screen box at the time of touch.

or check its X position of the touch, and see if that's greater or less than half of the layout width.

B
50
S
21
G
8
Posts: 844
Reputation: 10,299


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul and 19 guests