How do I use these families correctly!

0 favourites
  • 2 posts
  • I am trying to use families, but sometimes the code works correctly and sometimes they don't.

    Families: Power source, Power Switch, and Power System.

    Power source is overlapping Power system => Turn on switch

    Power switch is on && power source is overlapping => Power is on

    I have a couple different power systems and when I run the code like this it doesn't discriminate which power system is actually getting the power.

    I also want to make a code where when you take the power source off, it turns that respective system switch off, but it turn all the switches off when I use families.

    I have resorted to writing events for each individual switch to make it work for what I need.

    tl;dr How do I make these families work correctly?

    Let me know if you need more clarification.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because the family treats all objects in the family as one. If you are trying to distinguish specific power systems you need to give them each an ID and use that to reference them (or use the UID).

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