# How do I make complitly different waves of enemies

Get help using Construct 2

### » Wed Sep 24, 2014 12:44 pm

Hi, i want to create a "waves of enemies spawner", and i want to spawn emenies like:
Wave 1: 4 * enemy.1
Wave 2: 2 * enemy.2 + 3* enemy.1
Wave3: 1 * enemy.3 + 2* enemy.2 .....
etc and i have no idea how to do this. i can spawn only random enemies of my pool but i want to add/remove single of them every X time.
Game is like top-down space shooter and i want to spawn all enemies from bottom of screen
B
5
Posts: 22
Reputation: 269

### » Wed Sep 24, 2014 12:54 pm

I would either use grouped events

If wave = 1 - activate group wave1 and so on..

or have a function which is called with the parameters for the amount of enemies to be created per type..

I don't see why you could only create random enemies, so have no answer for that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Wed Sep 24, 2014 12:55 pm

is it random or what ? i mean every x seconds you spawn a different wave of random enemies or you want to specify depond on the wave number ?
B
12
S
6
Posts: 118
Reputation: 1,466

### » Wed Sep 24, 2014 1:10 pm

I need a specify number and type of enemies per wave
B
5
Posts: 22
Reputation: 269

### » Wed Sep 24, 2014 1:23 pm

Would something like this work for you?

if wave = 2
call function "wave" with parameters 3,2 (parameter 0 will be enemy 1, parameter1 will be nr of enemy 2, etc)

on function wave called
- repeat function.param(0) times
-- create enemy 1
-repear function.param(1) times
-- create enemy 2
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

### » Wed Sep 24, 2014 2:07 pm

so i have to define wave = 1, wave = 2 etc for this function ?
B
5
Posts: 22
Reputation: 269

### » Wed Sep 24, 2014 2:19 pm

it just needs a variable name it Wave and add 1 to it each time theres a new wave , specifiy a groupe of event to spawn a specifique enemies types and number each time. and make a compare systeme compage value , if wave=1 ---> activate groupe "wave1"....
B
12
S
6
Posts: 118
Reputation: 1,466

### » Wed Sep 24, 2014 2:26 pm

i've a function, but how those groups should look like ?
B
5
Posts: 22
Reputation: 269

### » Wed Sep 24, 2014 3:36 pm

in the event-sheet right click , from the popup menu select add groupe , set it not active on start of layout.
add whatever conditions and action as you want , and then activate the groupe when you need it , you can activate it by making action system.set groupe ctive "groupe1" = activated.

don't forget to disactivat the groupe when it finish the job , add action like this in the end of groupe system.set groupe ctive = disactivated.
B
12
S
6
Posts: 118
Reputation: 1,466

### » Wed Sep 24, 2014 4:06 pm

LittleStain wrote:on function wave called
- repeat function.param(0) times
-- create enemy 1
-repear function.param(1) times
-- create enemy 2

In this case my enemies spawn every tick, even if param is number.
B
5
Posts: 22
Reputation: 269

Next