Adapt TD missions to TDGunboat refactor
This commit is contained in:
committed by
Oliver Brakmann
parent
94fa24088b
commit
9a25b33beb
@@ -20,11 +20,6 @@ SendNodPatrol = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
SetGunboatPath = function(gunboat)
|
|
||||||
gunboat.AttackMove(gunboatLeft.Location)
|
|
||||||
gunboat.AttackMove(gunboatRight.Location)
|
|
||||||
end
|
|
||||||
|
|
||||||
ReinforceWithLandingCraft = function(units, transportStart, transportUnload, rallypoint)
|
ReinforceWithLandingCraft = function(units, transportStart, transportUnload, rallypoint)
|
||||||
local transport = Actor.Create("oldlst", true, { Owner = player, Facing = 0, Location = transportStart })
|
local transport = Actor.Create("oldlst", true, { Owner = player, Facing = 0, Location = transportStart })
|
||||||
local subcell = 0
|
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)
|
ReinforceWithLandingCraft(MCVReinforcements, lstStart.Location + CVec.New(2, 0), lstEnd.Location + CVec.New(2, 0), mcvTarget.Location)
|
||||||
Reinforce(InfantryReinforcements)
|
Reinforce(InfantryReinforcements)
|
||||||
|
|
||||||
Trigger.OnIdle(Gunboat, function() SetGunboatPath(Gunboat) end)
|
|
||||||
|
|
||||||
SendNodPatrol()
|
SendNodPatrol()
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(10), function() Reinforce(InfantryReinforcements) end)
|
Trigger.AfterDelay(DateTime.Seconds(10), function() Reinforce(InfantryReinforcements) end)
|
||||||
|
|||||||
@@ -375,12 +375,6 @@ Actors:
|
|||||||
nod3: waypoint
|
nod3: waypoint
|
||||||
Location: 52,52
|
Location: 52,52
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
gunboatRight: waypoint
|
|
||||||
Location: 61,59
|
|
||||||
Owner: Neutral
|
|
||||||
gunboatLeft: waypoint
|
|
||||||
Location: 35,59
|
|
||||||
Owner: Neutral
|
|
||||||
lstStart: waypoint
|
lstStart: waypoint
|
||||||
Location: 54,61
|
Location: 54,61
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
|||||||
@@ -744,9 +744,6 @@ Actors:
|
|||||||
GunboatRight: waypoint
|
GunboatRight: waypoint
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Location: 58,16
|
Location: 58,16
|
||||||
GunboatLeft: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 4,16
|
|
||||||
Gunboat: boat
|
Gunboat: boat
|
||||||
Location: 32,16
|
Location: 32,16
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
|
|||||||
@@ -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 } }
|
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 } }
|
MTANK = { units = { ['mtnk'] = 1 }, waypoints = { waypoint14.Location, waypoint5.Location } }
|
||||||
|
|
||||||
GunboatPatrolPath = { GunboatLeft.Location, GunboatRight.Location }
|
|
||||||
|
|
||||||
targetsKilled = 0
|
targetsKilled = 0
|
||||||
|
|
||||||
AutoGuard = function(guards)
|
AutoGuard = function(guards)
|
||||||
@@ -107,10 +105,6 @@ SendGuards = function(team)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Trigger.OnKilled(Gunboat, function()
|
|
||||||
GunboatCamera.Destroy()
|
|
||||||
end)
|
|
||||||
|
|
||||||
Trigger.OnKilled(GDIHpad, function()
|
Trigger.OnKilled(GDIHpad, function()
|
||||||
if not player.IsObjectiveCompleted(NodObjective1) then
|
if not player.IsObjectiveCompleted(NodObjective1) then
|
||||||
player.MarkFailedObjective(NodObjective1)
|
player.MarkFailedObjective(NodObjective1)
|
||||||
@@ -155,7 +149,6 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
Camera.Position = waypoint26.CenterPosition
|
Camera.Position = waypoint26.CenterPosition
|
||||||
|
|
||||||
GunboatCamera = Actor.Create("camera.boat", true, { Owner = player, Location = Gunboat.Location })
|
|
||||||
InsertNodUnits()
|
InsertNodUnits()
|
||||||
|
|
||||||
SendGuards(GDI1)
|
SendGuards(GDI1)
|
||||||
@@ -182,8 +175,6 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnIdle(Gunboat, function() Gunboat.Patrol(GunboatPatrolPath) end)
|
|
||||||
|
|
||||||
Trigger.OnDiscovered(GDIBuilding9, DiscoveredMainEntrance)
|
Trigger.OnDiscovered(GDIBuilding9, DiscoveredMainEntrance)
|
||||||
Trigger.OnDiscovered(GDIBuilding10, DiscoveredMainEntrance)
|
Trigger.OnDiscovered(GDIBuilding10, DiscoveredMainEntrance)
|
||||||
Trigger.OnDiscovered(GDIBuilding11, DiscoveredSideEntrance)
|
Trigger.OnDiscovered(GDIBuilding11, DiscoveredSideEntrance)
|
||||||
@@ -196,10 +187,6 @@ WorldLoaded = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
if not Gunboat.IsDead then
|
|
||||||
GunboatCamera.Teleport(Gunboat.Location)
|
|
||||||
end
|
|
||||||
|
|
||||||
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
|
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
|
||||||
enemy.MarkCompletedObjective(GDIObjective)
|
enemy.MarkCompletedObjective(GDIObjective)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -115,6 +115,9 @@ HQ:
|
|||||||
BOAT:
|
BOAT:
|
||||||
Health:
|
Health:
|
||||||
HP: 1500
|
HP: 1500
|
||||||
|
RevealsShroud:
|
||||||
|
ValidStances: Ally, Neutral, Enemy
|
||||||
|
Range: 4c0
|
||||||
|
|
||||||
TRAN.IN:
|
TRAN.IN:
|
||||||
Inherits: TRAN
|
Inherits: TRAN
|
||||||
@@ -125,14 +128,6 @@ TRAN.IN:
|
|||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
Camera.Boat:
|
|
||||||
AlwaysVisible:
|
|
||||||
Mobile:
|
|
||||||
TerrainSpeeds:
|
|
||||||
RevealsShroud:
|
|
||||||
Range: 4c0
|
|
||||||
ScriptTriggers:
|
|
||||||
|
|
||||||
HPAD.IN:
|
HPAD.IN:
|
||||||
Inherits: HPAD
|
Inherits: HPAD
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
|
|||||||
@@ -729,18 +729,6 @@ Actors:
|
|||||||
Location: 25,60
|
Location: 25,60
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
Facing: 192
|
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
|
MoneyCrate: MoneyCrate
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Location: 24,54
|
Location: 24,54
|
||||||
|
|||||||
@@ -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) }
|
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)
|
AirstrikeDelay = DateTime.Minutes(2) + DateTime.Seconds(30)
|
||||||
|
|
||||||
NodBaseCapture = function()
|
NodBaseCapture = function()
|
||||||
@@ -194,13 +191,6 @@ Trigger.OnEnteredFootprint(NodBaseTrigger, function(a, id)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnKilled(Gunboat1, function()
|
|
||||||
Gunboat1Camera.Destroy()
|
|
||||||
end)
|
|
||||||
Trigger.OnKilled(Gunboat2, function()
|
|
||||||
Gunboat2Camera.Destroy()
|
|
||||||
end)
|
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
player = Player.GetPlayer("Nod")
|
player = Player.GetPlayer("Nod")
|
||||||
enemy = Player.GetPlayer("GDI")
|
enemy = Player.GetPlayer("GDI")
|
||||||
@@ -211,11 +201,6 @@ WorldLoaded = function()
|
|||||||
StartAI(GDICYard)
|
StartAI(GDICYard)
|
||||||
AutoGuard(enemy.GetGroundAttackers())
|
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)
|
Trigger.OnObjectiveAdded(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
@@ -243,14 +228,6 @@ WorldLoaded = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
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
|
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
|
||||||
enemy.MarkCompletedObjective(GDIObjective)
|
enemy.MarkCompletedObjective(GDIObjective)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -166,14 +166,9 @@ BOAT:
|
|||||||
InitialStance: AttackAnything
|
InitialStance: AttackAnything
|
||||||
RejectsOrders:
|
RejectsOrders:
|
||||||
Except: Attack
|
Except: Attack
|
||||||
|
|
||||||
Camera.Boat:
|
|
||||||
AlwaysVisible:
|
|
||||||
Mobile:
|
|
||||||
TerrainSpeeds:
|
|
||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 4c0
|
Range: 4c0
|
||||||
ScriptTriggers:
|
ValidStances: Enemy, Neutral, Ally
|
||||||
|
|
||||||
FACT.IN:
|
FACT.IN:
|
||||||
Inherits: FACT
|
Inherits: FACT
|
||||||
|
|||||||
@@ -842,12 +842,6 @@ Actors:
|
|||||||
Location: 60,58
|
Location: 60,58
|
||||||
Owner: GDI
|
Owner: GDI
|
||||||
Facing: 192
|
Facing: 192
|
||||||
GunboatLeft: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 1,58
|
|
||||||
GunboatRight: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 61,58
|
|
||||||
HelicopterEntryEngineer: waypoint
|
HelicopterEntryEngineer: waypoint
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Location: 1,3
|
Location: 1,3
|
||||||
|
|||||||
@@ -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)}
|
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)}
|
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)
|
AirstrikeDelay = DateTime.Minutes(2) + DateTime.Seconds(30)
|
||||||
|
|
||||||
CheckForSams = function(player)
|
CheckForSams = function(player)
|
||||||
@@ -215,10 +213,6 @@ Trigger.OnKilledOrCaptured(OutpostProc, function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnKilled(Gunboat, function()
|
|
||||||
GunboatCamera.Destroy()
|
|
||||||
end)
|
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
player = Player.GetPlayer("Nod")
|
player = Player.GetPlayer("Nod")
|
||||||
enemy = Player.GetPlayer("GDI")
|
enemy = Player.GetPlayer("GDI")
|
||||||
@@ -233,9 +227,6 @@ WorldLoaded = function()
|
|||||||
StartAI(GDICYard)
|
StartAI(GDICYard)
|
||||||
AutoGuard(enemy.GetGroundAttackers())
|
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)
|
Trigger.OnObjectiveAdded(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
@@ -266,10 +257,6 @@ WorldLoaded = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
if not Gunboat.IsDead then
|
|
||||||
GunboatCamera.Teleport(Gunboat.Location)
|
|
||||||
end
|
|
||||||
|
|
||||||
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
|
if DateTime.GameTime > 2 and player.HasNoRequiredUnits() then
|
||||||
enemy.MarkCompletedObjective(GDIObjective)
|
enemy.MarkCompletedObjective(GDIObjective)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -139,6 +139,9 @@ BOAT:
|
|||||||
InitialStance: AttackAnything
|
InitialStance: AttackAnything
|
||||||
RejectsOrders:
|
RejectsOrders:
|
||||||
Except: Attack
|
Except: Attack
|
||||||
|
RevealsShroud:
|
||||||
|
ValidStances: Ally, Neutral, Enemy
|
||||||
|
Range: 4c0
|
||||||
|
|
||||||
TRAN.IN:
|
TRAN.IN:
|
||||||
Inherits: TRAN
|
Inherits: TRAN
|
||||||
@@ -149,14 +152,6 @@ TRAN.IN:
|
|||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
Camera.Boat:
|
|
||||||
AlwaysVisible:
|
|
||||||
Mobile:
|
|
||||||
TerrainSpeeds:
|
|
||||||
RevealsShroud:
|
|
||||||
Range: 4c0
|
|
||||||
ScriptTriggers:
|
|
||||||
|
|
||||||
NUKEOUT.IN:
|
NUKEOUT.IN:
|
||||||
Inherits: NUKE
|
Inherits: NUKE
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
|
|||||||
Reference in New Issue
Block a user