How do I use family to control a large number of enemies

0 favourites
  • 1 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Thats what i'm trying to do:

    I have X numbers of enemies. For each of them I have it's animation and Hitbox. So I separated like this:

    Family_Enemy_Obj: Enemy1_Obj, Enemy2_Obj, Enemy3_Obj.....

    Family_Enemy_Skin: Enemy1_Skin, Enemy2_Skin, Enemy3_Skin.....

    Family_Enemy_HitBox: Enemy1_HitBox, Enemy2_HitBox, Enemy3_HitBox.....

    As you can see I'm trying to use family so i don't need to create the same events over and over for each enemy, like their AI, simple movements, etc. Although, I can't do it right. Basically, all gets messy and wrong instances are picked and so on. So, it all comes to how am I going to pick the right instance between them? I've tried, at their creation, set their UID in their instance variables to link them so I'd know who is who and receive the right orders.

    Thanks!

    Edit: Forgot to mention that they are in containers(enemy_obj , skin and hitbox)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)