Mouse cursor on object picking the instance ?

Discussion and feedback on Construct 2

Post » Mon Sep 30, 2013 4:26 am

Does the event 'mouse cursor on object' actually pick the instance ? because i have some kind of nasty bug that happen when i am over an object and then switching to another instance of the object pretty near.. it make it look like its still on the first object..

Here the strange behavior..



Here my events..


Any ideas ? Normally the event Cursor is over 'Button' should pick the correct instance.

Thanks!Rushino2013-09-30 04:27:45
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Mon Sep 30, 2013 9:11 am

Is it possible that mouse cursor's top left pixel is used for is over action, and thus at the moment it's not actually over any of the buttons. And your conditions check for state of change only when mouse is over one of any of the buttons?
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Mon Sep 30, 2013 2:56 pm

I use the default mouse button for this. I check if its over id not i set the active/over state off which is what the events are showing. Mouse is definiticly over one of the instance but the second button should not show the over state when i am not on it.
B
16
S
5
G
1
Posts: 190
Reputation: 2,489

Post » Mon Sep 30, 2013 3:08 pm

Event 5 will only run if the mouse isn't over ANY button. If you move quickly from one button to another then the mouse is still over a button so event 5 doesn't run. Maybe if you had 'for each button' in there...
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Tue Oct 01, 2013 12:30 am

@ramones this fixed it! it make sense actually i wanted to take each button one by one to apply this logic so.

Thanks a lots!
B
16
S
5
G
1
Posts: 190
Reputation: 2,489


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests