activateTarget
An eventCall to activate another entity from an idEncounterManager.
Usage
item[0] = {
eventCall = {
eventDef = "activateTarget";
args = {
num = 2;
item[0] = {
entity = ""; // target
}
item[1] = {
string = ""; // designComment
}
}
}
}
target
is the entity that is being activated.designComment
is an optional parameter for the user, and does not show up in game.
Example Usage
entity { // You Can't Just Shoot a Hole into the Surface of Mars
entityDef mod_soundentity_samuel_vo_shoot_mars {
inherit = "sound/soundentity";
class = "idSoundEntity";
expandInheritance = false;
poolCount = 0;
poolGranularity = 2;
networkReplicated = false;
disableAIPooling = false;
edit = {
temporarySoundEvent = true;
spawnPosition = {
x = 4.20000553;
y = 0.449982464;
z = 12.1500015;
}
soundOcclusionBypass = true;
startEvents = {
num = 1;
item[0] = "play_vo_samuel_hubsamuel_hookup_you_cant_just_shoot__ghost52033";
}
}
}
}
item[0] = {
eventCall = {
eventDef = "waitAIRemaining";
args = {
num = 3;
item[0] = {
eEncounterSpawnType_t = "ENCOUNTER_SPAWN_ANY";
}
item[1] = {
int = 0; // desired_remaing_ai_count
}
item[2] = {
string = ""; // group_label
}
}
}
}
item[1] = {
eventCall = {
eventDef = "activateTarget";
args = {
num = 2;
item[0] = {
entity = "mod_soundentity_samuel_vo_shoot_mars"; // target
}
item[1] = {
string = "Play Hayden's audio for the Mars Hole line"; // designComment
}
}
}
}
First we place an idSoundEntity
with the name mod_soundentity_samuel_vo_shoot_mars
in the .entities, and then within the encounter manager, we can use activateTarget
on mod_soundentity_samuel_vo_shoot_mars
after our waitAIRemaining
, so that the "You can't just shoot a hole in the surface of Mars" line is triggered once no ai remain.