Buttons not responding individually.

Get help using Construct 2

Post » Tue May 20, 2014 11:23 am

Image

Using this code, when I hover over a button it gets bigger, but if I can move the mouse quick enough to another button (to not trigger the else command), the original button is still being highlighted, not the one that is being currently highlighted.

Image
With this modification, it makes it so that if you move from button to button without triggering the else statement, all the buttons you highlight get bigger.

Basically, I just want it to work on the button being highlighted and only that button, one button at a time. Anything I can change to fix this?
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Tue May 20, 2014 12:31 pm

Had the same problem with my buttons, which are basically the same as yours except I use an effect, but I fixed it like this:

Cursor is over "Button"
----> Pick all "Buttons" : Disable Effect
----> Pick "Button" nearest to Mouse.AbsoluteX, Mouse.AbsoluteY : Enable Effect

Cursor is NOT over "Button" : Disable Effect

So what it does is, as you move the cursor over a button you start by removing all effects from any buttons, and then you apply the effect to the button nearest to the cursor.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue May 20, 2014 4:12 pm

nimos100 wrote:Had the same problem with my buttons, which are basically the same as yours except I use an effect, but I fixed it like this:

Cursor is over "Button"
----> Pick all "Buttons" : Disable Effect
----> Pick "Button" nearest to Mouse.AbsoluteX, Mouse.AbsoluteY : Enable Effect

Cursor is NOT over "Button" : Disable Effect

So what it does is, as you move the cursor over a button you start by removing all effects from any buttons, and then you apply the effect to the button nearest to the cursor.

Thanks. That helps.
How do you access the "pick nearest" event though?
EDIT: Nevermind. It's on the object rather than inside of system.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467


Return to How do I....?

Who is online

Users browsing this forum: newt and 16 guests