Buttons not responding individually.

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • 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.

    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?

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)