Problem with touch

Get help using Construct 2

Post » Sat May 30, 2015 3:11 pm

Hi,

So I am trying to make a breakout game... but I have problem with the paddle, I don't use a mouse input but a touch one and whenever I stop touch the screen the paddle is moving to the left corner of the screen.. How can I make the paddle stay in the same position as before I stop touch the screen?

Cheers,
rodionu
B
3
Posts: 2
Reputation: 179

Post » Sat May 30, 2015 8:00 pm

I´m not sure i understand what u say, but i think i this:

On touched object -> set X : object.x, set Y:object.Y
On any touch end -> set object.x: X, set object.y: Y

(Y an X are global variables)
;)
Play my games on www.pocketgames.es
B
13
S
3
Posts: 45
Reputation: 819

Post » Sun May 31, 2015 8:16 am

Please check it out.. . Also I don't need the .Y position, just the .X.
EDIT: I can not insert a link!
B
3
Posts: 2
Reputation: 179

Post » Sun May 31, 2015 9:23 am

When not in touch the value of touch.x = 0 as is the value of touch.y..
So you will have to create an action to set the touch.x and touch.y to the desired x and y when not touching.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests