How do I apply variables to families correctly?

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Right now I have this situation:

    I have a family with 3 different types of sprites.

    Each sprite has its own healthbar (not a family variable) which is ticking away slowly every second or so.

    I now want to randomly spread them across several spawnpoints (works as intended).

    The play now has to run from one character to the next, to fill up their healthbar. What happens now however is, that if I heal "Character01", EVERY "Character01" gets healed instead of only that one certain Character01.

    While this makes totally sense, I don't get how I can make it work so I only heal that one certain Character01 and not the others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need a condition to pick one particular Character01. Like you might use the pick nearest condition to heal the one nearest the player:

    +Character01: Pick nearest to Player.X, Player.Y
       -> Heal Character01

    Or to heal the one the mouse is over:

    +Mouse: Cursor is over object Character01
       -> Heal Character01
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)