Follow mouse without clicking

Get help using Construct 2

Post » Tue May 07, 2013 12:05 pm

How I can make my player follow my mouse pointer but not click on it?

I'm pretty new to this, to go from point A to B by clicking yes, but who's still no click no idea
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Tue May 07, 2013 12:14 pm

B
96
S
25
G
20
Posts: 3,055
Reputation: 22,646

Post » Tue May 07, 2013 4:48 pm

Why does my player is going to the corner?
https://www.dropbox.com/s/bdlcme0089m630a/game.capx
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Tue May 07, 2013 6:57 pm

[QUOTE=statham] Why does my player is going to the corner?
https://www.dropbox.com/s/bdlcme0089m630a/game.capx [/QUOTE]
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Tue May 07, 2013 7:22 pm

Touch.X and Touch.Y will be 0 when you're not touching. If you want it to follow the mouse without clicking you need to use Mouse and not Touch.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue May 07, 2013 8:46 pm

In the CapX I put, is at 0 .. not changing: (
I put touch to test it on my phone
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Wed May 08, 2013 9:45 am

I do not understand what you mean help please statham2013-05-08 09:45:57
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Wed May 08, 2013 4:42 pm

A mouse has a pointer that is on the screen even when your not clicking.
Touch is different. If you are not touching the screen there is no touch.x or touch.y, so that means that touching the screen is in effect the same as clicking.

If you want to use touch-input there is no pointer, so your player can't follow it. If there is no touch, touch.x will be 0(zero) and touch.y will also be 0(zero) so your player will move to 0,0 on your layout.

If you want the player to follow your mouse pointer you should use the mouse, not the touch.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744


Return to How do I....?

Who is online

Users browsing this forum: selaus and 0 guests