Let the 2nd civilian panic when his mate gets electrocuted.

This commit is contained in:
Matthias Mailänder
2020-06-06 10:48:00 +02:00
committed by reaperrr
parent 6130d5622c
commit 5b870be83f

View File

@@ -123,6 +123,12 @@ CiviliansKilled = function()
collateralDamage = true
end
LostMate = function()
if not Civilian2.IsDead then
Civilian2.Panic()
end
end
CreateEinstein = function()
player.MarkCompletedObjective(FindEinsteinObjective)
Media.PlaySpeechNotification(player, "ObjectiveMet")
@@ -205,6 +211,7 @@ WorldLoaded = function()
collateralDamage = false
civilianTeam = { Civilian1, Civilian2 }
Trigger.OnAnyKilled(civilianTeam, CiviliansKilled)
Trigger.OnKilled(Civilian1, LostMate)
SetUnitStances()