global_spawnWave.scr

Dependencies

#include "maps/global_scripts/global_common.scr"
#include "maps/global_scripts/global_array.scr"

Purpose

Spawns in waves of AI from a set of spawners.

How To Use

The full explaination of how to setup a spawning wave group is written up under "Spawning Waves".

External Functions

globalSpawnWave_Setup( strSpawnWaveName, intNumberOfSpawners, intNumberOfWaves, intMinPerWave, intMaxPerWave, intWaveId )

Purpose:
Sets up a spawn wave group to be ready for activation

    Parms:
  • strSpawnWaveName (string)
    The unique identifier for this group. All the spawners for this group have to start with this name, followed by a number starting from 1, and incrementing up to the last spawner in the group.

  • intNumberOfSpawners (float)
    The number of spawners placed in this group.

  • intNumberOfWaves (float)
    The number of waves to spawn for this group when it's activated.

  • intMinPerWave (float)
    The minimum number of AI to spawn for a wave. This is also the minimum number that can be alive before spawning the next wave.

  • intMaxPerWave (float)
    The maximum number of AI that will be spawned per wave.

  • intWaveId (float)
    Sets this number as the group ID for all AI spawned in this group. Primarily used for the groupdeaththread option. Make sure that each spawn wave group has it's own unique ID.

globalSpawnWave_SetupDeathThread( strSpawnWaveName, strDeathThread )

Purpose:
Will set a group death thread for a spawn wave group. When all the waves in this group are dead, it will fire this thread.

    Parms:
  • strSpawnWaveName (string)
    The unique identifier for this group. All the spawners for this group have to start with this name, followed by a number starting from 1, and incrementing up to the last spawner in the group.

  • strDeathThread (string)
    The thread to call when all waves are dead.

globalSpawnWave_Start( strSpawnWaveName )

Purpose:
Activate the desired wave spawn group

    Parms:
  • strSpawnWaveName (string),
    The unique identifier for the group to activate. All the spawners for this group have to start with this name, followed by a number starting from 1, and incrementing up to the last spawner in the group