Polish and standardize Allies01
This commit is contained in:
@@ -15,9 +15,12 @@ TanyaReinforcements = { "e7.noautotarget" }
|
|||||||
EinsteinType = "einstein"
|
EinsteinType = "einstein"
|
||||||
FlareType = "flare"
|
FlareType = "flare"
|
||||||
CruisersReinforcements = { "ca", "ca", "ca", "ca" }
|
CruisersReinforcements = { "ca", "ca", "ca", "ca" }
|
||||||
|
OpeningAttack = { Patrol1, Patrol2, Patrol3, Patrol4 }
|
||||||
|
Responders = { Response1, Response2, Response3, Response4, Response5 }
|
||||||
|
LabGuardsTeam = { LabGuard1, LabGuard2, LabGuard3 }
|
||||||
|
|
||||||
SendInsertionHelicopter = function()
|
SendInsertionHelicopter = function()
|
||||||
local passengers = Reinforcements.ReinforceWithTransport(player, InsertionHelicopterType,
|
local passengers = Reinforcements.ReinforceWithTransport(Greece, InsertionHelicopterType,
|
||||||
TanyaReinforcements, InsertionPath, { InsertionEntry.Location })[2]
|
TanyaReinforcements, InsertionPath, { InsertionEntry.Location })[2]
|
||||||
local tanya = passengers[1]
|
local tanya = passengers[1]
|
||||||
Trigger.OnKilled(tanya, TanyaKilledInAction)
|
Trigger.OnKilled(tanya, TanyaKilledInAction)
|
||||||
@@ -27,41 +30,54 @@ SendInsertionHelicopter = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
SendJeeps = function()
|
SendJeeps = function()
|
||||||
Reinforcements.Reinforce(player, JeepReinforcements, InsertionPath, DateTime.Seconds(2))
|
Reinforcements.Reinforce(Greece, JeepReinforcements, InsertionPath, DateTime.Seconds(2))
|
||||||
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
|
Media.PlaySpeechNotification(Greece, "ReinforcementsArrived")
|
||||||
end
|
end
|
||||||
|
|
||||||
RunInitialActivities = function()
|
RunInitialActivities = function()
|
||||||
SendInsertionHelicopter()
|
SendInsertionHelicopter()
|
||||||
Patrol1.Hunt()
|
|
||||||
Patrol2.Hunt()
|
Utils.Do(OpeningAttack, function(a)
|
||||||
Patrol3.Hunt()
|
IdleHunt(a)
|
||||||
Patrol4.Hunt()
|
end)
|
||||||
Civilian1.Wait(DateTime.Seconds(6))
|
|
||||||
Civilian2.Wait(DateTime.Seconds(6))
|
Trigger.OnKilled(Patrol3, function()
|
||||||
Civilian1.Hunt()
|
if not Civilian1.IsDead then
|
||||||
Civilian2.Hunt()
|
Civilian1.Move(CivMove.Location)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnKilled(BarrelPower, function()
|
||||||
|
if not Civilian2.IsDead then
|
||||||
|
Civilian2.Move(CivMove.Location)
|
||||||
|
end
|
||||||
|
Utils.Do(Responders, function(r)
|
||||||
|
if not r.IsDead then
|
||||||
|
IdleHunt(r)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
LabGuardsKilled = function()
|
LabGuardsKilled = function()
|
||||||
CreateEinstein()
|
CreateEinstein()
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||||
Actor.Create(FlareType, true, { Owner = england, Location = ExtractionFlarePoint.Location })
|
Actor.Create(FlareType, true, { Owner = England, Location = ExtractionFlarePoint.Location })
|
||||||
Media.PlaySpeechNotification(player, "SignalFlareNorth")
|
Media.PlaySpeechNotification(Greece, "SignalFlareNorth")
|
||||||
SendExtractionHelicopter()
|
SendExtractionHelicopter()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||||
Media.PlaySpeechNotification(player, "AlliedReinforcementsArrived")
|
Media.PlaySpeechNotification(Greece, "AlliedReinforcementsArrived")
|
||||||
Actor.Create("camera", true, { Owner = player, Location = CruiserCameraPoint.Location })
|
Actor.Create("camera", true, { Owner = Greece, Location = CruiserCameraPoint.Location })
|
||||||
SendCruisers()
|
SendCruisers()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(12), function()
|
Trigger.AfterDelay(DateTime.Seconds(12), function()
|
||||||
for i = 0, 2 do
|
for i = 0, 2 do
|
||||||
Trigger.AfterDelay(DateTime.Seconds(i), function()
|
Trigger.AfterDelay(DateTime.Seconds(i), function()
|
||||||
Media.PlaySoundNotification(player, "AlertBuzzer")
|
Media.PlaySoundNotification(Greece, "AlertBuzzer")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
Utils.Do(sovietArmy, function(a)
|
Utils.Do(sovietArmy, function(a)
|
||||||
@@ -73,7 +89,7 @@ LabGuardsKilled = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
SendExtractionHelicopter = function()
|
SendExtractionHelicopter = function()
|
||||||
heli = Reinforcements.ReinforceWithTransport(player, ExtractionHelicopterType, nil, ExtractionPath)[1]
|
heli = Reinforcements.ReinforceWithTransport(Greece, ExtractionHelicopterType, nil, ExtractionPath)[1]
|
||||||
if not einstein.IsDead then
|
if not einstein.IsDead then
|
||||||
Trigger.OnRemovedFromWorld(einstein, EvacuateHelicopter)
|
Trigger.OnRemovedFromWorld(einstein, EvacuateHelicopter)
|
||||||
end
|
end
|
||||||
@@ -91,7 +107,7 @@ end
|
|||||||
SendCruisers = function()
|
SendCruisers = function()
|
||||||
local i = 1
|
local i = 1
|
||||||
Utils.Do(CruisersReinforcements, function(cruiser)
|
Utils.Do(CruisersReinforcements, function(cruiser)
|
||||||
local ca = Actor.Create(cruiser, true, { Owner = england, Location = SouthReinforcementsPoint.Location + CVec.New(2 * i, 0) })
|
local ca = Actor.Create(cruiser, true, { Owner = England, Location = SouthReinforcementsPoint.Location + CVec.New(2 * i, 0) })
|
||||||
ca.Move(Map.NamedActor("CruiserPoint" .. i).Location)
|
ca.Move(Map.NamedActor("CruiserPoint" .. i).Location)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end)
|
end)
|
||||||
@@ -104,13 +120,13 @@ LabDestroyed = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
RescueFailed = function()
|
RescueFailed = function()
|
||||||
Media.PlaySpeechNotification(player, "ObjectiveNotMet")
|
Media.PlaySpeechNotification(Greece, "ObjectiveNotMet")
|
||||||
player.MarkFailedObjective(EinsteinSurviveObjective)
|
Greece.MarkFailedObjective(EinsteinSurviveObjective)
|
||||||
end
|
end
|
||||||
|
|
||||||
TanyaKilledInAction = function()
|
TanyaKilledInAction = function()
|
||||||
Media.PlaySpeechNotification(player, "ObjectiveNotMet")
|
Media.PlaySpeechNotification(Greece, "ObjectiveNotMet")
|
||||||
player.MarkFailedObjective(TanyaSurviveObjective)
|
Greece.MarkFailedObjective(TanyaSurviveObjective)
|
||||||
end
|
end
|
||||||
|
|
||||||
OilPumpDestroyed = function()
|
OilPumpDestroyed = function()
|
||||||
@@ -118,8 +134,8 @@ OilPumpDestroyed = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
CiviliansKilled = function()
|
CiviliansKilled = function()
|
||||||
player.MarkFailedObjective(CivilProtectionObjective)
|
Greece.MarkFailedObjective(CivilProtectionObjective)
|
||||||
Media.PlaySpeechNotification(player, "ObjectiveNotMet")
|
Media.PlaySpeechNotification(Greece, "ObjectiveNotMet")
|
||||||
collateralDamage = true
|
collateralDamage = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -130,83 +146,82 @@ LostMate = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
CreateEinstein = function()
|
CreateEinstein = function()
|
||||||
player.MarkCompletedObjective(FindEinsteinObjective)
|
Greece.MarkCompletedObjective(FindEinsteinObjective)
|
||||||
Media.PlaySpeechNotification(player, "ObjectiveMet")
|
Media.PlaySpeechNotification(Greece, "ObjectiveMet")
|
||||||
einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = player })
|
einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = Greece })
|
||||||
einstein.Scatter()
|
einstein.Scatter()
|
||||||
Trigger.OnKilled(einstein, RescueFailed)
|
Trigger.OnKilled(einstein, RescueFailed)
|
||||||
ExtractObjective = player.AddObjective("Wait for the helicopter and extract Einstein.")
|
ExtractObjective = Greece.AddObjective("Wait for the helicopter and extract Einstein.")
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(player, "TargetFreed") end)
|
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(Greece, "TargetFreed") end)
|
||||||
end
|
end
|
||||||
|
|
||||||
HelicopterGone = function()
|
HelicopterGone = function()
|
||||||
if not heli.IsDead then
|
if not heli.IsDead then
|
||||||
Media.PlaySpeechNotification(player, "TargetRescued")
|
Media.PlaySpeechNotification(Greece, "TargetRescued")
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||||
player.MarkCompletedObjective(ExtractObjective)
|
Greece.MarkCompletedObjective(ExtractObjective)
|
||||||
player.MarkCompletedObjective(EinsteinSurviveObjective)
|
Greece.MarkCompletedObjective(EinsteinSurviveObjective)
|
||||||
if not player.IsObjectiveFailed(TanyaSurviveObjective) then
|
if not Greece.IsObjectiveFailed(TanyaSurviveObjective) then
|
||||||
player.MarkCompletedObjective(TanyaSurviveObjective)
|
Greece.MarkCompletedObjective(TanyaSurviveObjective)
|
||||||
end
|
end
|
||||||
if not collateralDamage then
|
if not collateralDamage then
|
||||||
player.MarkCompletedObjective(CivilProtectionObjective)
|
Greece.MarkCompletedObjective(CivilProtectionObjective)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
MissionAccomplished = function()
|
MissionAccomplished = function()
|
||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(Greece, "MissionAccomplished")
|
||||||
end
|
end
|
||||||
|
|
||||||
MissionFailed = function()
|
MissionFailed = function()
|
||||||
Media.PlaySpeechNotification(player, "MissionFailed")
|
Media.PlaySpeechNotification(Greece, "MissionFailed")
|
||||||
end
|
end
|
||||||
|
|
||||||
SetUnitStances = function()
|
SetUnitStances = function()
|
||||||
Utils.Do(Map.NamedActors, function(a)
|
Utils.Do(Map.NamedActors, function(a)
|
||||||
if a.Owner == player then
|
if a.Owner == Greece then
|
||||||
a.Stance = "Defend"
|
a.Stance = "Defend"
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
ussr.Resources = ussr.Resources - (0.01 * ussr.ResourceCapacity / 25)
|
USSR.Resources = USSR.Resources - (0.01 * USSR.ResourceCapacity / 25)
|
||||||
end
|
end
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
player = Player.GetPlayer("Greece")
|
Greece = Player.GetPlayer("Greece")
|
||||||
england = Player.GetPlayer("England")
|
England = Player.GetPlayer("England")
|
||||||
ussr = Player.GetPlayer("USSR")
|
USSR = Player.GetPlayer("USSR")
|
||||||
|
|
||||||
Trigger.OnObjectiveAdded(player, function(p, id)
|
Trigger.OnObjectiveAdded(Greece, 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)
|
||||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
Trigger.OnObjectiveCompleted(Greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
end)
|
end)
|
||||||
Trigger.OnObjectiveFailed(player, function(p, id)
|
Trigger.OnObjectiveFailed(Greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnPlayerLost(player, MissionFailed)
|
Trigger.OnPlayerLost(Greece, MissionFailed)
|
||||||
Trigger.OnPlayerWon(player, MissionAccomplished)
|
Trigger.OnPlayerWon(Greece, MissionAccomplished)
|
||||||
|
|
||||||
FindEinsteinObjective = player.AddObjective("Find Einstein.")
|
FindEinsteinObjective = Greece.AddObjective("Find Einstein.")
|
||||||
TanyaSurviveObjective = player.AddObjective("Tanya must survive.")
|
TanyaSurviveObjective = Greece.AddObjective("Tanya must survive.")
|
||||||
EinsteinSurviveObjective = player.AddObjective("Einstein must survive.")
|
EinsteinSurviveObjective = Greece.AddObjective("Einstein must survive.")
|
||||||
CivilProtectionObjective = player.AddObjective("Protect all civilians.", "Secondary", false)
|
CivilProtectionObjective = Greece.AddObjective("Protect all civilians.", "Secondary", false)
|
||||||
|
|
||||||
RunInitialActivities()
|
RunInitialActivities()
|
||||||
|
|
||||||
Trigger.OnKilled(Lab, LabDestroyed)
|
Trigger.OnKilled(Lab, LabDestroyed)
|
||||||
Trigger.OnKilled(OilPump, OilPumpDestroyed)
|
Trigger.OnKilled(OilPump, OilPumpDestroyed)
|
||||||
|
|
||||||
sovietArmy = ussr.GetGroundAttackers()
|
sovietArmy = USSR.GetGroundAttackers()
|
||||||
|
|
||||||
labGuardsTeam = { LabGuard1, LabGuard2, LabGuard3 }
|
Trigger.OnAllKilled(LabGuardsTeam, LabGuardsKilled)
|
||||||
Trigger.OnAllKilled(labGuardsTeam, LabGuardsKilled)
|
|
||||||
|
|
||||||
collateralDamage = false
|
collateralDamage = false
|
||||||
civilianTeam = { Civilian1, Civilian2 }
|
civilianTeam = { Civilian1, Civilian2 }
|
||||||
@@ -215,7 +230,7 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
SetUnitStances()
|
SetUnitStances()
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(5), function() Actor.Create("camera", true, { Owner = player, Location = BaseCameraPoint.Location }) end)
|
Trigger.AfterDelay(DateTime.Seconds(5), function() Actor.Create("camera", true, { Owner = Greece, Location = BaseCameraPoint.Location }) end)
|
||||||
|
|
||||||
Camera.Position = InsertionLZ.CenterPosition
|
Camera.Position = InsertionLZ.CenterPosition
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
@@ -21,10 +21,10 @@ LockPreview: True
|
|||||||
Players:
|
Players:
|
||||||
PlayerReference@USSR:
|
PlayerReference@USSR:
|
||||||
Name: USSR
|
Name: USSR
|
||||||
|
Bot: campaign
|
||||||
Faction: soviet
|
Faction: soviet
|
||||||
Color: FE1100
|
Color: FE1100
|
||||||
Enemies: Greece, England
|
Enemies: Greece, England
|
||||||
Bot: campaign
|
|
||||||
PlayerReference@Neutral:
|
PlayerReference@Neutral:
|
||||||
Name: Neutral
|
Name: Neutral
|
||||||
OwnsWorld: True
|
OwnsWorld: True
|
||||||
@@ -32,8 +32,8 @@ Players:
|
|||||||
Faction: allies
|
Faction: allies
|
||||||
PlayerReference@Greece:
|
PlayerReference@Greece:
|
||||||
Name: Greece
|
Name: Greece
|
||||||
Playable: True
|
|
||||||
AllowBots: False
|
AllowBots: False
|
||||||
|
Playable: True
|
||||||
Required: True
|
Required: True
|
||||||
LockFaction: True
|
LockFaction: True
|
||||||
Faction: allies
|
Faction: allies
|
||||||
@@ -45,11 +45,11 @@ Players:
|
|||||||
Enemies: USSR
|
Enemies: USSR
|
||||||
PlayerReference@England:
|
PlayerReference@England:
|
||||||
Name: England
|
Name: England
|
||||||
|
Bot: campaign
|
||||||
Faction: allies
|
Faction: allies
|
||||||
Color: A1EF8C
|
Color: A1EF8C
|
||||||
Allies: Greece
|
Allies: Greece
|
||||||
Enemies: USSR
|
Enemies: USSR
|
||||||
Bot: campaign
|
|
||||||
|
|
||||||
Actors:
|
Actors:
|
||||||
Actor0: t16
|
Actor0: t16
|
||||||
@@ -127,7 +127,7 @@ Actors:
|
|||||||
Actor24: powr
|
Actor24: powr
|
||||||
Location: 67,57
|
Location: 67,57
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Actor25: powr
|
BarrelPower: powr
|
||||||
Location: 61,57
|
Location: 61,57
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Actor27: fact
|
Actor27: fact
|
||||||
@@ -203,31 +203,31 @@ Actors:
|
|||||||
Location: 73,66
|
Location: 73,66
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
SubCell: 1
|
SubCell: 1
|
||||||
Actor56: e1
|
Response3: e1
|
||||||
Location: 62,67
|
Location: 62,67
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Facing: 512
|
|
||||||
SubCell: 4
|
SubCell: 4
|
||||||
Actor57: e1
|
Facing: 512
|
||||||
|
Response5: e1
|
||||||
Location: 67,67
|
Location: 67,67
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Facing: 640
|
|
||||||
SubCell: 3
|
SubCell: 3
|
||||||
Actor58: e1
|
Facing: 640
|
||||||
|
Response4: e1
|
||||||
Location: 65,67
|
Location: 65,67
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Facing: 640
|
|
||||||
SubCell: 3
|
SubCell: 3
|
||||||
Actor59: e1
|
Facing: 640
|
||||||
|
Response1: e1
|
||||||
Location: 56,60
|
Location: 56,60
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Facing: 384
|
|
||||||
SubCell: 1
|
SubCell: 1
|
||||||
Actor63: e1
|
Facing: 384
|
||||||
|
Response2: e1
|
||||||
Location: 58,60
|
Location: 58,60
|
||||||
Owner: USSR
|
Owner: USSR
|
||||||
Facing: 256
|
|
||||||
SubCell: 1
|
SubCell: 1
|
||||||
|
Facing: 256
|
||||||
Actor64: e1
|
Actor64: e1
|
||||||
Location: 64,49
|
Location: 64,49
|
||||||
Owner: Greece
|
Owner: Greece
|
||||||
@@ -403,7 +403,7 @@ Actors:
|
|||||||
Owner: England
|
Owner: England
|
||||||
SubCell: 3
|
SubCell: 3
|
||||||
EinsteinSpawnPoint: waypoint
|
EinsteinSpawnPoint: waypoint
|
||||||
Location: 62,61
|
Location: 62,60
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
InsertionEntry: waypoint
|
InsertionEntry: waypoint
|
||||||
Location: 63,45
|
Location: 63,45
|
||||||
@@ -441,6 +441,9 @@ Actors:
|
|||||||
CruiserPoint3: waypoint
|
CruiserPoint3: waypoint
|
||||||
Location: 68,76
|
Location: 68,76
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
CivMove: waypoint
|
||||||
|
Location: 69,56
|
||||||
|
Owner: Neutral
|
||||||
|
|
||||||
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
|
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user