Regarding families

Get help using Construct 2

Post » Mon Mar 10, 2014 7:54 pm

I have a question regarding families.
I have two objects with specific physics behavior.

If i add them to a family, let's call balls, i can assign its own physics behavior to the family. It will speed up my coding if i use like impulses on a family rather than on each of objects, and if i want further add another one i will mess up with my code.ù

So my question is. What happens to objects bahaviors that are in a family that has a physics behavior too?
Does it add, does it replace object's parameter? Cause i would like to use physics events of the family but not changing properties of the objects inside.
B
12
S
4
G
1
Posts: 241
Reputation: 1,699

Post » Mon Mar 10, 2014 10:39 pm

The object inherits the physics behavior from the family. So whatever behavior you set on the family the object will have.

Its basically the same as having the behavior on each individual object, you can just simplify a lot of your code with addressing families instead of having to do it to every individual object.

You can find more info on families in the manual https://www.scirra.com/manual/142/families

Or ask more here if that did not answer your question :)
Last edited by cvp on Mon Mar 10, 2014 10:54 pm, edited 1 time in total.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Mon Mar 10, 2014 10:50 pm

You've answered it perfectly thanks.
Well seems i will have to redo the logic anyway :p
B
12
S
4
G
1
Posts: 241
Reputation: 1,699


Return to How do I....?

Who is online

Users browsing this forum: gamecorpstudio, InfiniteRockets, newt, sean080 and 19 guests