Different variable for each family member?

Get help using Construct 2

Post » Sat Jun 14, 2014 2:54 pm

So I want to make a way to damage my enemies, but I have ( for now ) 3 different guys.
I know how to make them receive damage, but I want to make it in a way so I dont have to write conditions for every enemy.
The way to do it are families.
And that is not hard but can I make that every enemy in my family has different amount of health.
For example:

FamilyEnemy on collision with sword = FamilyEnemy subtract 10 from EnemyHealth

So EnemyHealth is family instance variable and its set to 100. But I need all 3 different enemies to have different amounts of health(50, 100, 150 ).
Is there a way I can make every enemy have different amount of health, but still being in the family
B
7
S
2
Posts: 102
Reputation: 975

Post » Sat Jun 14, 2014 2:57 pm

Any instance variable affects that instance. This is the same for families. Each enemy's value is separate.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Sat Jun 14, 2014 2:59 pm

OOOOooohhh check that out AHAHAHAh thanks man should have looked better.
Thanks man.
B
7
S
2
Posts: 102
Reputation: 975


Return to How do I....?

Who is online

Users browsing this forum: 25games, jatin1726, kiki4construct and 33 guests