staggeredAISpawn
An eventCall to spawn multiple idAI2 entities, with a delay between each spawn, in an idEncounterManager.
Usage
item[0] = {
eventCall = {
eventDef = "staggeredAISpawn";
args = {
num = 6;
item[0] = {
eEncounterSpawnType_t = ""; // spawnType
}
item[1] = {
int = 5; // spawn_count
}
item[2] = {
entity = ""; // spawnGroup
}
item[3] = {
string = ""; // group_label
}
item[4] = {
float = 1; // minSpawnStagger
}
item[5] = {
float = 5; // maxSpawnStagger
}
}
}
}
spawnType
is the ai type that you want to be spawned. Multiple types can be listed, and the spawned ai types will be randomly chosen from this list.spawnCount
is the number of ai you want to be spawned. To avoid overlapping spawns, spawnCount should be <= the number ofidTarget_Spawns
listed under youridTargetSpawnGroup
.spawnGroup
is theidTargetSpawnGroup
you want to use.group_label
is what label you want to give to the ai spawned by this eventCall. This parameter is optional, and can be left blank.minSpawnStagger
is the minimum delay between each spawn, in seconds. This value also affects how soon the first spawn in this eventCall occurs.maxSpawnStagger
is the maximum delay between spawns, in seconds.
minSpawnStagger
must be <= maxSpawnStagger
Example Usage
item[0] = {
eventCall = {
eventDef = "staggeredAISpawn";
args = {
num = 6;
item[0] = {
eEncounterSpawnType_t = "ENCOUNTER_SPAWN_ZOMBIE"; // spawnType
}
item[1] = {
int = 5; // spawn_count
}
item[2] = {
entity = "game_target_spawn_group_13"; // spawnGroup
}
item[3] = {
string = ""; // group_label
}
item[4] = {
float = 7.5; // minSpawnStagger
}
item[5] = {
float = 10; // maxSpawnStagger
}
}
}
}
In this example, 5 Zombies will be spawned, with a 7.5 - 10s delay between each one.
See Also
No Comments