Adapt TD missions to TDGunboat refactor

This commit is contained in:
reaperrr
2017-07-14 02:28:52 +02:00
committed by Oliver Brakmann
parent 94fa24088b
commit 9a25b33beb
11 changed files with 7 additions and 105 deletions

View File

@@ -20,11 +20,6 @@ SendNodPatrol = function()
end)
end
SetGunboatPath = function(gunboat)
gunboat.AttackMove(gunboatLeft.Location)
gunboat.AttackMove(gunboatRight.Location)
end
ReinforceWithLandingCraft = function(units, transportStart, transportUnload, rallypoint)
local transport = Actor.Create("oldlst", true, { Owner = player, Facing = 0, Location = transportStart })
local subcell = 0
@@ -97,8 +92,6 @@ WorldLoaded = function()
ReinforceWithLandingCraft(MCVReinforcements, lstStart.Location + CVec.New(2, 0), lstEnd.Location + CVec.New(2, 0), mcvTarget.Location)
Reinforce(InfantryReinforcements)
Trigger.OnIdle(Gunboat, function() SetGunboatPath(Gunboat) end)
SendNodPatrol()
Trigger.AfterDelay(DateTime.Seconds(10), function() Reinforce(InfantryReinforcements) end)

View File

@@ -375,12 +375,6 @@ Actors:
nod3: waypoint
Location: 52,52
Owner: Neutral
gunboatRight: waypoint
Location: 61,59
Owner: Neutral
gunboatLeft: waypoint
Location: 35,59
Owner: Neutral
lstStart: waypoint
Location: 54,61
Owner: Neutral

View File

@@ -744,9 +744,6 @@ Actors:
GunboatRight: waypoint
Owner: Neutral
Location: 58,16
GunboatLeft: waypoint
Owner: Neutral
Location: 4,16
Gunboat: boat
Location: 32,16
Owner: GDI

View File

@@ -18,8 +18,6 @@ GDI2 = { units = { ['e1'] = 10, ['e2'] = 8, ['mtnk'] = 1, ['jeep'] = 1 }, waypoi
GDI3 = { units = { ['jeep'] = 1 }, waypoints = { waypoint0.Location, waypoint1.Location, waypoint3.Location, waypoint4.Location, waypoint3.Location, waypoint2.Location, waypoint5.Location, waypoint6.Location, waypoint2.Location, waypoint7.Location } }
MTANK = { units = { ['mtnk'] = 1 }, waypoints = { waypoint14.Location, waypoint5.Location } }
GunboatPatrolPath = { GunboatLeft.Location, GunboatRight.Location }
targetsKilled = 0
AutoGuard = function(guards)
@@ -107,10 +105,6 @@ SendGuards = function(team)
end
end
Trigger.OnKilled(Gunboat, function()
GunboatCamera.Destroy()
end)
Trigger.OnKilled(GDIHpad, function()
if not player.IsObjectiveCompleted(NodObjective1) then
player.MarkFailedObjective(NodObjective1)
@@ -155,7 +149,6 @@ WorldLoaded = function()
Camera.Position = waypoint26.CenterPosition
GunboatCamera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat.Location })
InsertNodUnits()
SendGuards(GDI1)
@@ -182,8 +175,6 @@ WorldLoaded = function()
Media.PlaySpeechNotification(player, "Lose")
end)
Trigger.OnIdle(Gunboat, function() Gunboat.Patrol(GunboatPatrolPath) end)
Trigger.OnDiscovered(GDIBuilding9, DiscoveredMainEntrance)
Trigger.OnDiscovered(GDIBuilding10, DiscoveredMainEntrance)
Trigger.OnDiscovered(GDIBuilding11, DiscoveredSideEntrance)
@@ -196,10 +187,6 @@ WorldLoaded = function()
end
Tick = function()
if not Gunboat.IsDead then
GunboatCamera.Teleport(Gunboat.Location)
end
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
enemy.MarkCompletedObjective(GDIObjective)
end

View File

@@ -115,6 +115,9 @@ HQ:
BOAT:
Health:
HP: 1500
RevealsShroud:
ValidStances: Ally, Neutral, Enemy
Range: 4c0
TRAN.IN:
Inherits: TRAN
@@ -125,14 +128,6 @@ TRAN.IN:
Buildable:
Prerequisites: ~disabled
Camera.Boat:
AlwaysVisible:
Mobile:
TerrainSpeeds:
RevealsShroud:
Range: 4c0
ScriptTriggers:
HPAD.IN:
Inherits: HPAD
RenderSprites:

View File

@@ -729,18 +729,6 @@ Actors:
Location: 25,60
Owner: GDI
Facing: 192
GunboatLeft1: waypoint
Owner: Neutral
Location: 3,59
GunboatLeft2: waypoint
Owner: Neutral
Location: 3,60
GunboatRight1: waypoint
Owner: Neutral
Location: 61,59
GunboatRight2: waypoint
Owner: Neutral
Location: 61,60
MoneyCrate: MoneyCrate
Owner: Neutral
Location: 24,54

View File

