Quick Start 2: Second Spawner & Elimination Mode

Picking up where we left off in Quick Start 1, in this one we're going to add a second Spawner to the existing Global Wave, and take a look at Elimination Waves.

     
  1. First, we're going to need to create another Spawner so we can use it. Select LevelWaveSettings in the Hierarchy and expand the Syncro Spawners section. Now enter "Spawner2" the new Spawner's name and click "Create Spawner" like before.
  2.  
  3. Now click the gear icon for the Spawner2 row that appears underneath to select the Spawner, and then move the Spawner to the position in the Scene where you want it.
  4.  
  5. Now we will create the Spawner Wave. Select LevelWaveSettings in the Hierarchy and scroll down to the Levels & Waves section, where your existing Global Wave is. You should see that Wave 1 uses Spawner1 already.
  6.  
  7. Select "Spawner2" from the "Add Wave For Spawner" dropdown and a new row should appear underneath. Your Wave should now look like this with 2 rows:
     

  8.  
  9. Click the gear icon for Spawner2 to edit the Spawner so we can configure the Spawner Wave.
  10.  
  11. Again, we will need to set the prefab to spawn and tell it how many. For this one, let's have it spawn between 5 and 10 spheres over 5 seconds, with a delay of 4 seconds.
       
    • Set Min To Spawn to 5.
    •  
    • Set Max To Spawn to 10.
    •  
    • Set Time To Spawn All to 5.
    •  
    • Set Wave Delay (sec) to 4.
  12.  
  13. For this Spawner, we'll spawn a sphere. So go ahead and make a new prefab of a Sphere, then drag it into the Prefab To Spawn field. Then when the Pool Boss error comes up, tell it to preload 10 of that item in Pool Boss.
  14.  
  15. We want to be able to see each item spawn, so let's try something new. Click the checkbox for "Incremental Settings" and click the "F" next to the 0.0 for Distance X and drag it left or right slowly. As you do so, watch the previewing of the Wave in Scene View. It will actually show you a "sample Wave spawn" in Edit mode as you tweak! This is a killer feature when deciding what values to use. You may have to zoom out in Scene View.
  16.  
  17. Do the same click and drag with the mouse for the Distance Z. I ended up with X of -1 and Z of -0.5. Looked like this in Scene View:
     

  18.  
  19. Go turn on and tweak the Incremental Settings for Spawner1 while we're at it so you'll be able to see each item spawn when we press play in a bit.
  20.  
  21. Our Global Wave is currently Timed. But let's check out an Elimination Wave. Go back to LevelWaveSettings.htm (click on the Core GameKit logo in the Inspector), and down to he Levels & Waves section. Now change the Wave Type from "Timed" to "Elimination". This will mean that the Wave will not end until everything spawned is despawned. Now go ahead and press play and wait until everything is spawned, watching each item appear. Notice that the Spawners are staggered because Spawner1 starts immediately and we told Spawner2 to wait 4 seconds before starting.
  22.  
  23. Everything is spawned, and 10 seconds has passed, but the Game Status Panel still says "Playing Level 1, Wave 1". It's waiting for us to kill or despawn all those spawned objects before ending the Wave. It also says "Elimination Spawners Remaining: 2". This is valuable information. That means that neither of the Spawners' Waves has been eliminated. They are counted individually.
     

  24.  
  25. We don't have any way to kill these right now, so let's Pool Boss to do it during runtime. Navigate to Pool Boss by clicking the "Pool Boss" button in the Core GameKit logo header. You'll see something like this:
     

  26.  
  27. If you read the "Legend", you'll see that we can "Despawn All" with the "pop" icon. We can do that at the item, Category or Global level. Go ahead and click the "pop" icon for the Category to do both items. Now the yellow items will go to red (meaning nothing spawned) and the item count indicators will all say zero. It will look like this:
     

  28.  
  29. If you go back to LevelWaveSettings and look at the Game Status Panel again, it will say "Game Over", because we have now beat the last Wave in the last Level.
 

That's it for this Quick Start!

 

Next: Quick Start 3: Prefab Pools