Add Map.GetNamedActor for map actor lookup

This commit is contained in:
ScottNZ
2013-12-20 19:05:24 +13:00
parent 3cf06119f7
commit 09b694095c
3 changed files with 15 additions and 2 deletions

View File

@@ -12,6 +12,10 @@ Map.GetRandomEdgeCell = function()
return Internal.GetRandomEdgeCell()
end
Map.GetNamedActor = function(actorName)
return Internal.GetNamedActor(actorName)
end
CPos.New = function(x, y)
return OpenRA.New("CPos", { { x, "Int32" }, { y, "Int32" } })
end

View File

@@ -72,7 +72,7 @@ end
SendCruisers = function()
for i, cruiser in ipairs(Cruisers) do
local ca = Actor.Create(cruiser, { Owner = england, Location = SouthReinforcementsPoint.Location })
Actor.Move(ca, _G["CruiserPoint" .. i].Location)
Actor.Move(ca, Map.GetNamedActor("CruiserPoint" .. i).Location)
end
end