Checking the variables of two instances

0 favourites
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • So save your capx under a different name and start changing it.

    I assure you, if you do it right it will work.

    Why should someone else do the work?

  • I tried using the alertmode variable in the family enemies instead of in the enemy object. All the enemies froze to disabled.

    how does the alertmode variable of the enemy family relate to the alert mode variable of an individual instance of an object from the family? Dont I need to set up some sort of an extra event which will constantly feed one into the other somewhere along these lines?

    It seems to me that is a sort of an ugly solution to something as simple as comparing a variable between two instances of an object. <img src="smileys/smiley5.gif" border="0" align="middle" />

    I am not being lazy here. I simply have no idea how to make your solution work.

    <img src="smileys/smiley19.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If a family has an instance variable each member of the family has the instance variable. you can adress the member directly, but you can also adress the family. so the variable can be different for each member of the family.

  • If a family has an instance variable each member of the family has the instance variable. you can adress the member directly, but you can also adress the family. so the variable can be different for each member of the family.

    I tried it on a simpler situation and it works as you said.

    But i am a bit confused about this set up still.

    To clarify:

    Calling an object through the family simply adds the "any" to the condition.

    So in your set up its saying

    If the picked object is overlapping with any object from that family with a value set to x, then do this to the picked object.

    In this case families are extremely useful and what you just showed me makes my life much easier in some of the other things I want to implement.

    How does this work on triggering a change in variable level?

    If I trigger a change of a variable on a family level - it changes it for all the children?

    <img src="smileys/smiley32.gif" border="0" align="middle" />

    Much rep to you sir for showing me this!!! Sorry it took me a while to figure out

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