More advance question on family

  • I understand the concept of family.

    The question is can I do this:

    I have 5 weapons, each have an instance var of AttackPower with different values.

    I want to put them in a family.

    So everytime enemies get hit by the family.

    I want the family to be able to reach each weapon's individual AttackPower, to reduce enemies health based on it.

    Is it possible to do that?

    Because up until now, I can only use family instance var, which means all 5 weapons will have the same amount of AttackPower.

  • You can change the family instance var for each object. If you click the object you will see it inherits the family instance variable and you can change it to fit each object of the family. Just remember you change the value in the Main Family it will reset the objects. I am using this way for a Customer Family and each customer have a certain patience level. So the instance variable is the default variable but you can override in each object.

    [attachment=1:2lfkl4en][/attachment:2lfkl4en]

    [attachment=0:2lfkl4en][/attachment:2lfkl4en] Now I can override what the object inherited from the Customer Family .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • o... great! Now I can reduce my coding. Thank you

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