Is this correct family usage?

0 favourites
  • 7 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I want to set values on newly created sprites using family actions to speed up the variable setting process.

    ???????????

    This is what I know will work:

    <img src="http://i.imgur.com/rQXXtEf.png" border="0" />

    I'm giving the new sprites some variables.

    ???????????

    Am I using families correctly here?:

    <img src="http://i.imgur.com/rwKcm13.png" border="0" />

    Is it OK for me to just set values for a newly created sprite with a Family action? My instincts say it should NOT because I have not referred to any family conditions, so I feel like it's going to set the values for ALL sprites in the family rather than that specific sprite in the action above.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i think this is correct, creating is the only thing you can't do from a family, from then on its all family stuff, the create action selects the instance and can be referenced by the familyvars,

    does it work? <img src="smileys/smiley3.gif" border="0" align="middle" />

  • Your instincts are correct. The first example works, the second doesn't, for exactly the reasons you've given.

  • Oh, that's a shame, I could have saved so much time! :(

    I was hoping I could use families because then I could just edit the action values, rather than having to create brand new actions for every single object I create (which is more clicks and more time spend navigating, so inefficient!).

    Thanks, although you both have conflicting posts :(

  • You can use the (new-ish) Replace object mechanism to speed this up.

  • Oh fantastic, thanks! I'd forgotten to try that new feature. :)

  • Oh, that's a shame, I could have saved so much time! :(

    I was hoping I could use families because then I could just edit the action values, rather than having to create brand new actions for every single object I create (which is more clicks and more time spend navigating, so inefficient!).

    Thanks, although you both have conflicting posts :(

    my mistake, it looked like it would work and still think it should :)

    it does work with plugin Nickname, you should check it out..

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