Begin fleshing out mission scriping
This commit is contained in:
@@ -24,9 +24,10 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
Dictionary<string, Actor> Actors;
|
||||
Dictionary<string, Player> Players;
|
||||
|
||||
Map Map;
|
||||
public void WorldLoaded(World w)
|
||||
{
|
||||
Map = w.Map;
|
||||
Players = w.WorldActor.Trait<CreateMapPlayers>().Players;
|
||||
Actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
|
||||
Game.MoveViewport((.5f * (w.Map.TopLeft + w.Map.BottomRight).ToFloat2()).ToInt2());
|
||||
@@ -57,18 +58,56 @@ namespace OpenRA.Mods.RA
|
||||
return;
|
||||
|
||||
if (ticks == 0)
|
||||
{
|
||||
Actors["Actor87"].QueueActivity(new Move(new int2(50,59),1)); // Gunboat
|
||||
}
|
||||
ticks++;
|
||||
SetGunboatPath();
|
||||
|
||||
|
||||
if (ticks == 25*5)
|
||||
{
|
||||
DoReinforcements(self.World, new int2(54,61),new int2(54,57), new int2(53,53), new string[] {"e1","e1","e1"});
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
new int2(53,53),
|
||||
new string[] {"e1","e1","e1"});
|
||||
}
|
||||
|
||||
if (ticks == 25*15)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
new int2(53,53),
|
||||
new string[] {"e1","e1","e1"});
|
||||
}
|
||||
|
||||
if (ticks == 25*30)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
new int2(53,53),
|
||||
new string[] {"jeep"});
|
||||
}
|
||||
|
||||
if (ticks == 25*60)
|
||||
{
|
||||
ReinforceFromSea(self.World,
|
||||
Map.Waypoints["lstStart"],
|
||||
Map.Waypoints["lstEnd"],
|
||||
new int2(53,53),
|
||||
new string[] {"jeep"});
|
||||
}
|
||||
|
||||
ticks++;
|
||||
}
|
||||
|
||||
void DoReinforcements(World world, int2 startPos, int2 endPos, int2 unload, string[] items)
|
||||
void SetGunboatPath()
|
||||
{
|
||||
Actors["Gunboat"].QueueActivity(new Move( Map.Waypoints["gunboatRight"],1));
|
||||
Actors["Gunboat"].QueueActivity(new Move( Map.Waypoints["gunboatLeft"],1));
|
||||
Actors["Gunboat"].QueueActivity(new CallFunc(() => SetGunboatPath()));
|
||||
}
|
||||
|
||||
void ReinforceFromSea(World world, int2 startPos, int2 endPos, int2 unload, string[] items)
|
||||
{
|
||||
world.AddFrameEndTask(w =>
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
da082330f1e6a33caa8b631dda4fab8d3f1c1839
|
||||
8a67362f59ab8f4ecb9f92abd817304ab0692a52
|
||||
@@ -8,7 +8,7 @@ Description: Describe your map here
|
||||
|
||||
Author: Westwood Studios
|
||||
|
||||
PlayerCount: 6
|
||||
PlayerCount: 9
|
||||
|
||||
Tileset: TEMPERAT
|
||||
|
||||
@@ -327,7 +327,7 @@ Actors:
|
||||
Health: 1
|
||||
Facing: 0
|
||||
ActorStance: Guard
|
||||
Actor87: boat
|
||||
Gunboat: boat
|
||||
Location: 53,59
|
||||
Owner: GoodGuy
|
||||
Health: 1
|
||||
@@ -436,16 +436,21 @@ Waypoints:
|
||||
spawn27: 51,47
|
||||
spawn26: 48,52
|
||||
spawn3: 58,53
|
||||
spawn2: 52,55
|
||||
spawn1: 38,55
|
||||
spawn0: 37,46
|
||||
gunboatRight: 61,59
|
||||
gunboatLeft: 35,59
|
||||
lstStart: 54,61
|
||||
lstEnd: 54,56
|
||||
|
||||
Smudges:
|
||||
|
||||
Rules:
|
||||
World:
|
||||
LocalPlayerFromMap:
|
||||
-CreateMPPlayers:
|
||||
-SpawnMPUnits:
|
||||
-ConquestVictoryConditions:
|
||||
-CrateSpawner:
|
||||
LocalPlayerFromMap:
|
||||
Gdi01Script:
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ LST:
|
||||
TerrainSpeeds: 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%, 100%
|
||||
InitialFacing:0
|
||||
ROT: 4
|
||||
Speed: 30
|
||||
Speed: 10
|
||||
Health:
|
||||
HP: 400
|
||||
Armor: light
|
||||
@@ -558,6 +558,7 @@ LST:
|
||||
RenderUnit:
|
||||
BelowUnits:
|
||||
RenderCargo:
|
||||
-Selectable:
|
||||
Cargo:
|
||||
Types: Infantry, Vehicle
|
||||
Passengers: 5
|
||||
|
||||
Reference in New Issue
Block a user