Simple question about families

0 favourites
  • 3 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Greetings!

    I'm working on a shoot'em up. I'd like to understand how families function works (I can't use them with the free version). I just used it a little bit on Construct Classic.

    In my shoot'em up, I have several different enemies. They all have a similar HP variable.

    I put these enemies into the "enemy" family.

    Now, my spaceship is shooting at them. Is it possible to only apply single events to the [enemy] family instead of events for each enemy ship?

    Like : "if my laser hits an [enemy], then it decreases the [enemy].HP. If the [enemy].HP <=0, then the [enemy] disappears and create an explosion sprite."

    So I don't have to create individual events for each enemy.

    Does the families work like this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, that's what they do. You just need to pick the family icon when making the event.

    Note in Construct 2 family instance variables work a little differently to Classic. In CC you would add the variable to each and every object in the family. In C2 you just add it once to the family itself, and all the objects inherit that variable, which is a little easier and more intuitive to set up.

  • Thank you, dear sir.

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