[SOLVED] Highlight a single button on cursor over ?

  • I got many instances of same object 'Button' which is a sprite object. When i hover the mouse over single button only that one needs to glow.

    I created a 'Mouse Cursor is Over Button' as well as inverted 'X Mouse Cursor is Over Button'. So when it is hovered over a button it's animation gets changed. While the inverted condition is there to change to default animation once it is no more over the button.

    But when i move the cursor really fast over many buttons while making it remain inside one of the buttons, all of the ones i drove the cursor over glows. Since the first condition is not at all broken since the cursor has somehow not left any of the buttons. Only when the mouse has left the button, all of them goes to default animation.

    The problem is that the 'Mouse Cursor is Over Button' condition applies to any of the buttons and not just a single button. I tried giving them instance variables but hovering over any button still seems to give the same result as all of them are still passing the value instead of just one, i think.

    How do i fix this ?

    Example Test : https://drive.google.com/open?id=1WODl0PlDOKdwAsj7VRbVHcwRPYESaqaC

    Tagged:

  • I like to reset all the button animations first, then check if mouse is over a button, I pick the top one (in case you have overlapping buttons) and set its animation to hover.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I like to reset all the button animations first, then check if mouse is over a button, I pick the top one (in case you have overlapping buttons) and set its animation to hover.

    Thanks for the solution. It's working now. :)

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