Utilize Panic function with added OnDamaged trigger
This commit is contained in:
committed by
Matthias Mailänder
parent
15a92f443d
commit
e1523e939d
@@ -213,7 +213,7 @@ Actors:
|
||||
Location: 41,54
|
||||
Owner: France
|
||||
Health: 52
|
||||
Actor54: v07
|
||||
HayHouse: v07
|
||||
Location: 54,65
|
||||
Owner: France
|
||||
Health: 44
|
||||
@@ -583,5 +583,8 @@ Actors:
|
||||
YakEntry: waypoint
|
||||
Location: 51,84
|
||||
Owner: Neutral
|
||||
CivSpawn: waypoint
|
||||
Location: 55,65
|
||||
Owner: Neutral
|
||||
|
||||
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
|
||||
|
||||
@@ -56,6 +56,17 @@ Paratroopers = function()
|
||||
end)
|
||||
end
|
||||
|
||||
PanicAttack = function()
|
||||
if not HouseDamaged then
|
||||
local panicTeam = Reinforcements.Reinforce(france, { "c3", "c6", "c9" }, { CivSpawn.Location }, 0)
|
||||
Utils.Do(panicTeam, function(a)
|
||||
a.Move(a.Location + CVec.New(-1,-1))
|
||||
a.Panic()
|
||||
end)
|
||||
end
|
||||
HouseDamaged = true
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
player = Player.GetPlayer("USSR")
|
||||
france = Player.GetPlayer("France")
|
||||
@@ -90,6 +101,7 @@ WorldLoaded = function()
|
||||
Paradrop = Actor.Create("powerproxy.paratroopers", false, { Owner = player })
|
||||
Trigger.AfterDelay(DateTime.Seconds(2), InsertYaks)
|
||||
Paratroopers()
|
||||
Trigger.OnDamaged(HayHouse, PanicAttack)
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
|
||||
Reference in New Issue
Block a user