More advance question on family

Get help using Construct 2

Post » Sun Mar 15, 2015 1:49 am

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.
B
10
S
5
Posts: 220
Reputation: 1,464

Post » Sun Mar 15, 2015 1:58 am

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.

Family1.png


Family2.png
Now I can override what the object inherited from the Customer Family .
You do not have the required permissions to view the files attached to this post.
B
22
S
4
G
2
Posts: 362
Reputation: 2,355

Post » Sun Mar 15, 2015 2:53 am

o... great! Now I can reduce my coding. Thank you
B
10
S
5
Posts: 220
Reputation: 1,464


Return to How do I....?

Who is online

Users browsing this forum: HoobSug and 26 guests