Mouse-over & Compare Variable Condition Issue

0 favourites
  • 9 posts
From the Asset Store
16 Direction Capx
$3 USD
40% off
Rotate & Animation for 16 Direction & Mouse Direction
  • I am having an issue with mouse-over + System:compare local static variable combined in an OR statement:

    When I use only the mouse over conditions, it works. Likewise, when I use only the compare, it works fine. However, when combined only the mouse overs work.

    Ideas on why this is behaving spastically?

  • Please try and explain what you are trying to achieve..

    While I'm not sure why you use so many different hover-sprites that look exactly the same, I guess you want the event to be true only when logomouseoverflag=1 AND the mouse is over one of the hoverbuttons?

    Right now the event is true when logomouseoverflag=1 OR the mouse is over one of the hoverbuttons..

  • It changes the cursor to a hand and back based on whether the mouse is over a button or not.

    The flag exists because I needed a composite AND condition in the OR, and you cannot do that in Construct (that I know of). So, I have the flag set to change based on that AND condition set.

    What I have there is exactly how I want it to work... except that it doesn't work. If the mouse is over any button OR the logoFlag is 1, it should change to hand, and back when none of those are true.

    I am looking at flagging the entire system, so that the mouse-over OR block changes the flag, and the AND block changes the flag, then the flag control the hand/no hand.

  • Using either the same sprite for all hoverbuttons or putting them in a family would be easier, but for this to work as intended you could put the mouse-over conditions in an or-block as a subevent of the system compare condition..

    still not sure why the flag is needed though

    mouse is over bladibla

    trigger once

    set cursor to whatever

    else

    trigger once

    set cursor back to normal

  • I forgot about families.

    Can you do "Mouse-overs" for families?

  • Can you do "Mouse-overs" for families?

    Yes

  • Excellent, thanks.

  • I'm still not sure what you are trying to do..

    When is the mouse cursor supposed to be the hand?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your family solution works perfectly. It allows me to roll all of those OR conditions into a single condition, which allows me to combine them with my AND conditions.

    The mouse cursor now turns to a hand whenever the cursor is over any of my website's buttons and back to an arrow when it is not.

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