Add a warning when attacking the Outpost to ordos04

This commit is contained in:
abcdefg30
2017-06-27 17:09:27 +02:00
committed by reaperrr
parent a942ca8f57
commit e07779942e

View File

@@ -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")