How do I trigger on mouse leave

0 favourites
  • 8 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Hello,

    I have made action on sprite that happens when mouse comes over, is there opposite event for mouse leave so i can revert the state of object?

    Thank you.

  • Add a else condition (maybe with a trigger once) ?

    on mouse over objet -> do something

    else + trigger once -> do something else ?

  • Else should work in this case,

    but it's also possible to invert events by right-clicking and choosing invert,

    that way the condition would become "is not overlapping"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you.

    Else is not working it says else cannot be used. But invert works in a weird way.

    If i say Mouse event -> is over object - > play animation it actually plays animation when i move mouse out of object

    if i do Mouse event -> is not over object -> play animation then animation plays when mouse is over object

    This is weird, don't know is it really a bug i have couple more of similar things to do and will post findings. But it's important that it works.

  • Right click on you "Mouse over object" add Else. I tested it and it worked.

  • I just get written in red Else(not valid here)

    I go to System -> Else (Maybe I'm doing something wrong there)

    also

    I can confirm for some reason that mouse over activates animation only if i invert Cursor is over event and that is strange behaviour:) but hey it works.

  • Like this :

  • Joskin, thank you that's it... i have tried to put in to same block under 1. that's why I had problems. Coming from programming background somehow seemed logic to be in one block

    Also need to report other weird thing.

    Cursor is over inverted in case of animation only works opposite, so if i set inverted it activates animation actually when it's over sprite even though it should be other way around.

    But for other things it works as advertised.

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