Follow mouse without clicking

Get help using Construct 2

Post » Wed May 23, 2012 1:50 pm

I have problem with moving an object by just following mouse without clicking any mouse keys and for touchscreen the object would follow the drag on screen.

Thanks
B
3
Posts: 7
Reputation: 364

Post » Wed May 23, 2012 2:58 pm

To make an object follow the mouse just do on every tick "Object" -> setposition (Mouse.X,Mouse.Y) ...

Your other question is not so clear for me ... an object with behaviour "Drag & drop" could do this without more code.

B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Thu May 24, 2012 1:33 am

I have a question in same subject, how can i compare Y on click left ?
B
4
Posts: 6
Reputation: 967

Post » Thu May 24, 2012 2:48 am

Here is an example:



It tells you whether you clicked in the top half of the layout or the bottom half of the layout.

kittiewan2012-05-24 02:50:18
B
29
S
11
G
12
Posts: 281
Reputation: 11,888

Post » Thu May 24, 2012 12:16 pm

Yeah it's work fine thank u kittiewan :)
B
4
Posts: 6
Reputation: 967


Return to How do I....?

Who is online

Users browsing this forum: Megavolt, selaus and 0 guests