Creating exceptions in Families

For questions about using Classic.

Post » Mon Nov 16, 2009 8:07 am

Is there a way to create exceptions in families using events?

For example, say I I have a Family called "Soldiers" of which there are 20 different types of soldiers.

>"Bullet" On Collision with Family Soldiers=>Subtract 1 from Soldiers "HP"

Say I want to make one soldier invincible using events. How can I exclude this one type of soldier, say SoldierEngineer02, from this action?
B
51
S
13
G
8
Posts: 194
Reputation: 7,311

Post » Mon Nov 16, 2009 9:12 am

[quote="Mulkaccino":vc27vapp]Is there a way to create exceptions in families using events?

For example, say I I have a Family called "Soldiers" of which there are 20 different types of soldiers.

>"Bullet" On Collision with Family Soldiers=>Subtract 1 from Soldiers "HP"

Say I want to make one soldier invincible using events. How can I exclude this one type of soldier, say SoldierEngineer02, from this action?[/quote:vc27vapp]
By using pv's for example. Use the family manager to setup a pv like "shield". Pick the members you want to make invincible (for example when creating the sprites) and set their "shield" to 1.

>"Bullet" On Collision with Family Soldiers
Family Soldiers: Value 'shield' not equal to 1 =>Subtract 1 from Soldiers "HP"
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon Nov 16, 2009 9:20 am

Thanks tulamide. It was so easy!
B
51
S
13
G
8
Posts: 194
Reputation: 7,311

Post » Mon Nov 16, 2009 9:58 am

or if you could do something like:


-"Bullet" On Collision with Family Soldiers
>Subtract "Damage" - "shield" from Soldiers "HP"
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests