Increase number of enemies spawned over time?

  • Hello, been lurking a long time and own both C2, and just got C3. Anyhow...

    I am following the Beginner's guide to Construct 3 but wanted to try and learn more by tinkering with it. Well, I got the nearly the end right before adding damage to the player. It has 1 new monster spawning every 3 seconds, I found a way to cap that at 16 enemies. But I am now wanting to raise that cap every 10 seconds as well as make is spawn an extra enemy every 3 seconds. So say after 10 seconds it will spawn 2 enemies at a time(every 3 seconds), and after another 10 seconds spawn another extra at the same time(every 3 seconds), say 3 that time and increasing each time. Hope this made sense? Either way here is my code sheet.

    And my C3P:

    http://s000.tinyupload.com/index.php?file_id=56643569649902495680

  • For this I would change all the elements to variables so you can easily tweak them. I've set up events that change the variables but if in your game it is consistently adding an enemy every 10 then you could ignore the timer and use variable to self+x every 10 (see the disable event as an example), depends on if your game always does something every 10 seconds and always increases in the same way. I've set up some events for you so you can see how to manage the variables and keep the original spawning event as just the single event.

    https://www.dropbox.com/s/35rdde98z77m5 ... 2.c3p?dl=0

  • I think I understand the concept, but is there no real way to increase it automatically versus having to say keep adding new events for every 10 seconds? Trying to tinker and see if there is

    Just noticed and been working on your disabled block of code. Trying to tinker with it to learn more about it.

  • Yes the disabled block is for when you don't need to know the predetermined times, I don't know how your game will work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I figured out a way mixing some of your code with a few changes and got it to work perfectly.

    Here's the C3P if you're curious:

    http://s000.tinyupload.com/index.php?file_id=63673778032000010183

    Thanks so much for your help!

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