From 5b870be83fdf43fa851f5326bf4c8d3b1a5090d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 6 Jun 2020 10:48:00 +0200 Subject: [PATCH] Let the 2nd civilian panic when his mate gets electrocuted. --- mods/ra/maps/allies-01/allies01.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mods/ra/maps/allies-01/allies01.lua b/mods/ra/maps/allies-01/allies01.lua index 03ffe0abae..296fa556cd 100644 --- a/mods/ra/maps/allies-01/allies01.lua +++ b/mods/ra/maps/allies-01/allies01.lua @@ -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()