diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index d3c5a15a15..392227a6e4 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -1530,7 +1530,7 @@ Actors: Location: 32,56 Owner: BadGuy Health: 0.6875 - Actor479: silo + USSROutpostSilo: silo Location: 37,61 Owner: BadGuy Actor480: powr diff --git a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua index 8569007426..2479d4d270 100644 --- a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua +++ b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua @@ -76,17 +76,19 @@ SetupAlliedBase = function() Utils.Do(SuperTanks, function(tnk) if not tnk.IsDead then Trigger.ClearAll(tnk) - Trigger.OnIdle(tnk, function() - if SuperTankAttack then - if tnk.Location == SuperTankMoveWaypoints[SuperTankMove].Location then - SuperTankMove = SuperTankMove + 1 - if SuperTankMove == 5 then - SuperTankAttack = false + Trigger.AfterDelay(0, function() + Trigger.OnIdle(tnk, function() + if SuperTankAttack then + if tnk.Location == SuperTankMoveWaypoints[SuperTankMove].Location then + SuperTankMove = SuperTankMove + 1 + if SuperTankMove == 5 then + SuperTankAttack = false + end + else + tnk.AttackMove(SuperTankMoveWaypoints[SuperTankMove].Location, 2) end - else - tnk.AttackMove(SuperTankMoveWaypoints[SuperTankMove].Location, 2) end - end + end) end) end end) @@ -123,19 +125,21 @@ SuperTankDomeInfiltrated = function() SuperTankHunt = 4 SuperTankHuntCounter = -1 end - Trigger.OnIdle(tnk, function() - if SuperTankAttack then - if tnk.Location == SuperTankHuntWaypoints[SuperTankHunt].Location then - SuperTankHunt = SuperTankHunt + SuperTankHuntCounter - if SuperTankHunt == 0 or SuperTankHunt == 5 then - SuperTankAttack = false + Trigger.AfterDelay(0, function() + Trigger.OnIdle(tnk, function() + if SuperTankAttack then + if tnk.Location == SuperTankHuntWaypoints[SuperTankHunt].Location then + SuperTankHunt = SuperTankHunt + SuperTankHuntCounter + if SuperTankHunt == 0 or SuperTankHunt == 5 then + SuperTankAttack = false + end + else + tnk.AttackMove(SuperTankHuntWaypoints[SuperTankHunt].Location, 2) end else - tnk.AttackMove(SuperTankHuntWaypoints[SuperTankHunt].Location, 2) + tnk.Hunt() end - else - tnk.Hunt() - end + end) end) end end) @@ -228,8 +232,8 @@ InitPlayers = function() player.Cash = 0 ussr.Cash = 2000 - --badguy.Resources = badguy.ResourceCapacity -- doesn't work, workaround below - Trigger.OnCapture(Actor479, function() + Trigger.AfterDelay(0, function() badguy.Resources = badguy.ResourceCapacity * 0.75 end) + Trigger.OnCapture(USSROutpostSilo, function() -- getting money through capturing doesn't work player.Cash = player.Cash + Utils.RandomInteger(1200, 1300) end) end