Is this correct family usage?

Get help using Construct 2

Post » Sat Jul 06, 2013 4:18 am

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:

I'm giving the new sprites some variables.

———————————

Am I using families correctly here?:

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.

B
141
S
68
G
17
Posts: 1,769
Reputation: 20,224

Post » Sat Jul 06, 2013 4:29 am

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?
ImageImage
B
65
S
19
G
7
Posts: 814
Reputation: 9,691

Post » Sat Jul 06, 2013 5:00 am

Your instincts are correct. The first example works, the second doesn't, for exactly the reasons you've given.
ImageImageImage
B
71
S
19
G
180
Posts: 3,479
Reputation: 103,179

Post » Sat Jul 06, 2013 5:11 am

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 :(
B
141
S
68
G
17
Posts: 1,769
Reputation: 20,224

Post » Sat Jul 06, 2013 5:33 am

You can use the (new-ish) Replace object mechanism to speed this up.
ImageImageImage
B
71
S
19
G
180
Posts: 3,479
Reputation: 103,179

Post » Sat Jul 06, 2013 5:50 am

Oh fantastic, thanks! I'd forgotten to try that new feature. :)
B
141
S
68
G
17
Posts: 1,769
Reputation: 20,224

Post » Mon Jul 08, 2013 12:35 pm

[QUOTE=alspal] 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 :([/QUOTE]

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

it does work with plugin Nickname, you should check it out..
ImageImage
B
65
S
19
G
7
Posts: 814
Reputation: 9,691


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u, jhjconstruct, tarek2 and 6 guests