From e07779942e870977f05432f33b730285cbce13f6 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 27 Jun 2017 17:09:27 +0200 Subject: [PATCH] Add a warning when attacking the Outpost to ordos04 --- mods/d2k/maps/ordos-04/ordos04.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mods/d2k/maps/ordos-04/ordos04.lua b/mods/d2k/maps/ordos-04/ordos04.lua index 47a4df7802..5ccea527c6 100644 --- a/mods/d2k/maps/ordos-04/ordos04.lua +++ b/mods/d2k/maps/ordos-04/ordos04.lua @@ -81,6 +81,7 @@ CheckHarvester = function(house) end end +AttackNotifier = 0 Tick = function() if player.HasNoRequiredUnits() then harkonnen.MarkCompletedObjective(KillOrdosH) @@ -95,6 +96,8 @@ Tick = function() CheckHarvester(harkonnen) CheckHarvester(smuggler) + + AttackNotifier = AttackNotifier - 1 end WorldLoaded = function() @@ -134,6 +137,16 @@ WorldLoaded = function() smuggler.MarkFailedObjective(DefendOutpost) end) end) + Trigger.OnDamaged(SOutpost, function() + if SOutpost.Owner ~= smuggler then + return + end + + if AttackNotifier <= 0 then + AttackNotifier = DateTime.Seconds(10) + Media.DisplayMessage("Don't destroy the Outpost!", "Mentat") + end + end) Trigger.AfterDelay(HarkonnenAttackDelay[Difficulty] - DateTime.Seconds(5), function() Media.PlaySpeechNotification(player, "Reinforce")