Fix scripted paradrops

A recent PR changed ParaDrop from an Effect to an Activity. Idle triggers in the mission scripts however have already queued activities for the paradropped units, so the ParaDrop activity would only run once the first activity had finished (which could never happen).
This commit is contained in:
Oliver Brakmann
2015-07-18 21:13:33 +02:00
committed by abcdefg30
parent 3e7134ae6b
commit d5c65b59b0
6 changed files with 41 additions and 7 deletions

View File

@@ -36,9 +36,17 @@ ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4, Paradrop5, Par
BindActorTriggers = function(a)
if a.HasProperty("Hunt") then
if a.Owner == allies then
Trigger.OnIdle(a, a.Hunt)
Trigger.OnIdle(a, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
else
Trigger.OnIdle(a, function(a) a.AttackMove(AlliedTechnologyCenter.Location) end)
Trigger.OnIdle(a, function(a)
if a.IsInWorld then
a.AttackMove(AlliedTechnologyCenter.Location)
end
end)
end
end