Convert Waypoints to actors
This commit is contained in:
@@ -48,17 +48,16 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
if (ticks == 0)
|
||||
{
|
||||
var w = Map.Waypoints;
|
||||
LoopTrack(Actors["boat1"], w["tl1"], w["tr1"]);
|
||||
LoopTrack(Actors["boat3"], w["tl1"], w["tr1"]);
|
||||
LoopTrack(Actors["boat2"], w["tl3"], w["tr3"]);
|
||||
LoopTrack(Actors["boat4"], w["tl3"], w["tr3"]);
|
||||
LoopTrack(Actors["boat1"], Actors["tl1"].Location, Actors["tr1"].Location);
|
||||
LoopTrack(Actors["boat3"], Actors["tl1"].Location, Actors["tr1"].Location);
|
||||
LoopTrack(Actors["boat2"], Actors["tl3"].Location, Actors["tr3"].Location);
|
||||
LoopTrack(Actors["boat4"], Actors["tl3"].Location, Actors["tr3"].Location);
|
||||
CreateUnitsInTransport(Actors["lst1"], new string[] {"htnk"});
|
||||
CreateUnitsInTransport(Actors["lst2"], new string[] {"mcv"});
|
||||
CreateUnitsInTransport(Actors["lst3"], new string[] {"htnk"});
|
||||
LoopTrack(Actors["lst1"], w["tl2"], w["tr2"]);
|
||||
LoopTrack(Actors["lst2"], w["tl2"], w["tr2"]);
|
||||
LoopTrack(Actors["lst3"], w["tl2"], w["tr2"]);
|
||||
LoopTrack(Actors["lst1"], Actors["tl2"].Location, Actors["tr2"].Location);
|
||||
LoopTrack(Actors["lst2"], Actors["tl2"].Location, Actors["tr2"].Location);
|
||||
LoopTrack(Actors["lst3"], Actors["tl2"].Location, Actors["tr2"].Location);
|
||||
}
|
||||
|
||||
ticks++;
|
||||
|
||||
@@ -97,12 +97,12 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
new OwnerInit( Players["BadGuy"] ),
|
||||
new FacingInit( 0 ),
|
||||
new LocationInit ( Map.Waypoints["nod0"] ),
|
||||
new LocationInit ( Actors["nod0"].Location ),
|
||||
});
|
||||
var mobile = a.Trait<Mobile>();
|
||||
a.QueueActivity( mobile.MoveTo( Map.Waypoints["nod1"], 2 ) );
|
||||
a.QueueActivity( mobile.MoveTo( Map.Waypoints["nod2"], 2 ) );
|
||||
a.QueueActivity( mobile.MoveTo( Map.Waypoints["nod3"], 2 ) );
|
||||
a.QueueActivity( mobile.MoveTo( Actors["nod1"].Location, 2 ) );
|
||||
a.QueueActivity( mobile.MoveTo( Actors["nod2"].Location, 2 ) );
|
||||
a.QueueActivity( mobile.MoveTo( Actors["nod3"].Location, 2 ) );
|
||||
// Todo: Queue hunt order
|
||||
}
|
||||
});
|
||||
@@ -127,8 +127,8 @@ namespace OpenRA.Mods.Cnc
|
||||
if (ticks == 25*5)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
Actors["lstStart"].Location,
|
||||
Actors["lstEnd"].Location,
|
||||
new int2(53,53),
|
||||
new string[] {"e1","e1","e1"});
|
||||
}
|
||||
@@ -136,8 +136,8 @@ namespace OpenRA.Mods.Cnc
|
||||
if (ticks == 25*15)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
Actors["lstStart"].Location,
|
||||
Actors["lstEnd"].Location,
|
||||
new int2(53,53),
|
||||
new string[] {"e1","e1","e1"});
|
||||
}
|
||||
@@ -145,8 +145,8 @@ namespace OpenRA.Mods.Cnc
|
||||
if (ticks == 25*30)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
Actors["lstStart"].Location,
|
||||
Actors["lstEnd"].Location,
|
||||
new int2(53,53),
|
||||
new string[] {"jeep"});
|
||||
}
|
||||
@@ -154,8 +154,8 @@ namespace OpenRA.Mods.Cnc
|
||||
if (ticks == 25*60)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
Actors["lstStart"].Location,
|
||||
Actors["lstEnd"].Location,
|
||||
new int2(53,53),
|
||||
new string[] {"jeep"});
|
||||
}
|
||||
@@ -167,8 +167,8 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
var self = Actors[ "Gunboat" ];
|
||||
var mobile = self.Trait<Mobile>();
|
||||
self.QueueActivity(mobile.ScriptedMove( Map.Waypoints["gunboatLeft"] ));
|
||||
self.QueueActivity(mobile.ScriptedMove( Map.Waypoints["gunboatRight"] ));
|
||||
self.QueueActivity(mobile.ScriptedMove( Actors["gunboatLeft"].Location ));
|
||||
self.QueueActivity(mobile.ScriptedMove( Actors["gunboatRight"].Location ));
|
||||
self.QueueActivity(new CallFunc(() => SetGunboatPath()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user