Port missions to the new Paratroopers API.

This commit is contained in:
Paul Chote
2020-02-27 21:18:43 +00:00
committed by Matthias Mailänder
parent c0587cc568
commit d73ed7670a
21 changed files with 138 additions and 81 deletions

View File

@@ -182,14 +182,19 @@ FinishTimer = function()
Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end)
end
SendSovietParadrops = function(table)
local units = powerproxy.SendParatroopers(table[2].CenterPosition, false, table[1])
IdleHunt = function(unit)
Trigger.OnIdle(unit, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
end
Utils.Do(units, function(unit)
Trigger.OnIdle(unit, function(a)
if a.IsInWorld then
a.Hunt()
end
SendSovietParadrops = function(table)
local aircraft = powerproxy.ActivateParatroopers(table[2].CenterPosition, table[1])
Utils.Do(aircraft, function(a)
Trigger.OnPassengerExited(a, function(t, p)
IdleHunt(p)
end)
end)
end
@@ -285,7 +290,7 @@ end
DropAlliedArtillery = function(facing, dropzone)
local proxy = Actor.Create("powerproxy.allied", true, { Owner = allies })
proxy.SendParatroopers(dropzone, false, facing)
proxy.ActivateParatroopers(dropzone, facing)
proxy.Destroy()
end