Indeed.
I was thinking that Blizzard managed it by using "Killed by" and "Unit is at location" triggers with "if it's not there, reincarnate it" switches. But then I remembered that one time I had a dt and a scout firing on them both and the scout got the last shot, and it respawned. Could blizzard have used hidden triggers on the "kill the cerebrates but only with dt" missions or something?
I remember that Blizzard answered this a long time ago on a site that I don't think is available anymore; I was able to find the classic SC Compendium, but not the page where they explained this. They did indeed recreate the Cerebrate if it was killed while Zeratul was not near it. There was no mystery trigger to detect what unit got the last hit on it. (I wish there were, though, it would have been really useful for us!) Here are the relevant triggers from Protoss 9 as extracted from my copy of SC in 2002, though I doubt Blizzard actually modified the campaign files.
Trigger("Player 8"){
Conditions:
Bring("Current Player", "Zeratul (Dark Templar)", "Baelrog Cerebrate", At least, 1);
Bring("Zerg Swarm", "Zerg Cerebrate", "Baelrog Cerebrate", At most, 0);
Actions:
; Wait(1000);
Set Switch("Switch1", set);
; Kill Unit At Location("All players", "Zerg Cerebrate", All, "Baelrog Cerebrate");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Bring("Current Player", "Zeratul (Dark Templar)", "Leviathan cerebrate", At least, 1);
Bring("Zerg Swarm", "Zerg Cerebrate", "Leviathan cerebrate", At most, 0);
Actions:
; Wait(1000);
Set Switch("Switch2", set);
; Kill Unit At Location("All players", "Zerg Cerebrate", All, "Leviathan cerebrate");
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Switch("Switch1", not set);
Bring("Zerg Swarm", "Zerg Cerebrate", "Baelrog Cerebrate", At most, 0);
Actions:
Kill Unit At Location("Player 8", "Buildings", All, "Baelrog Cerebrate");
Kill Unit At Location("Player 7", "Any unit", All, "Baelrog Cerebrate");
Move Unit("Player 8", "Men", All, "leviathan backoff 2", "baelrog outta the way 2");
Move Unit("Player 8", "Men", All, "Baelrog back off!", "outta the way - baelrog");
Create Unit with Properties("Zerg Swarm", "Zerg Cerebrate", 0, "Baelrog Cerebrate", 0);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Player 8"){
Conditions:
Switch("Switch2", not set);
Bring("Zerg Swarm", "Zerg Cerebrate", "Leviathan cerebrate", At most, 0);
Actions:
Kill Unit At Location("Player 8", "Buildings", All, "Leviathan cerebrate");
Kill Unit At Location("Player 6", "Any unit", All, "Leviathan cerebrate");
Move Unit("Player 8", "Men", All, "leviathan back off!", "outta the way- leviathan");
Move Unit("Player 8", "Men", All, "leviathan backoff 2", "leviathan outta the way 2");
Create Unit with Properties("Zerg Swarm", "Zerg Cerebrate", 0, "Leviathan cerebrate", 0);
Preserve Trigger();
}
//-----------------------------------------------------------------//
Trigger("Fleet of the Executor"){
Conditions:
Switch("Switch1", set);
Switch("Switch2", set);
Actions:
Victory();
}
//-----------------------------------------------------------------//
There are much better and efficient ways to do this with modern mapping knowledge, but that was how it was done back in the original campaign.