[Solved] How do I make infinite wave spawns

Get help using Construct 2

Post » Mon Aug 10, 2015 2:26 pm

I want to make infinite number of waves that double the amount of spawned enemies after previous are defeated untill its 100 of them (then they keep that number). Also enemies cant bug each other when spawning by stacking on each other so they need to have time pauses between each spawn.
Last edited by Human on Wed Aug 12, 2015 6:41 pm, edited 1 time in total.
B
11
S
4
Posts: 53
Reputation: 1,148

Post » Mon Aug 10, 2015 7:12 pm

Do like:

global var maxEnemies = 6 (or w.e)

GROUP: Enemy Spawner
Every 10.0 seconds: (or w.e time)
- - For loopindex 0 to maxEnemies :: Spawn enemy
- - - - Compare variables: loopindex = maxEnemies :: maxEnemies = maxEnemies * 2

Compare variables: maxEnemies >= 100 :: Disable group "Enemy Spawner"
Else :: Enable group "Enemy Spawner"

As far as spawning on one another, you can put a Wait 0.5 sec in the loop, or space out the spawns spatially.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857

Post » Wed Aug 12, 2015 6:41 pm

I have no idea how to use your solution, but...

This is what I did:
Image
Image


global variables
Spawn - is spawning allowed? this waits untill there are no enemies left.
enemycount - checks how many enemies have been counted
cenemycurrent - checks how many enemies are alive
checknumber - checks if checking of enemy current is in progress, if it is it stops it from looping.

It works perfectly so far, enemies do not stack on each other.
B
11
S
4
Posts: 53
Reputation: 1,148

Post » Wed Aug 12, 2015 8:54 pm

Thanks for posting your solution, in case someone else has the same issue.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], jogindarpradeep and 18 guests