How do I get all except one object in Family?

0 favourites
  • 2 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I have 10 objects in Family and when i click on one object i need to change animation on all others.

    I tried pick instance with UID to get clicked UID and inverted variant to set animations to all other (ever with foreach) - and it doesnt work for me =(

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you click on the instance to pick it then all instances are narrowed to just that 1, so you should first store the UID of the one you picked as an action probably in a local variable.

    Then in a sub event of the click event, open up the instances again by using Pick all instances, then you can set the new animation on all instances. For the one you clicked earlier you can then pick instance by UID and set the correct animation since it would've just changed with the pick all.

    You could also set a variable to a different value on the one that was picked, you just need a way of differentiating it from the other instances.

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