Skip to content

Commit

Permalink
Automate campaign 'reinforcements are available' sound.
Browse files Browse the repository at this point in the history
For missions that allow reinforcements as soon as the first
transporter exits the map.
  • Loading branch information
KJeff01 committed Apr 10, 2019
1 parent 7970931 commit 33764ec
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 156 deletions.
14 changes: 1 addition & 13 deletions data/base/script/campaign/cam1-2.js
Expand Up @@ -51,23 +51,12 @@ function enableWestFactory()
});
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_3S", {
area: "RTLZ",
message: "C1-2_LZ",
reinforcements: 60,
retlz: true
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_3S", {
area: "RTLZ",
message: "C1-2_LZ",
reinforcements: -1,
reinforcements: 60,
retlz: true
});

Expand Down Expand Up @@ -142,6 +131,5 @@ function eventStartLevel()
},
});

queue("enableReinforcements", 20000);
queue("enableWestFactory", 30000);
}
15 changes: 1 addition & 14 deletions data/base/script/campaign/cam1-5.js
Expand Up @@ -103,18 +103,6 @@ function sendNPTransport()
}
}

//Enable transport reinforcements
function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1A-C", {
area: "RTLZ",
message: "C1-5_LZ",
reinforcements: 180, //3 min
annihilate: true
});
}

function enableNPFactories()
{
camEnableFactory("NPCyborgFactory");
Expand Down Expand Up @@ -143,7 +131,7 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1A-C", {
area: "RTLZ",
message: "C1-5_LZ",
reinforcements: -1,
reinforcements: 180, //3 min
annihilate: true
});

Expand Down Expand Up @@ -274,6 +262,5 @@ function eventStartLevel()
},
});

queue("enableReinforcements", 30000);
queue("enableNPFactories", camChangeOnDiff(600000)); // 10 minutes
}
16 changes: 1 addition & 15 deletions data/base/script/campaign/cam1-7.js
Expand Up @@ -209,19 +209,6 @@ function extraVictory()
}
}

//Enable transport reinforcements
function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_DS", {
area: "RTLZ",
message: "C1-7_LZ",
reinforcements: 60, //1 min
callback: "extraVictory",
retlz: true,
});
}

function removeCanyonBlip()
{
hackRemoveMessage("C1-7_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER);
Expand Down Expand Up @@ -260,7 +247,7 @@ function eventStartLevel()
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_1_DS", {
area: "RTLZ",
message: "C1-7_LZ",
reinforcements: -1,
reinforcements: 60, //1 min
callback: "extraVictory",
retlz: true,
});
Expand Down Expand Up @@ -340,6 +327,5 @@ function eventStartLevel()
buildLancers();

hackAddMessage("C1-7_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true); //Canyon
queue("enableReinforcements", 15000);
queue("getArtifact", camChangeOnDiff(90000));
}
14 changes: 1 addition & 13 deletions data/base/script/campaign/cam1-d.js
Expand Up @@ -139,23 +139,12 @@ function setupPatrols()
cyborgGroupPatrol();
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1END", {
area: "RTLZ",
message: "C1D_LZ",
reinforcements: 120, //2 min
eliminateBases: true
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_1END", {
area: "RTLZ",
message: "C1D_LZ",
reinforcements: -1,
reinforcements: 120, //2 min
eliminateBases: true
});

Expand Down Expand Up @@ -282,6 +271,5 @@ function eventStartLevel()

hackAddMessage("C1D_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true);

queue("enableReinforcements", 12000);
queue("setupPatrols", 160000); // 2.5 min.
}
13 changes: 1 addition & 12 deletions data/base/script/campaign/cam2-2.js
Expand Up @@ -153,22 +153,12 @@ function eventAttacked(victim, attacker)
}
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2C", {
area: "RTLZ",
message: "C22_LZ",
reinforcements: 180 //3 min
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2C",{
area: "RTLZ",
message: "C22_LZ",
reinforcements: -1
reinforcements: 180 //3 min
});

var startpos = getObject("startPosition");
Expand Down Expand Up @@ -240,6 +230,5 @@ function eventStartLevel()

hackAddMessage("C22_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true);

queue("enableReinforcements", 20000);
queue("vtolAttack", 120000);
}
13 changes: 1 addition & 12 deletions data/base/script/campaign/cam2-5.js
Expand Up @@ -90,22 +90,12 @@ function enableFactories()
camEnableFactory("COCyborgFactoryR");
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2DS", {
area: "RTLZ",
message: "C25_LZ",
reinforcements: 180 //3 min
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2DS",{
area: "RTLZ",
message: "C25_LZ",
reinforcements: -1
reinforcements: 180 //3 min
});

var startpos = getObject("startPosition");
Expand Down Expand Up @@ -185,7 +175,6 @@ function eventStartLevel()

hackAddMessage("C25_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true);

queue("enableReinforcements", 15000);
queue("setupDamHovers", 3000);
queue("setupCyborgsEast", camChangeOnDiff(180000));//3 min
queue("enableFactories", camChangeOnDiff(480000));//8 min
Expand Down
14 changes: 1 addition & 13 deletions data/base/script/campaign/cam2-6.js
Expand Up @@ -91,23 +91,12 @@ function enableTimeBasedFactories()
camEnableFactory("COHeavyFactory-b2L");
}


function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_7S", {
area: "RTLZ",
message: "C26_LZ",
reinforcements: 180 //3 min
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_7S", {
area: "RTLZ",
message: "C26_LZ",
reinforcements: -1
reinforcements: 180 //3 min
});

