How do I make complitly different waves of enemies

0 favourites
  • 11 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • 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

    Please help me.

  • 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..

  • 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 ?

  • I need a specify number and type of enemies per wave

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would something like this work for you?

    (add some kind of trigger)

    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

  • so i have to define wave = 1, wave = 2 etc for this function ?

  • 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"....

  • i've a function, but how those groups should look like ?

  • 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.

  • 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.

  • That's what the triggered event I talked about was for..

    You should have a triggered condition with the system compare condition..

    so only call the function every x seconds

    or when all enemies of the first wave are destroyed

    adding a system trigger once condition could help also if you are changing the wavenumber in a different (triggered) event, so the enemy-wave is only called if the wave number changes..

    Thre are so many ways to prevent this every tick issue, that only you can decide what is the way for your game..

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