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
|
Location: 41,54
|
||||||
Owner: France
|
Owner: France
|
||||||
Health: 52
|
Health: 52
|
||||||
Actor54: v07
|
HayHouse: v07
|
||||||
Location: 54,65
|
Location: 54,65
|
||||||
Owner: France
|
Owner: France
|
||||||
Health: 44
|
Health: 44
|
||||||
@@ -583,5 +583,8 @@ Actors:
|
|||||||
YakEntry: waypoint
|
YakEntry: waypoint
|
||||||
Location: 51,84
|
Location: 51,84
|
||||||
Owner: Neutral
|
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
|
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)
|
||||||
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()
|
WorldLoaded = function()
|
||||||
player = Player.GetPlayer("USSR")
|
player = Player.GetPlayer("USSR")
|
||||||
france = Player.GetPlayer("France")
|
france = Player.GetPlayer("France")
|
||||||
@@ -90,6 +101,7 @@ WorldLoaded = function()
|
|||||||
Paradrop = Actor.Create("powerproxy.paratroopers", false, { Owner = player })
|
Paradrop = Actor.Create("powerproxy.paratroopers", false, { Owner = player })
|
||||||
Trigger.AfterDelay(DateTime.Seconds(2), InsertYaks)
|
Trigger.AfterDelay(DateTime.Seconds(2), InsertYaks)
|
||||||
Paratroopers()
|
Paratroopers()
|
||||||
|
Trigger.OnDamaged(HayHouse, PanicAttack)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
|
|||||||
Reference in New Issue
Block a user