Creating exceptions in Families

This forum is currently in read-only mode.
  • 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?

  • 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?

    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"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks tulamide. It was so easy!

  • or if you could do something like:

    -"Bullet" On Collision with Family Soldiers

    >Subtract "Damage" - "shield" from Soldiers "HP"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)