Make more enemies spawn over time?

0 favourites
  • 9 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • Hi Everyone, I'm trying to put together a simple "stay alive as long as possible" style game.

    I've made a set of enemies spawn outside the layout and move across the screen, the players goal is to avoid the enemies. My problem I have is I have no idea how to make the enemies go from spawning a random amount every second to after 20/30 seconds change this to spawning a random amount every 0.5 seconds.

    I'd then like to be able to keep speeding the spawn rates up every 20/30 seconds or so.

    Is something like this possible to do? Here's a screenshot of what i've put together, (probably completely wrong).

    i.imgur.com/vpVuOL2.png

    Any tips to make this happen would be great!

  • every 20 seconds set TIME_VAR(global variable)

    spawn enemy every TIME_VAR

  • Hi Everyone, I'm trying to put together a simple "stay alive as long as possible" style game.

    I've made a set of enemies spawn outside the layout and move across the screen, the players goal is to avoid the enemies. My problem I have is I have no idea how to make the enemies go from spawning a random amount every second to after 20/30 seconds change this to spawning a random amount every 0.5 seconds.

    I'd then like to be able to keep speeding the spawn rates up every 20/30 seconds or so.

    Is something like this possible to do? Here's a screenshot of what i've put together, (probably completely wrong).

    http://i.imgur.com/vpVuOL2.png

    Any tips to make this happen would be great!

    A good way to do it would be to firstly have two global variables;

    interval

    respawnRate

    So, every "interval" seconds, you decrease "respawnRate", which stores your enemy spawn rate.

    <img src="http://s23.postimg.org/4hfk5k0sb/spawn.png" border="0" />

    Can you apply something like that to your situation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • exactly what i meant <img src="smileys/smiley2.gif" border="0" align="middle" />

  • exactly what i meant <img src="smileys/smiley2.gif" border="0" align="middle" />

    I completely agree. It was just that by the time I wrote up my reply, you'd already beaten me to it. <img src="smileys/smiley36.gif" border="0" align="middle" />

  • no problem you got even an example for him <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Thanks for your replies, you've all been super helpful. I'll give this a go and let you know how I get on.

  • This worked perfectly, does exactly what I wanted it to. One last thing, is there a way to add a condition onto the end so that when my spawnrate gets to a certain speed it locks at that speed, avoiding it quickening the spawn rate endlessly?

    Thanks again for all your help

  • What you could do is add an event that compares two variables, and then make lowering your respawn rate conditional on its value being more than x;

    <img src="http://s10.postimg.org/o0b78mma1/spawn3.png" border="0" />

    I'd be interested to know if there's another way to do it, though. Perhaps with the While plugin, although I haven't used that myself yet, so I'm not 100% sure on how it functions.

    Edit: Corrected my image. The second condition didn't need to be a sub-event.

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