launch a Nod attack after 15 seconds

This commit is contained in:
Matthias Mailänder
2014-02-07 15:33:50 +01:00
parent 5581e6c4d9
commit 4fc9e0e288
2 changed files with 14 additions and 3 deletions

View File

@@ -8,6 +8,18 @@ MissionFailed = function()
Media.PlayMovieFullscreen("gameover.vqa")
end
AttackPlayer = function()
if not Actor.IsDead(NodBarracks) then
Production.BuildWithPerFactoryQueue(NodBarracks, "e1", 5)
attackSquad = Team.New(Map.FindUnitsInCircle(enemy, NodBarracks.location, 3))
Team.Do(attackSquad, function(unit)
Actor.AttackMove(unit, waypoint9.location)
Actor.Hunt(unit)
end)
Team.AddEventHandler(attackSquad.OnAllKilled, OpenRA.RunAfterDelay(Utils.Seconds(15), AttackPlayer))
end
end
WorldLoaded = function()
player = OpenRA.GetPlayer("GDI")
enemy = OpenRA.GetPlayer("Nod")
@@ -16,6 +28,7 @@ WorldLoaded = function()
samSites = Team.New({ Sam1, Sam2, Sam3, Sam4 })
Team.AddEventHandler(samSites.OnAllKilled, function() Actor.Create("PowerProxy.AirSupport", { Owner = player }) end)
OpenRA.RunAfterDelay(Utils.Seconds(15), AttackPlayer)
end
Tick = function()

View File

@@ -392,7 +392,7 @@ Actors:
Owner: Nod
Health: 1
Facing: 0
Actor111: hand
NodBarracks: hand
Location: 24,26
Owner: Nod
Health: 1
@@ -913,8 +913,6 @@ Rules:
-Buildable:
GUN:
-Buildable:
GTWR:
-Buildable:
ATWR:
-Buildable:
E3: