[SOLVED] Does Mouse Click on a Family not select the Instance clicked?

1 favourites
  • 3 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Trying to click on an object to play an animation (to test my animation). I've added them to a family and have family instance variable set to false. I check

    EVENT:

    Mouse | On Left Button Clicked on TokenFamily

    TokenFamily | Check instance boolean (Not)IsFlipped

    Action:

    Then play animation to flip the item, set TokenFamily.IsFlipped to true

    EVENT:

    Mouse | On Left Button Clicked on TokenFamily

    TokenFamily | Check instance boolean IsFlipped

    Action:

    Then play animation to reverse flip the item, set TokenFamily.IsFlipped to false

    For testing, there is a single instance for the family on screen at the moment, but for some reason it's never setting the IsFlipped correctly true/false and is just always playing the same "unflip" animation.

    I looked at an old C2 file I had worked on before and it seems I've coded it correctly, but very odd.

    No capx I can share unfortunately. So hopefully something is jumping out.

    Tagged:

  • Don't break up the logic. Test for button click first, then as a sub-sevent test for IsFlipped and use Else to test the opposite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Don't break up the logic. Test for button click first, then as a sub-sevent test for IsFlipped and use Else to test the opposite.

    That's what I was missing... thanks!

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