Mouse over problem

0 favourites
  • 5 posts
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Well, ive this game. When i male the mouse go over the sprite (An icon)

    When i put the mouse over the icon, the animation plays well, when i moving the mouse elsewhere, the animation kept playin, how do i stop that?

  • Hey,

    If you invert the action that tells the animation to play (so it reads as - mouse is not over sprite) then give it an action like set frame to X or stop animation that should work.

  • Mouse > Mouse over object, play animation

    System > Else, stop animation

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've got a similar issue, but only when using multiple areas that I want to hover over and start animations, or in my case set frames of sprites when I'm mousing over.

    For example, I've got 5 different sprites, each of them has two frames, and whenever I drag the mouse over each one, I want them to switch to frame 2. I've set it up a few different ways, without any luck.

    As of right now, I've got it set up like this

    Mouse > on cursor is over sprite1 > sprite1 > set animation frame 1

    system > Else > sprite1 > Set animation to frame 0

    If I try to add any more sprites into the mix, the first only the last sprite will switch frames, for example:

    Mouse > on cursor is over sprite1 > sprite1 > set animation frame 1

    Mouse > on cursor is over sprite2 > sprite2 > set animation frame 1

    Mouse > on cursor is over sprite3 > sprite3 > set animation frame 1

    system > Else > sprite1 > Set animation to frame 0

                   sprite2 > Set animation to frame 0

                   sprite3 > Set animation to frame 0

    Any help would be appreciated!

  • You can try this ...

    system > else > trigger once > sprite1(invert) or sprite2(invert) or sprite3(invert) > set animation frame 0

    'Mouse is over object' followed by 'Trigger once' is equivalent to 'On mouse in, same with the invert conditions.

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