var startpos = getObject("startPosition");
Expand Down Expand Up @@ -228,7 +217,6 @@ function eventStartLevel()

hackAddMessage("C26_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, true);

queue("enableReinforcements", 27000);
queue("northWestAttack", 120000);
queue("mainBaseAttackGroup", 180000);
queue("enableTimeBasedFactories", camChangeOnDiff(600000)); // 10 min
Expand Down
14 changes: 1 addition & 13 deletions data/base/script/campaign/cam2-7.js
Expand Up @@ -87,24 +87,13 @@ function enableFactoriesAndHovers()
});
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_8S", {
eliminateBases: true,
area: "RTLZ",
message: "C27_LZ",
reinforcements: 180 //3 min
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_8S", {
eliminateBases: true,
area: "RTLZ",
message: "C27_LZ",
reinforcements: -1,
reinforcements: 180 //3 min
});

var startpos = getObject("startPosition");
Expand Down Expand Up @@ -235,7 +224,6 @@ function eventStartLevel()
hackAddMessage("C27_OBJECTIVE3", PROX_MSG, CAM_HUMAN_PLAYER, true);
hackAddMessage("C27_OBJECTIVE4", PROX_MSG, CAM_HUMAN_PLAYER, true);

queue("enableReinforcements", 20000);
queue("baseThreeVtolAttack", 30000);
queue("baseFourVtolAttack", 60000);
queue("enableFactoriesAndHovers", camChangeOnDiff(90000));
Expand Down
13 changes: 1 addition & 12 deletions data/base/script/campaign/cam2-8.js
Expand Up @@ -84,21 +84,11 @@ function truckDefense()
camQueueBuilding(THE_COLLECTIVE, list[camRand(list.length)]);
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2END", {
area: "RTLZ",
reinforcements: 180, //3 min
annihilate: true
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_2END", {
area: "RTLZ",
reinforcements: -1,
reinforcements: 180, //3 min
annihilate: true
});

Expand Down Expand Up @@ -194,7 +184,6 @@ function eventStartLevel()
camManageTrucks(THE_COLLECTIVE);
truckDefense();

queue("enableReinforcements", 11000);
queue("setupLandGroups", 50000);
queue("vtolAttack", 60000);
queue("enableFactories", camChangeOnDiff(90000)); // 90 sec
Expand Down
15 changes: 1 addition & 14 deletions data/base/script/campaign/cam2-d.js
Expand Up @@ -71,9 +71,8 @@ function checkNASDACentral()
}
}

function enableReinforcements()
function eventStartLevel()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_6S", {
area: "RTLZ",
message: "C2D_LZ",
Expand All @@ -82,17 +81,6 @@ function enableReinforcements()
annihilate: true,
retlz: true
});
}

function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "SUB_2_6S", {
area: "RTLZ",
message: "C2D_LZ",
reinforcements: -1,
annihilate: true,
retlz: true
});

var startpos = getObject("startPosition");
var lz = getObject("landingZone"); //player lz
Expand Down Expand Up @@ -161,6 +149,5 @@ function eventStartLevel()
camEnableFactory("COHeavyFactory");
camEnableFactory("COSouthCyborgFactory");

queue("enableReinforcements", 22000);
queue("vtolAttack", 120000); // 2 min
}
14 changes: 1 addition & 13 deletions data/base/script/campaign/cam3-1.js
Expand Up @@ -235,17 +235,6 @@ function unitsInValley()
}
}

function enableReinforcements()
{
const REINFORCEMENT_TIME = 180; //3 minutes.
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_3B", {
area: "RTLZ",
reinforcements: REINFORCEMENT_TIME,
callback: "unitsInValley"
});
}

function eventStartLevel()
{
var startpos = getObject("startPosition");
Expand Down Expand Up @@ -275,7 +264,7 @@ function eventStartLevel()

camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "CAM_3B", {
area: "RTLZ",
reinforcements: -1,
reinforcements: 180, //3 minutes.
callback: "unitsInValley"
});

Expand Down Expand Up @@ -351,7 +340,6 @@ function eventStartLevel()
getCountdown();

queue("setupNextMission", 8000);
queue("enableReinforcements", 15000);
queue("hoverAttack", camChangeOnDiff(240000)); // 4 min
queue("vtolAttack", camChangeOnDiff(300000)); //5 min
queue("enableAllFactories", camChangeOnDiff(300000)); //5 min
Expand Down
13 changes: 1 addition & 12 deletions data/base/script/campaign/cam3-4.js
Expand Up @@ -89,16 +89,6 @@ function enableAllFactories()
});
}

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "GAMMA_OUT", {
area: "RTLZ",
reinforcements: 60, // 1 min
annihilate: true
});
}

function truckDefense()
{
var truckNum = countDroid(NEXUS, DROID_CONSTRUCT);
Expand Down Expand Up @@ -126,7 +116,7 @@ function eventStartLevel()

camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "GAMMA_OUT", {
area: "RTLZ",
reinforcements: -1,
reinforcements: 60, // 1 min
annihilate: true
});

Expand Down Expand Up @@ -338,6 +328,5 @@ function eventStartLevel()
hackAddMessage("MB3_4_MSG3", MISS_MSG, CAM_HUMAN_PLAYER, true);
hackAddMessage("CM34_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER);

queue("enableReinforcements", 16000);
queue("enableAllFactories", camChangeOnDiff(600000)); // 10 min.
}

0 comments on commit 33764ec

Please sign in to comment.