Maximum Amount of Enemies on Level? - (Your Advice)

0 favourites
  • 3 posts
From the Asset Store
HealthBar
$19.99 USD
Advanced, customizable, visual bars to present amounts of points such health, mana, stamina and more
  • Hello All,

    I'm working on my prototype from scratch and I'm looking for some tips to make things simple as possible (when possible of course).

    So, I want to make the amount of Enemies on the stage even if they are not SEEN on the camera / Layout but spawned outside of the viewport (not out of the General Layout).

    In other words, the enemies will spawn anywhere on the layout, not necessarily been seen yet while traveling around, and every X range of time they will keep spawn.

    This is what I think:

    Should I set a Global Variable: "MAX_Enemies" and whenever NEW Enemy spawned add 1 if it's smaller than the max?

    I believe I should put the enemies in a Family to make things easier, but the general idea is the real question.

    The reason I'm asking for the community opinion is to get better and learn how to be more efficient, so if there is a simple / easiest way to do the above please don't hesitate to share, explain, give example file or screenshots since it's easier for me to learn from a more visual way also it may help others in the future.

    Thanks ahead! :)

    Tagged:

  • Alon

    I would definitely put them in a family.

    A global variable is fine, but you can also check EnemyFamily.Count any time you need to know how many there are as well.

    I usually try to keep the number of global variable down to as few as possible. I use instance variables and built in features like .Count, and .PickedCount, etc...

    it helps keep things organized.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alon

    I would definitely put them in a family.

    A global variable is fine, but you can also check EnemyFamily.Count any time you need to know how many there are as well.

    I usually try to keep the number of global variable down to as few as possible. I use instance variables and built in features like .Count, and .PickedCount, etc...

    it helps keep things organized.

    Thank you AllanR These are very useful tips!

    I will give it a try, sounds organized as I like.

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