Skip to content

Commit

Permalink
Some cam3-b script updates.
Browse files Browse the repository at this point in the history
- Bring back the mock battle between Gamma and Nexus.
- Do not activate Gamma base factories until Nexus takes over Gamma base.
- Reduce Gamma base rescue time by ten minutes.
  • Loading branch information
KJeff01 committed Jan 1, 2018
1 parent 991a4e8 commit e4b7113
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
48 changes: 36 additions & 12 deletions data/base/script/campaign/cam3-b.js
Expand Up @@ -2,6 +2,7 @@ include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
include("script/campaign/transitionTech.js");

var trapActive;
const GAMMA = 1; // Player 1 is Gamma team.
const NEXUS_RES = [
"R-Defense-WallUpgrade08", "R-Struc-Materials08", "R-Struc-Factory-Upgrade06",
Expand Down Expand Up @@ -31,15 +32,13 @@ camAreaEvent("vtolRemoveZone", function(droid)

camAreaEvent("trapTrigger", function(droid)
{
if (droid.player === CAM_HUMAN_PLAYER)
{
playSound("pcv455.ogg"); //Incoming message.
queue("trapSprung", 2000);
}
else
{
resetLabel("trapTrigger", CAM_HUMAN_PLAYER);
}
camCallOnce("setupCapture");
});

camAreaEvent("mockBattleTrigger", function(droid)
{
setAlliance(GAMMA, NEXUS, false); //brief mockup battle
camCallOnce("activateNexusGroups"); //help destroy Gamma base
});

//Setup Nexus VTOL hit and runners.
Expand Down Expand Up @@ -168,12 +167,23 @@ function activateNexusGroups()
//Take everything Gamma has and donate to Nexus.
function trapSprung()
{
if (!trapActive)
{
playSound("pcv455.ogg"); //Incoming message.
trapActive = true;
setAlliance(GAMMA, NEXUS, false);
queue("trapSprung", 2000); //call this a few seconds later
return;
}

setAlliance(GAMMA, NEXUS, true);
setAlliance(GAMMA, CAM_HUMAN_PLAYER, false);
camPlayVideos("MB3_B_MSG3");
hackRemoveMessage("CM3B_GAMMABASE", PROX_MSG, CAM_HUMAN_PLAYER);

setMissionTime(camChangeOnDiff(5400));

activateNexusGroups();
camCallOnce("activateNexusGroups");
enableAllFactories();

sendNXlandReinforcements();
Expand All @@ -182,9 +192,23 @@ function trapSprung()
playSound(SYNAPTICS_ACTIVATED);
}

function setupCapture()
{
trapSprung();
}

function eventAttacked(victim, attacker)
{
if (!trapActive && victim.player === GAMMA)
{
camCallOnce("setupCapture");
}
}

function eventStartLevel()
{
const MISSION_TIME = camChangeOnDiff(1800); //30 minutes. Rescue part.
trapActive = false;
const MISSION_TIME = camChangeOnDiff(1200); //20 minutes. Rescue part.
var startpos = getObject("startPosition");
var lz = getObject("landingZone");

Expand Down Expand Up @@ -259,12 +283,12 @@ function eventStartLevel()
}
});

setAlliance(GAMMA, CAM_HUMAN_PLAYER, true);
hackAddMessage("CM3B_GAMMABASE", PROX_MSG, CAM_HUMAN_PLAYER, true);
camPlayVideos(["MB3_B_MSG", "MB3_B_MSG2"]);

changePlayerColour(GAMMA, 0);

queue("transferPower", 3000);
queue("vtolAttack", camChangeOnDiff(300000)); //5 min
queue("enableAllFactories", camChangeOnDiff(301000)); //5 min
}
6 changes: 6 additions & 0 deletions data/base/wrf/cam3/cam3b/labels.json
Expand Up @@ -120,6 +120,12 @@
"pos1": [448, 4000],
"pos2": [7600, 4500]
},
"area_7": {
"label": "mockBattleTrigger",
"subscriber": 0,
"pos1": [448, 5400],
"pos2": [7600, 5500]
},

"object_0": {
"label": "NXCommandCenter",
Expand Down

0 comments on commit e4b7113

Please sign in to comment.