Skip to content

Commit

Permalink
Update cam2-c mission script.
Browse files Browse the repository at this point in the history
- VTOL factories have a lower throttle.
- The sound telling the player civilians have been rescued throttled longer.
- Regular factories produce sensors and invert the order for one of them.
  • Loading branch information
KJeff01 committed Jan 7, 2018
1 parent e6eeebe commit 1ca02b0
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions data/base/script/campaign/cam2-c.js
Expand Up @@ -38,17 +38,31 @@ function videoTrigger()
}

//Enable heavy factories and make groups do what they need to.
camAreaEvent("groupTrigger", function()
camAreaEvent("groupTrigger", function(droid)
{
activateGroups();
});

//Play second video and add 30 minutes to timer when base3Trigger is crossed.
camAreaEvent("base3Trigger", function()
camAreaEvent("base3Trigger", function(droid)
{
camCallOnce("videoTrigger");
});

//Send idle droids in this base to attack when the player spots the base
function camEnemyBaseDetected_COAirBase()
{
var droids = enumArea("airBaseCleanup", THE_COLLECTIVE, false).filter(function(obj) {
return obj.type === DROID && obj.group === null;
});

camManageGroup(camMakeGroup(droids), CAM_ORDER_ATTACK, {
count: -1,
regroup: false,
repair: 67
});
}

//...Or if the player destroys the VTOL base.
function camEnemyBaseEliminated_COAirBase()
{
Expand Down Expand Up @@ -198,8 +212,8 @@ function civilianOrders()
}
}

//Play the "Civilian rescued" sound and throttle it for ten seconds.
if (rescued && ((lastSoundTime + 10000) < gameTime))
//Play the "Civilian rescued" sound and throttle it.
if (rescued && ((lastSoundTime + 30000) < gameTime))
{
lastSoundTime = gameTime;
playSound(rescueSound);
Expand Down Expand Up @@ -329,7 +343,7 @@ function eventStartLevel()
repair: 20,
count: -1,
},
templates: [comit, cohct, comhpv, cohbbt]
templates: [comit, cohct, comhpv, cohbbt, comsens]
},
"COHeavyFac-Leopard": {
assembly: "COHeavyFac-LeopardAssembly",
Expand All @@ -341,7 +355,7 @@ function eventStartLevel()
repair: 20,
count: -1,
},
templates: [comit, cohct, comhpv, cohbbt]
templates: [comsens, cohbbt, comhpv, cohct, comit]
},
"COCyborgFactoryL": {
assembly: "COCyborgFactoryLAssembly",
Expand Down Expand Up @@ -369,8 +383,8 @@ function eventStartLevel()
},
"COVtolFacLeft-Prop": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(70000),
groupSize: 4,
throttle: camChangeOnDiff(50000),
data: {
regroup: false,
count: -1,
Expand All @@ -379,8 +393,8 @@ function eventStartLevel()
},
"COVtolFacRight": {
order: CAM_ORDER_ATTACK,
groupSize: 5,
throttle: camChangeOnDiff(70000),
groupSize: 4,
throttle: camChangeOnDiff(50000),
data: {
regroup: false,
count: -1,
Expand Down

0 comments on commit 1ca02b0

Please sign in to comment.