Family recognize different variable for enemies?

0 favourites
  • 3 posts
From the Asset Store
This music pack covers differents situations for visual novels, anime games and many more!
  • -My game has a player in the middle and enemies spawns in waves that does dmg when collides with player

    -I want to use Families for enemies cause of many different enemytypes with different dmg, hp etc. to prevent creating a "enemy collision with player" event for every single one.

    -I got Dmg and HP variables for every enemy and i want the family to recognize each enemy hp and dmg when they collide with player.

    Im bad at explaining here but appreciate input :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Families also have instance variables so use them, when an enemy collides you do family.damage, and the hp of the enemy is family.hp.

  • Families also have instance variables so use them, when an enemy collides you do family.damage, and the hp of the enemy is family.hp.

    I didnt understand at first but then i realised when i clicked the enemy1 sprite it had the family.damage variable i created. thanks, a whole lot easier to work now!

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