Permalink
Browse files

Fix Beta script cam2-a transport limit.

Now it should not let players bring in more than five transporters.
  • Loading branch information...
KJeff01 committed Aug 31, 2017
1 parent 4181dc0 commit 3e817003383df59856e78e50afdc9df546e407bc
Showing with 9 additions and 3 deletions.
  1. +9 −3 data/base/script/campaign/cam2-a.js
@@ -4,7 +4,6 @@ include("script/campaign/templates.js");
const TRANSPORT_LIMIT = 4;
var index; //Number of transport loads sent into the level
var lastLandedTime; //The gameTime the last players transporter landed at.
camAreaEvent("vtolRemoveZone", function(droid)
@@ -243,7 +242,6 @@ function eventTransporterLanded(transport)
}
index = index + 1;
lastLandedTime = gameTime;
}
}
@@ -256,12 +254,20 @@ function downTransporter()
function eventTransporterLaunch(transport)
{
if (index === TRANSPORT_LIMIT && (gameTime > (lastLandedTime + 60000)))
if (index >= TRANSPORT_LIMIT)
{
queue("downTransporter", 60000);
}
}
function eventGameLoaded()
{
if (index >= TRANSPORT_LIMIT)
{
setReinforcementTime(LZ_COMPROMISED_TIME);
}
}
function eventStartLevel()
{
const MISSION_TIME = camChangeOnDiff(3600); //60 minutes.

0 comments on commit 3e81700

Please sign in to comment.