Skip to main content

waitMaintainComplete

An eventCall to wait until a preceding maintainAICount finishes.

Usage

item[0] = {
	eventCall = {
		eventDef = "waitMaintainComplete";
		args = {
			num = 3;
			item[0] = {
				eEncounterSpawnType_t = ""; // aiType
			}
			item[1] = {
				int = 0; // remaining_spawn_count
			}
			item[2] = {
				string = ""; // group_label
			}
		}
	}
}
  • aiType are the eEncounterSpawnType_t that you want to be wait on. ENCOUNTER_SPAWN_ANY can also be used.
  • remaining_spawn_countdesired_count is how many remaining spawns this eventCall should wait on.
  • group_label is the same as the label given to the preceding maintainAICount. This parameter is optional, and can be left blank.

This eventcall only works if max_spawn_count is set to a finite amount, ex. not -1.

Example Usage

item[0] = {
	eventCall = {
		eventDef = "maintainAICount";
		args = {
			num = 8;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_BARON";
			}
			item[1] = {
				int = 1; // desired_count
			}
			item[2] = {
				int = 3; // max_spawn_count
			}
			item[3] = {
				float = 5; // min_spawn_delay
			}
			item[4] = {
				int = 0; // min_ai_for_respawn
			}
			item[5] = {
				entity = "mod_spawngroup_encounter7B"; // spawnGroup
			}
			item[6] = {
				string = "priority"; // group_label
			}
			item[7] = {
				float = 5; // max_spawn_delay
			}
		}
	}
}
item[1] = {
	eventCall = {
		eventDef = "waitMaintainComplete";
		args = {
			num = 3;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_BARON"; // aiType
			}
			item[1] = {
				int = 0; // remaining_spawn_count
			}
			item[2] = {
				string = "priority"; // group_label
			}
		}
	}
}
item[2] = {
	eventCall = {
		eventDef = "spawnSingleAI";
		args = {
			num = 3;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_PAIN_ELEMENTAL";
			}
			item[1] = {
				entity = "master_level_target_spawn_13";
			}
			item[2] = {
				string = "priority";
			}
		}
	}
}

We start with a maintainAICount that spawns 1 Baron at a time, with up to 3 spawns, each spaced 5s apart. Then we can use waitMaintainComplete with ENCOUNTER_SPAWN_BARON and remaining_spawn_count set to 0, so that when all 3 Barons have spawned (ie. 0 spawns remaining), the encounter manager can proceed to the next eventCall and spawn the Pain Elemental.

See Also