Skip to main content

waitKillCount

An eventCall that tells the idEncounterManager to wait until a certain quantity of the specified ai type are killed.

Usage

item[0] = {
    eventCall = {
        eventDef = "waitKillCount";
        args = {
            num = 3;
            item[0] = {
                eEncounterEventFlags_t = ""; // aiType
            }
            item[1] = {
                int = 1; // desired_kill_count
            }
            item[2] = {
				string = ""; // group_label
			}
        }
    }
}
  • aiType is the ai type(s) that you want to wait on.
  • desired_kill_count is how many of the specified ai type(s) you want to be killed before proceeding.
  • group_label is the label for the specified ai type(s). This parameter is optional, can be left blank if inapplicable.

Example Usage

item[0] = {
    eventCall = {
        eventDef = "maintainAICount";
        args = {
            num = 8;
            item[0] = {
                eEncounterSpawnType_t = "ENCOUNTER_SPAWN_IMP ENCOUNTER_SPAWN_HELL_SOLDIER"; // spawnType
            }
            item[1] = {
                int = 5; // desired_count
            }
            item[2] = {
                int = -1; // max_spawn_count
            }
            item[3] = {
                float = 1; // min_spawn_delay
            }
            item[4] = {
                int = 3; // min_ai_for_respawn
            }
            item[5] = {
                entity = "mod_spawngroup_1"; // spawnGroup
            }
            item[6] = {
                string = "fodder"; // group_label
            }
            item[7] = {
                float = 2; // max_spawn_delay
            }
        }
    }
}
item[1] = {
    eventCall = {
        eventDef = "waitKillCount";
        args = {
            num = 3;
            item[0] = {
                eEncounterEventFlags_t = "ENCOUNTER_SPAWN_ANY"; // aiType
            }
            item[1] = {
                int = 10; // desired_kill_count
            }
            item[2] = {
				string = "fodder"; // group_label
			}
        }
    }
}
item[2] = {
    eventCall = {
        eventDef = "stopMaintainingAICount";
        args = {
            num = 2;
            item[0] = {
                eEncounterSpawnType_t = "ENCOUNTER_SPAWN_ANY"; // aiType
            }
            item[1] = {
				string = "fodder"; // group_label
			}
        }
    }
}

In this example, the maintainAICount will spawn 5 infinitely respawning Imps or Soldiers. However, once the player has killed 10 fodder, the maintainAICount will be stopped.