3. Setting Up Waves of Robots

The Wave Manager controls the generation of waves of attackling robots. You can tell it what types of robots to spawn, where to spawn them from, how many to spawn, etc. Once you set up the properties for the Wave Manager, robots will begin to spawn and attack just like in the game.

  1. Select the OdinAIWaveManager Actor you previously placed to view its proeprties in the Details panel.

  2. Enable the Auto Activate checkbox to force the waves to automatically begin spawning when the level begins.

    You can also leave this disabled and enable it during play in response to some event in the game using the Level Blueprint if that better fits the gameplay you are trying to create.

    auto_activate.png

  3. The Possible Spawn Locations property determines where the robots will spawn from for the wave. Click the + button to add elements to the array. You need one for each Enemy Start Actor you placed previously.

    spawn_locations.png

  4. Click the Pick Actor from Scene button for each element in the array and then select one of the Enemy Start Actors in the viewport to assign it to the element.

    spawn_locations_pick.png

  5. The Wave Manager can control any number of waves of robots. You specify the waves of robots by adding elements to the array. CLick the + button to add a new wave.

    wave_add.png

  6. You must set the type of wave to see the available properties. Fortunately, there is only one type available currently: Wave. Choose Wave from the class picker.

    wave_select.png

  7. Enter a name for the wave using the Wave Name property. When dealing with multiple waves, giving each wave a name enables you to set up wave-specific behavior in the Level Blueprint.

    wave_name.png

  8. Each wave can have any number of groups, which are collections of robots of the same type. Click the + button for the WaveGroups property to add a new wave group.

    wave_group_add.png

  9. As with the wave, you need to set the type of the group, and again there is only one type available: WaveGroup. Choose WaveGroup from the class picker.

    wave_group_select.png

  10. Give the wave group a name using the Group Name property. Again, this makes it possible to set up scripted events related to a particular group.

    wave_group_name.png

  11. The Character Class* property determines what type of robots the group contains. There are a variety of types available, but for this example we will use a basic pistol-carrying robot. Choose BipedChar_Pistol** from the class picker.

    wave_group_class.png

  12. Finally, you need to specify how many robots the group will contain total, how many to spawn at once, and when to spawn them. Pool Size is the total number of robots the group will spawn. Max Count is the number that are spawned at once. Min Count determines when to spawn new robots. The Wave Manager will spawn new robots when there are only Min Count left. Set Pool Size, Max Count, and Min Count to 8, 4, and 1 respectively. Using these values, the Wave Manager will initially spawn 4 (Max Count) robots. When the player kills 3 of those so there is only 1 (Min COunt) left, the Wave Manager will spawn more until there are 4 (Mac Count) again. Once the Wave Manager has spawned 8 (Pool Size) robots total for this group, no more robots will be spawned for the group.

    wave_group_size.png

Result

Robots with pistols will now spawn and attack the player.

robots.png