Permalink
Browse files

Update cam1-7 script.

Make the artifact group regroup and start moving sooner.
  • Loading branch information...
KJeff01 committed Sep 1, 2017
1 parent 3e81700 commit 449b08c8cf6780e8b5ec940eb5a79aa8574d0978
@@ -42,7 +42,7 @@ camAreaEvent("middleScavFactoryTrigger", function()
camAreaEvent("NPWayPointTrigger", function()
{
camManageGroup(artiGroup, CAM_ORDER_DEFEND,
{ pos: camMakePos("NPTransportPos") }
{ pos: camMakePos("NPTransportPos"), regroup: true }
);
});
@@ -72,7 +72,7 @@ camAreaEvent("artifactCheckNP", function()
camCallOnce("removeCanyonBlip");
camManageGroup(artiGroup, CAM_ORDER_DEFEND,
{ pos: camMakePos("NPWayPoint") }
{ pos: camMakePos("NPWayPoint"), regroup: true }
);
});
@@ -125,7 +125,7 @@ function eventGroupLoss(obj, group, newsize)
function getArtifact()
{
camManageGroup(artiGroup, CAM_ORDER_DEFEND,
{ pos: camMakePos("artifactLocation") }
{ pos: camMakePos("artifactLocation"), regroup: true }
);
}
@@ -278,5 +278,5 @@ function eventStartLevel()
hackAddMessage("C1-7_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true); //Canyon
queue("enableReinforcements", 15000);
queue("getArtifact", 120000);
queue("getArtifact", 15000);
}
@@ -1443,7 +1443,7 @@ function __camFindClusters(list, size)
{
var x = list[i].x, y = list[i].y;
var found = false;
for (var j = 0, l = ret.clusters.length; j < l; ++j)
for (var j = 0; j < ret.clusters.length; ++j)
{
if (camDist(ret.xav[j], ret.yav[j], x, y) < size)
{
@@ -1603,18 +1603,14 @@ function __camTacticsTickForGroup(group)
var groupX = ret.xav[ret.maxIdx];
var groupY = ret.yav[ret.maxIdx];
droids = ret.clusters[ret.maxIdx];
droids = droids.filter(function(obj) { return (obj.type === DROID); });
for (var i = 0, l = ret.clusters.length; i < l; ++i)
for (var i = 0; i < ret.clusters.length; ++i)
{
if (i != ret.maxIdx) // move other droids towards main cluster
{
for (var j = 0, c = ret.clusters[i].length; j < c; ++j)
for (var j = 0; j < ret.clusters[i].length; ++j)
{
var droid = ret.clusters[i][j];
if (camDef(droid) && (droid.type === DROID))
{
orderDroidLoc(droid, DORDER_MOVE, groupX, groupY);
}
orderDroidLoc(droid, DORDER_MOVE, groupX, groupY);
}
}
}
@@ -13,7 +13,7 @@
"position_12": { "label": "southAssembly", "pos": [ 5824, 6080 ] },
"position_13": { "label": "northAssembly", "pos": [ 4800, 576 ] },
"position_14": { "label": "artifactLocation","pos": [ 1344, 3904 ] },
"position_15": { "label": "NPWayPoint", "pos": [ 5760, 768 ] },
"position_15": { "label": "NPWayPoint", "pos": [ 5760, 968 ] },
"area_0": { "label": "RTLZ", "pos1": [ 0, 6528 ], "pos2": [ 1536, 7936 ] },
"area_1": { "label": "scavMiddle", "pos1": [ 3136, 4288 ], "pos2": [ 5056, 7616 ] },
@@ -31,7 +31,7 @@
"radius_0": { "label": "northScavFactoryTrigger", "subscriber": 0, "pos" : [ 7424, 640 ], "radius": 1280 },
"radius_1": { "label": "southScavFactoryTrigger", "subscriber": 0, "pos" : [ 6784, 6144 ], "radius": 1450 },
"radius_2": { "label": "middleScavFactoryTrigger", "subscriber": 0, "pos" : [ 4224, 4864 ], "radius": 1280 },
"radius_3": { "label": "artifactCheckNP", "subscriber": 1, "pos" : [ 1344, 3904 ], "radius": 120 },
"radius_3": { "label": "artifactCheckNP", "subscriber": 1, "pos" : [ 1344, 3904 ], "radius": 220 },
"radius_4": { "label": "NPWayPointTrigger", "subscriber": 1, "pos" : [ 5760, 768 ], "radius": 500 },
"radius_5": { "label": "NPTransportTrigger", "subscriber": 1, "pos" : [ 640, 1152 ], "radius": 500 }
"radius_5": { "label": "NPTransportTrigger", "subscriber": 1, "pos" : [ 1190, 1352 ], "radius": 200 }
}

0 comments on commit 449b08c

Please sign in to comment.