Skip to content

Commit

Permalink
Bug fixes for cam2-7 and cam2-8 scripts.
Browse files Browse the repository at this point in the history
The mission cam2-8 now functions closer to how it did in 3.1.5.

- Cam2-8: Separate the western tanks into a hover and tracked groups. The hovers patrol while the tracked group defends the path north of the LZ. Truck builds defenses. Factories enabled quicker and new labels from alfred007.
- Cam2-7: Cyborg groups from factories set to four per group.
  • Loading branch information
KJeff01 committed Nov 11, 2017
1 parent 5f9aa02 commit 33ac871
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 47 deletions.
4 changes: 2 additions & 2 deletions data/base/script/campaign/cam2-7.js
Expand Up @@ -166,7 +166,7 @@ function eventStartLevel()
"COCyborgFac-b2": {
assembly: "base2CybAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 5,
groupSize: 4,
throttle: camChangeOnDiff(40000),
data: {
regroup: false,
Expand All @@ -178,7 +178,7 @@ function eventStartLevel()
"COCyborgFac-b3": {
assembly: "base3CybAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 5,
groupSize: 4,
throttle: camChangeOnDiff(40000),
data: {
regroup: false,
Expand Down
68 changes: 42 additions & 26 deletions data/base/script/campaign/cam2-8.js
Expand Up @@ -18,35 +18,37 @@ const COLLECTIVE_RES = [
"R-Wpn-Howitzer-Damage03",
];

function vtolPatrol()
function vtolAttack()
{
camManageGroup(camMakeGroup("COVtolGroup"), CAM_ORDER_PATROL, {
pos: [
camMakePos("vtolPos1"),
camMakePos("vtolPos2"),
camMakePos("vtolPos3"),
camMakePos("vtolPos4"),
camMakePos("vtolPos5"),
],
//fallback: camMakePos("cyborgAssembly-b1"),
//morale: 10,
interval: 20000,
camManageGroup(camMakeGroup("COVtolGroup"), CAM_ORDER_ATTACK, {
regroup: false,
});

}

function cyborgPatrol()
function setupLandGroups()
{
camManageGroup(camMakeGroup("NWTankGroup"), CAM_ORDER_PATROL, {
var hovers = enumArea("NWTankGroup", THE_COLLECTIVE, false).filter(function(obj) {
return obj.type === DROID && obj.propulsion === "hover01";
});
var tanks = enumArea("NWTankGroup", THE_COLLECTIVE, false).filter(function(obj) {
return obj.type === DROID && obj.propulsion !== "hover01";
});

camManageGroup(camMakeGroup(hovers), CAM_ORDER_PATROL, {
pos: [
camMakePos("NWTankPos1"),
camMakePos("NWTankPos2"),
camMakePos("NWTankPos3"),
],
//fallback: camMakePos("COCyborgFac-b1Assembly"),
//morale: 50,
interval: 45000,
interval: 25000,
regroup: false,
});

camManageGroup(camMakeGroup(tanks), CAM_ORDER_DEFEND, {
pos: [
camMakePos("NWTankPos3"),
],
radius: 15,
regroup: false,
});

Expand All @@ -71,6 +73,17 @@ function enableFactories()
camEnableFactory("COVtolFac-b3");
}

function truckDefense()
{
if (enumDroid(THE_COLLECTIVE, DROID_CONSTRUCT).length > 0)
{
queue("truckDefense", 120000);
}

var list = ["AASite-QuadBof", "WallTower04", "GuardTower-RotMg"];
camQueueBuilding(THE_COLLECTIVE, list[camRand(list.length)]);
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
Expand Down Expand Up @@ -132,7 +145,7 @@ function eventStartLevel()
assembly: "COCyborgFac-b1Assembly",
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(40000),
throttle: camChangeOnDiff(30000),
data: {
regroup: false,
repair: 40,
Expand All @@ -144,7 +157,7 @@ function eventStartLevel()
assembly: "COHeavyFacL-b2Assembly",
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(80000),
throttle: camChangeOnDiff(60000),
data: {
regroup: false,
repair: 20,
Expand All @@ -156,7 +169,7 @@ function eventStartLevel()
assembly: "COHeavyFacR-b2Assembly",
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(80000),
throttle: camChangeOnDiff(60000),
data: {
regroup: false,
repair: 20,
Expand All @@ -166,8 +179,8 @@ function eventStartLevel()
},
"COVtolFac-b3": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(90000),
groupSize: 4,
throttle: camChangeOnDiff(70000),
data: {
regroup: false,
count: -1,
Expand All @@ -176,8 +189,11 @@ function eventStartLevel()
},
});

camManageTrucks(THE_COLLECTIVE);
truckDefense();

queue("enableReinforcements", 15000);
queue("cyborgPatrol", 50000);
queue("vtolPatrol", 60000);
queue("enableFactories", camChangeOnDiff(480000)); // 8 min
queue("setupLandGroups", 50000);
queue("vtolAttack", 60000);
queue("enableFactories", camChangeOnDiff(90000)); // 90 sec
}
33 changes: 14 additions & 19 deletions data/base/wrf/cam2/sub2-8/labels.json
@@ -1,30 +1,25 @@
{
"position_0" : { "label": "startPosition", "pos": [ 6976, 7360 ] },
"position_0" : { "label": "startPosition", "pos": [ 6976, 7360 ] },
"position_1" : { "label": "transporterEntry", "pos": [ 5760, 7936 ] },
"position_2" : { "label": "transporterExit", "pos": [ 7936, 7040 ] },
"position_3" : { "label": "playerLZ", "pos": [ 6912, 7296 ] },
"position_3" : { "label": "playerLZ", "pos": [ 6912, 7296 ] },
"position_4" : { "label": "COCyborgFac-b1Assembly", "pos": [ 4160, 4928 ] },
"position_5" : { "label": "COHeavyFacL-b2Assembly", "pos": [ 3776, 2624 ] },
"position_6" : { "label": "COHeavyFacR-b2Assembly", "pos": [ 4160, 2624 ] },
"position_7" : { "label": "vtolPos1", "pos": [ 7104, 1344 ] },
"position_8" : { "label": "vtolPos2", "pos": [ 4032, 1216 ] },
"position_9" : { "label": "vtolPos3", "pos": [ 4160, 4928 ] },
"position_10": { "label": "vtolPos4", "pos": [ 6592, 7104 ] },
"position_11": { "label": "vtolPos5", "pos": [ 7232, 5312 ] },
"position_12": { "label": "NWTankPos1", "pos": [ 960, 2752 ] },
"position_13": { "label": "NWTankPos2", "pos": [ 2752, 4800 ] },
"position_14": { "label": "NWTankPos3", "pos": [ 7488, 4928 ] },
"position_15": { "label": "WCybPos1", "pos": [ 1216, 6080 ] },
"position_16": { "label": "WCybPos2", "pos": [ 4288, 7360 ] },
"position_17": { "label": "WCybPos3", "pos": [ 6592, 7104 ] },
"position_5" : { "label": "COHeavyFacL-b2Assembly", "pos": [ 3904, 2880 ] },
"position_6" : { "label": "COHeavyFacR-b2Assembly", "pos": [ 4416, 2880 ] },
"position_7": { "label": "NWTankPos1", "pos": [ 960, 2752 ] },
"position_8": { "label": "NWTankPos2", "pos": [ 2752, 4800 ] },
"position_9": { "label": "NWTankPos3", "pos": [ 7488, 4928 ] },
"position_10": { "label": "WCybPos1", "pos": [ 1216, 6080 ] },
"position_11": { "label": "WCybPos2", "pos": [ 4288, 7360 ] },
"position_12": { "label": "WCybPos3", "pos": [ 6592, 7104 ] },

"area_0": { "label": "landingZone", "pos1": [ 6800, 7120 ], "pos2": [ 7024, 7412 ] },
"area_1": { "label": "RTLZ", "pos1": [ 5100, 5000 ], "pos2": [ 7808, 7808 ] },
"area_0": { "label": "landingZone", "pos1": [ 6800, 7120 ], "pos2": [ 7024, 7412 ] },
"area_1": { "label": "RTLZ", "pos1": [ 5504, 5504 ], "pos2": [ 7808, 7808 ] },
"area_2": { "label": "COBase1Cleanup", "pos1": [ 3648, 3520 ], "pos2": [ 4800, 4928 ] },
"area_3": { "label": "COBase2Cleanup", "pos1": [ 3008, 832 ], "pos2": [ 5952, 2496 ] },
"area_4": { "label": "COBase3Cleanup", "pos1": [ 6208, 192 ], "pos2": [ 8000, 3136 ] },
"area_5": { "label": "COVtolGroup", "pos1": [ 7232, 704 ], "pos2": [ 7744, 1216 ] },
"area_6": { "label": "NWTankGroup", "pos1": [ 448, 1856 ], "pos2": [ 1600, 3008 ] },
"area_5": { "label": "COVtolGroup", "pos1": [ 7232, 704 ], "pos2": [ 7744, 1216 ] },
"area_6": { "label": "NWTankGroup", "pos1": [ 448, 1856 ], "pos2": [ 1600, 3008 ] },
"area_7": { "label": "WCyborgGroup", "pos1": [ 960, 6464 ], "pos2": [ 1472, 6976 ] },

"object_0": { "label": "COCyborgFac-b1", "id": 155, "player": 2, "type": 1 },
Expand Down

0 comments on commit 33ac871

Please sign in to comment.