@@ -33,9 +33,6 @@ IntroReinforcements = { "e1", "e1", "e1", "e1", "e1", "e1", "e3", "e3", "e3", "e
NodBaseTrigger = { CPos.New(52, 2), CPos.New(52, 3), CPos.New(52, 4), CPos.New(52, 5), CPos.New(52, 6), CPos.New(52, 7), CPos.New(52, 8) }
Gunboat1PatrolPath = { GunboatLeft1.Location, GunboatRight1.Location }
Gunboat2PatrolPath = { GunboatLeft2.Location, GunboatRight2.Location }
AirstrikeDelay = DateTime.Minutes(2) + DateTime.Seconds(30)
NodBaseCapture = function()
@@ -194,13 +191,6 @@ Trigger.OnEnteredFootprint(NodBaseTrigger, function(a, id)
end
end)
Trigger.OnKilled(Gunboat1, function()
Gunboat1Camera.Destroy()
end)
Trigger.OnKilled(Gunboat2, function()
Gunboat2Camera.Destroy()
end)
WorldLoaded = function()
player = Player.GetPlayer("Nod")
enemy = Player.GetPlayer("GDI")
@@ -211,11 +201,6 @@ WorldLoaded = function()
StartAI(GDICYard)
AutoGuard(enemy.GetGroundAttackers())
Gunboat1Camera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat1.Location })
Gunboat2Camera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat2.Location })
Trigger.OnIdle(Gunboat1, function() Gunboat1.Patrol(Gunboat1PatrolPath) end)
Trigger.OnIdle(Gunboat2, function() Gunboat2.Patrol(Gunboat2PatrolPath) end)
Trigger.OnObjectiveAdded(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
@@ -243,14 +228,6 @@ WorldLoaded = function()
end
Tick = function()
if not Gunboat1.IsDead then
Gunboat1Camera.Teleport(Gunboat1.Location)
end
if not Gunboat2.IsDead then
Gunboat2Camera.Teleport(Gunboat2.Location)
end
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
enemy.MarkCompletedObjective(GDIObjective)
end

View File

@@ -166,14 +166,9 @@ BOAT:
InitialStance: AttackAnything
RejectsOrders:
Except: Attack
Camera.Boat:
AlwaysVisible:
Mobile:
TerrainSpeeds:
RevealsShroud:
Range: 4c0
ScriptTriggers:
ValidStances: Enemy, Neutral, Ally
FACT.IN:
Inherits: FACT

View File

@@ -842,12 +842,6 @@ Actors:
Location: 60,58
Owner: GDI
Facing: 192
GunboatLeft: waypoint
Owner: Neutral
Location: 1,58
GunboatRight: waypoint
Owner: Neutral
Location: 61,58
HelicopterEntryEngineer: waypoint
Owner: Neutral
Location: 1,3

View File

@@ -43,8 +43,6 @@ NodBaseTrigger = { CPos.New(9, 52), CPos.New(9, 51), CPos.New(9, 50), CPos.New(9
EngineerTrigger = { CPos.New(5, 13), CPos.New(6, 13), CPos.New(7, 13), CPos.New(8, 13), CPos.New(9, 13), CPos.New(10, 13), CPos.New(16, 7), CPos.New(16, 6), CPos.New(16, 5), CPos.New(16, 4), CPos.New(16, 3)}
RocketTrigger = { CPos.New(20, 15), CPos.New(21, 15), CPos.New(22, 15), CPos.New(23, 15), CPos.New(24, 15), CPos.New(25, 15), CPos.New(26, 15), CPos.New(32, 15), CPos.New(32, 14), CPos.New(32, 13), CPos.New(32, 12), CPos.New(32, 11)}
GunboatPatrolPath = { GunboatLeft.Location, GunboatRight.Location }
AirstrikeDelay = DateTime.Minutes(2) + DateTime.Seconds(30)
CheckForSams = function(player)
@@ -215,10 +213,6 @@ Trigger.OnKilledOrCaptured(OutpostProc, function()
end
end)
Trigger.OnKilled(Gunboat, function()
GunboatCamera.Destroy()
end)
WorldLoaded = function()
player = Player.GetPlayer("Nod")
enemy = Player.GetPlayer("GDI")
@@ -233,9 +227,6 @@ WorldLoaded = function()
StartAI(GDICYard)
AutoGuard(enemy.GetGroundAttackers())
GunboatCamera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat.Location })
Trigger.OnIdle(Gunboat, function() Gunboat.Patrol(GunboatPatrolPath) end)
Trigger.OnObjectiveAdded(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
@@ -266,10 +257,6 @@ WorldLoaded = function()
end
Tick = function()
if not Gunboat.IsDead then
GunboatCamera.Teleport(Gunboat.Location)
end
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
enemy.MarkCompletedObjective(GDIObjective)
end

View File

@@ -139,6 +139,9 @@ BOAT:
InitialStance: AttackAnything
RejectsOrders:
Except: Attack
RevealsShroud:
ValidStances: Ally, Neutral, Enemy
Range: 4c0
TRAN.IN:
Inherits: TRAN
@@ -149,14 +152,6 @@ TRAN.IN:
Buildable:
Prerequisites: ~disabled
Camera.Boat:
AlwaysVisible:
Mobile:
TerrainSpeeds:
RevealsShroud:
Range: 4c0
ScriptTriggers:
NUKEOUT.IN:
Inherits: NUKE
RenderSprites: