Make the mouse click?

For questions about using Classic.

Post » Mon Apr 05, 2010 5:41 am

Is there a way to make the mouse click once a certain action happens?
B
2
G
3
Posts: 17
Reputation: 884

Post » Mon Apr 05, 2010 7:50 pm

Could you be more specific?

Are you trying to make the mouse click, or do you want something to happen at the mouse location? I think a simulation of the mouse click would be a better choice - I mean, a mouse click is something the user will perform (A character jumping is different than a player pressing the "jump" key :) )
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Mon Apr 05, 2010 8:28 pm

I understand what your saying but I mean literally making the mouse click. I'm wondering if its possible at all with any of the non game like objects...
B
2
G
3
Posts: 17
Reputation: 884

Post » Mon Apr 05, 2010 8:41 pm

If you mean you want to simulate the mouse clicking on it's own, yes you can. You need to set up a new control in the App Properties that uses the mouse button as the control. Then you can use the M&K object to manually set the control state of that control. You can also set the X and Y of the mouse, but you will need the Window object to correct the coordinates.

Here is an example:
http://dl.dropbox.com/u/529356/Semi%20P ... icking.cap
v0.99.84

I've found a bug here though. apparently capturing the manual control somehow makes the "Click" control I set up not register when the user actually clicks the mouse himself so I had to make a separate event for that. Posting a bug report now...
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue Apr 06, 2010 3:49 am

Its not opening but I think I get what your saying. I'll probably get it through enough experimentation
B
2
G
3
Posts: 17
Reputation: 884

Post » Tue Apr 06, 2010 6:05 am

You need to open it with v0.99.84.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Apr 11, 2010 1:12 am

[quote:1vf99tpj]I've found a bug here though. apparently capturing the manual control somehow makes the "Click" control I set up not register when the user actually clicks the mouse himself so I had to make a separate event for that. Posting a bug report now...[/quote:1vf99tpj]

You need to click the dropdown and select "Left mouse click". No really, that fixed it. It seems that even though "Left mouse click" is shown as the default for a new custom control, it isn't actually selected by default.
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Sun Apr 11, 2010 7:55 am

[quote="R0J0hound":2f79rm3m][quote:2f79rm3m]I've found a bug here though. apparently capturing the manual control somehow makes the "Click" control I set up not register when the user actually clicks the mouse himself so I had to make a separate event for that. Posting a bug report now...[/quote:2f79rm3m]

You need to click the dropdown and select "Left mouse click". No really, that fixed it. It seems that even though "Left mouse click" is shown as the default for a new custom control, it isn't actually selected by default.[/quote:2f79rm3m]

That's good to know, thanks :)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests