How do I spawn a new enemy from a specific spawn point after one has been killed up to a max number

0 favourites
  • 4 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello,

    I am trying to create spawn points similar to Gauntlet where there is a "den" that enemies come out of, and keep coming out up to a certain number. Then if one or more dies, more are spawned from that same spawn point up to the max number again. Once the "den" is destroyed, they stop spawning. There could be multiple "dens" on the screen at once with different enemy types.

    I have it where the spawning stops at a certain number, but am having trouble counting and keeping track of the enemies spawned from a specific den when they die to spawn more. Please help and explain to me like a beginner since this is my first game. Thank you for your help!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Give the mobs a instance variable called CreatorUID and set it to the dens UID, Give the dens a instance variable called MobCount, when the mob is made +1 the dens MobCount, when the mob dies you can get the den via the uid stored in the mob and subtract from MobCount and then check the MobCount variable before creating a mob

    Hope this helps!

  • Thank you for your help! This worked perfectly. I was so close but yet so far away before. Appreciate the assistance!

  • Give the mobs a instance variable called CreatorUID and set it to the dens UID, Give the dens a instance variable called MobCount, when the mob is made +1 the dens MobCount, when the mob dies you can get the den via the uid stored in the mob and subtract from MobCount and then check the MobCount variable before creating a mob

    Hope this helps!

    Hello

    Do you have any more files to be able to better look at this solution?

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