spawnPossessedAI

An eventCall to spawn an ai that is already possessed by a spirit in an idEncounterManager.

Usage

item[0] = {
	eventCall = {
		eventDef = "spawnPossessedAI";
		args = {
			num = 7;
			item[0] = {
				eEncounterSpawnType_t = ""; // ai_spawnType
			}
			item[1] = {
				entity = ""; // ai_spawnTarget
			}
			item[2] = {
				string = ""; // ai_groupLabel
			}
			item[3] = {
				entity = ""; // spirit_spawnTarget
			}
			item[4] = {
				eEncounterSpawnType_t = ""; // spirit_allowedAITypes
			}
			item[5] = {
				string = ""; // spirit_allowedGroupLabel
			}
			item[6] = {
				bool = true; // aiTypeExplicitFiltering
			}
		}
	}
}

Example Usage

item[0] = {
	eventCall = {
		eventDef = "spawnSingleAI";
		args = {
			num = 3;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_PINKY";
			}
			item[1] = {
				entity = "ai_target_spawn_13";
			}
			item[2] = {
				string = "heavy";
			}
		}
	}
}
item[1] = {
	eventCall = {
		eventDef = "spawnPossessedAI";
		args = {
			num = 7;
			item[0] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_REVENANT"; // ai_spawnType
			}
			item[1] = {
				entity = "ai_target_spawn_21"; // ai_spawnTarget
			}
			item[2] = {
				string = "beamer"; // ai_groupLabel
			}
			item[3] = {
				entity = "ai_target_spawn_17"; // spirit_spawnTarget
			}
			item[4] = {
				eEncounterSpawnType_t = "ENCOUNTER_SPAWN_ANY"; // spirit_allowedAITypes
			}
			item[5] = {
				string = "beamer"; // spirit_allowedGroupLabel
			}
			item[6] = {
				bool = true; // aiTypeExplicitFiltering
			}
		}
	}
}

In this example, we spawn a Pinky with the heavy label. Then we use spawnPossessedAI to spawn a Revenant with the beamer label, and the spirit with the ability to possess any ai type with the beamer label. This way, once the possessed Revenant is dead, there are no other ai that use the beamer label, so the spirit will be unable to possess anyone else, and will despawn.

 

See Also

 


Revision #3
Created 7 September 2021 19:05:56 by elizabethany
Updated 2 April 2023 15:09:08 by SamPT