Skip to main content

spawnAI

An eventCall to spawn multiple idAI2 entities, simultaneously, in an idEncounterManager.

Usage

item[0] = {
    eventCall = {
        eventDef = "spawnAI";
        args = {
            num = 4;
            item[0] = {
                eEncounterSpawnType_t = ""; // spawnType
            }
            item[1] = {
                int = 6; // spawn_count
            }
            item[2] = {
                entity = ""; // spawnGroup
            }
            item[3] = {
                string = ""; // group_label
            }
        }
    }
}
  • 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 of idTarget_Spawn entities listed under your idTargetSpawnGroup.
  • group_label is the label you want to give this spawned ai. This parameter is optional and can be left blank.

Example Usage

item[0] = {
	eventCall = {
		eventDef = "spawnAI";
		args = {
			num = 4;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_HELL_SOLDIER"; // spawnType
			}
			item[1] = {
				int = 6; // spawn_count
			}
			item[2] = {
				entity = "mod_spawngroup_1"; // spawnGroup
			}
			item[3] = {
				string = "fodder"; // group_label
			}
		}
	}
}