Use the OnPlayerDiscovered trigger in gdi05a
This commit is contained in:
@@ -11,11 +11,6 @@ GdiTanks = { "mtnk", "mtnk" }
|
|||||||
GdiApc = { "apc" }
|
GdiApc = { "apc" }
|
||||||
GdiInfantry = { "e1", "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2", "e2" }
|
GdiInfantry = { "e1", "e1", "e1", "e1", "e1", "e2", "e2", "e2", "e2", "e2" }
|
||||||
GdiBase = { GdiNuke1, GdiNuke2, GdiProc, GdiSilo1, GdiSilo2, GdiPyle, GdiWeap, GdiHarv }
|
GdiBase = { GdiNuke1, GdiNuke2, GdiProc, GdiSilo1, GdiSilo2, GdiPyle, GdiWeap, GdiHarv }
|
||||||
GdiBaseDiscoveryTrigger =
|
|
||||||
{
|
|
||||||
CPos.New(39, 54), CPos.New(48, 42), CPos.New(49, 42), CPos.New(50, 42), CPos.New(51, 42),
|
|
||||||
CPos.New(52, 42), CPos.New(53, 42), CPos.New(54, 42), CPos.New(55, 42), CPos.New(56, 42)
|
|
||||||
}
|
|
||||||
NodSams = { Sam1, Sam2, Sam3, Sam4 }
|
NodSams = { Sam1, Sam2, Sam3, Sam4 }
|
||||||
CoreNodBase = { NodConYard, NodRefinery, HandOfNod, Airfield }
|
CoreNodBase = { NodConYard, NodRefinery, HandOfNod, Airfield }
|
||||||
|
|
||||||
@@ -122,7 +117,11 @@ Grd3Action = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
DiscoverGdiBase = function()
|
DiscoverGdiBase = function(actor, discoverer)
|
||||||
|
if baseDiscovered or not discoverer == gdi then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
Utils.Do(GdiBase, function(actor)
|
Utils.Do(GdiBase, function(actor)
|
||||||
actor.Owner = gdi
|
actor.Owner = gdi
|
||||||
end)
|
end)
|
||||||
@@ -145,12 +144,7 @@ SetupWorld = function()
|
|||||||
Reinforcements.Reinforce(gdi, GdiApc, { GdiApcEntry.Location, GdiApcRallyPoint.Location }, DateTime.Seconds(1), function(actor) actor.Stance = "Defend" end)
|
Reinforcements.Reinforce(gdi, GdiApc, { GdiApcEntry.Location, GdiApcRallyPoint.Location }, DateTime.Seconds(1), function(actor) actor.Stance = "Defend" end)
|
||||||
Reinforcements.Reinforce(gdi, GdiInfantry, { GdiInfantryEntry.Location, GdiInfantryRallyPoint.Location }, 15, function(actor) actor.Stance = "Defend" end)
|
Reinforcements.Reinforce(gdi, GdiInfantry, { GdiInfantryEntry.Location, GdiInfantryRallyPoint.Location }, 15, function(actor) actor.Stance = "Defend" end)
|
||||||
|
|
||||||
Trigger.OnEnteredFootprint(GdiBaseDiscoveryTrigger, function(actor, id)
|
Trigger.OnPlayerDiscovered(gdiBase, DiscoverGdiBase)
|
||||||
if actor.Owner == gdi then
|
|
||||||
DiscoverGdiBase()
|
|
||||||
Trigger.RemoveFootprintTrigger(id)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
Utils.Do(Map.NamedActors, function(actor)
|
Utils.Do(Map.NamedActors, function(actor)
|
||||||
if actor.Owner == nod and actor.HasProperty("StartBuildingRepairs") then
|
if actor.Owner == nod and actor.HasProperty("StartBuildingRepairs") then
|
||||||
@@ -186,6 +180,7 @@ SetupWorld = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
|
gdiBase = Player.GetPlayer("AbandonedBase")
|
||||||
gdi = Player.GetPlayer("GDI")
|
gdi = Player.GetPlayer("GDI")
|
||||||
nod = Player.GetPlayer("Nod")
|
nod = Player.GetPlayer("Nod")
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ MapFormat: 7
|
|||||||
|
|
||||||
RequiresMod: cnc
|
RequiresMod: cnc
|
||||||
|
|
||||||
Title: Repair the GDI base
|
Title: Repair the GDI base (a)
|
||||||
|
|
||||||
Description: A GDI field base is under attack. They have fended off one attack but will not survive another.\n\nMove to the base, repair the structures and then launch a strike force to destroy the Nod base in the area.\n\nDestroy all Nod units and structures.
|
Description: A GDI field base is under attack. They have fended off one attack but will not survive another.\n\nMove to the base, repair the structures and then launch a strike force to destroy the Nod base in the area.\n\nDestroy all Nod units and structures.
|
||||||
|
|
||||||
@@ -56,6 +56,11 @@ Players:
|
|||||||
LockTeam: True
|
LockTeam: True
|
||||||
Allies: GDI
|
Allies: GDI
|
||||||
Enemies: Nod
|
Enemies: Nod
|
||||||
|
PlayerReference@AbandonedBase:
|
||||||
|
Name: AbandonedBase
|
||||||
|
NonCombatant: True
|
||||||
|
ColorRamp: 31,222,183
|
||||||
|
Race: gdi
|
||||||
PlayerReference@Neutral:
|
PlayerReference@Neutral:
|
||||||
Name: Neutral
|
Name: Neutral
|
||||||
OwnsWorld: True
|
OwnsWorld: True
|
||||||
@@ -684,36 +689,36 @@ Actors:
|
|||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
GdiProc: proc
|
GdiProc: proc
|
||||||
Location: 50,51
|
Location: 50,51
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.3085938
|
Health: 0.3085938
|
||||||
FreeActor: False
|
FreeActor: False
|
||||||
GdiHarv: harv
|
GdiHarv: harv
|
||||||
Location: 48,53
|
Location: 48,53
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Facing: 64
|
Facing: 64
|
||||||
GdiWeap: weap
|
GdiWeap: weap
|
||||||
Location: 50,54
|
Location: 50,54
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.2695313
|
Health: 0.2695313
|
||||||
GdiNuke1: nuke
|
GdiNuke1: nuke
|
||||||
Location: 53,55
|
Location: 53,55
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.2890625
|
Health: 0.2890625
|
||||||
GdiPyle: pyle
|
GdiPyle: pyle
|
||||||
Location: 46,55
|
Location: 46,55
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.25
|
Health: 0.25
|
||||||
GdiSilo1: silo
|
GdiSilo1: silo
|
||||||
Location: 53,51
|
Location: 53,51
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.3320313
|
Health: 0.3320313
|
||||||
GdiSilo2: silo
|
GdiSilo2: silo
|
||||||
Location: 53,53
|
Location: 53,53
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.25
|
Health: 0.25
|
||||||
GdiNuke2: nuke
|
GdiNuke2: nuke
|
||||||
Location: 48,56
|
Location: 48,56
|
||||||
Owner: Neutral
|
Owner: AbandonedBase
|
||||||
Health: 0.2070313
|
Health: 0.2070313
|
||||||
NodConYard: fact
|
NodConYard: fact
|
||||||
Location: 9,29
|
Location: 9,29
|
||||||
@@ -796,6 +801,7 @@ Rules:
|
|||||||
-ConquestVictoryConditions:
|
-ConquestVictoryConditions:
|
||||||
MissionObjectives:
|
MissionObjectives:
|
||||||
EarlyGameOver: true
|
EarlyGameOver: true
|
||||||
|
EnemyWatcher:
|
||||||
^Vehicle:
|
^Vehicle:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
GenericVisibility: Enemy
|
GenericVisibility: Enemy
|
||||||
@@ -826,6 +832,7 @@ Rules:
|
|||||||
Tooltip:
|
Tooltip:
|
||||||
GenericVisibility: Enemy
|
GenericVisibility: Enemy
|
||||||
ShowOwnerRow: false
|
ShowOwnerRow: false
|
||||||
|
AnnounceOnSeen:
|
||||||
^Wall:
|
^Wall:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
ShowOwnerRow: false
|
ShowOwnerRow: false
|
||||||
|
|||||||
Reference in New Issue
Block a user