Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
stop();
Frame 2
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndPlay(5);
}
Instance of Symbol 49 MovieClip in Frame 2
on (release) {
getURL ("http://www.happytree.com", "_blank");
}
Instance of Symbol 49 MovieClip in Frame 2
on (release) {
getURL ("http://www.bandias.com/?a=mod_other_promo&f=thug", "_blank");
}
Frame 3
gotoAndPlay (2);
Frame 5
logo.onPress = function () {
getURL ("http://www.xdgames.co.uk", "_blank");
};
Frame 6
stop();
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
screen.onEnterFrame = function () {
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
nextFrame();
}
}
};
screen.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
canSelect = false;
}
};
Instance of Symbol 713 MovieClip "screen" in Frame 6
on (rollOver) {
this.gotoAndStop("over");
}
on (rollOut) {
this.gotoAndStop("up");
}
Instance of Symbol 49 MovieClip in Frame 6
on (release) {
getURL ("http://www.happytree.com", "_blank");
}
Frame 7
stop();
playerSelect = 0;
once = 0;
hover_sound = new Sound();
hover_sound.attachSound("other");
blip_sound = new Sound();
blip_sound.attachSound("css");
moveOn = false;
moveOnTimer = 0;
canSelect = true;
one.onEnterFrame = function () {
if (((!this.hitTest(_xmouse, _ymouse, true)) && (!two.hitTest(_xmouse, _ymouse, true))) && (!three.hitTest(_xmouse, _ymouse, true))) {
once = 0;
}
if (moveOn) {
moveOnTimer++;
if (moveOnTimer == 15) {
nextFrame();
}
}
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
if (once == 0) {
once = 1;
hover_sound.start();
}
} else {
this.gotoAndStop("up");
}
};
two.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
if (once == 0) {
once = 1;
hover_sound.start();
}
} else {
this.gotoAndStop("up");
}
};
three.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse, true)) {
this.gotoAndStop("over");
if (once == 0) {
once = 1;
hover_sound.start();
}
} else {
this.gotoAndStop("up");
}
};
one.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerSelect = 0;
canSelect = false;
}
};
two.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerSelect = 1;
canSelect = false;
}
};
three.onRelease = function () {
if (canSelect) {
blip_sound.start();
moveOn = true;
_root.attachMovie("flash", "flash", _root.getNextHighestDepth());
playerSelect = 2;
canSelect = false;
}
};
Frame 8
stop();
Instance of Symbol 741 MovieClip in Frame 8
on (release) {
stopAllSounds();
_root.nextFrame();
}
Frame 10
function removedied() {
i = died.length - 1;
while (i >= 0) {
died[i].removeMovieClip();
died.splice(i, 1);
i--;
}
}
function removebullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removebulletType() {
i = bulletType.length - 1;
while (i >= 0) {
bulletType[i].removeMovieClip();
bulletType.splice(i, 1);
i--;
}
}
function removeegroundMarker() {
i = egroundMarker.length - 1;
while (i >= 0) {
egroundMarker[i].removeMovieClip();
egroundMarker.splice(i, 1);
i--;
}
}
function removeegravity() {
i = egravity.length - 1;
while (i >= 0) {
egravity[i].removeMovieClip();
egravity.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removedead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removetype() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removehypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removedamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removehit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeenemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeenemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeenemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removefalling() {
i = falling.length - 1;
while (i >= 0) {
falling[i].removeMovieClip();
falling.splice(i, 1);
i--;
}
}
function removedown() {
i = down.length - 1;
while (i >= 0) {
down[i].removeMovieClip();
down.splice(i, 1);
i--;
}
}
function removedownTimer() {
i = downTimer.length - 1;
while (i >= 0) {
downTimer[i].removeMovieClip();
downTimer.splice(i, 1);
i--;
}
}
function removedepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function removeEverything() {
stopAllSounds();
italy.removeMovieClip();
cont.removeMovieClip();
machineGunz.removeMovieClip();
flameGun.removeMovieClip();
shootygun.removeMovieClip();
player.removeMovieClip();
removedied();
removebullets();
removebulletType();
removeegroundMarker();
removeegravity();
removepotionType();
removepotions();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removeboxes();
removeedropping();
removeeonfloor();
removeejump();
removeejumpamount();
removeeyspeed();
removeshot();
removeportTimer();
removebeingSmacked();
removedead_body();
removetype();
removehypArray();
removeenemyHealth();
removedamagedTimer();
removehit();
removeenemyAttackingTimer();
removeenemyAttacking();
removeenemy();
removeblocks();
removemoveAbout();
removewhere();
removeonPlatform();
removepickAttack();
removeport();
removefalling();
removedown();
removedownTimer();
removedepths();
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if ((enemyHealth[i] > 0) && (!down[i])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function theStage() {
if ((player._x > 1140) && (sectionOneRelease)) {
enemyNumber = 3;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionOneRelease = false;
}
if ((player._x > 1700) && (sectionTwoRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionTwoRelease = false;
}
if ((player._x > 2300) && (sectionThreeRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionThreeRelease = false;
}
if ((player._x > 2700) && (sectionFourRelease)) {
enemyNumber = 1;
randomNumber++;
enemy_mc = _root.attachMovie("midlvlboss", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3100, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(50);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionFourRelease = false;
}
if ((player._x > 3300) && (sectionFiveRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionFiveRelease = false;
}
if ((player._x > 4000) && (sectionSixRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionSixRelease = false;
}
if ((player._x > 4800) && (sectionSevenRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:6000, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionSevenRelease = false;
}
if ((player._x > 5500) && (sectionEightRelease)) {
enemyNumber = 2;
randomNumber++;
enemy_mc = _root.attachMovie("midlvlboss", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3100, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(50);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:6200, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionEightRelease = false;
}
}
function depthActions() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
dist_y = player._y - enemy[i]._y;
hypArray[i] = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i]._yscale = 180;
if (_global.forceDrop) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
_global.forceDrop = false;
}
if (type[i] == 0) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 100) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 114) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 120});
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 3) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 75) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 75) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 1) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
bigGuy--;
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
enemyAttackingTimer[i] = 100;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 280) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 2) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 280) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
i--;
}
}
function playerMovement() {
if (shootygun.hitTest(player._x, player._y, true)) {
hover_sound.start();
shootygun.removeMovieClip();
weapon = "shotGun";
}
if (machineGunz.hitTest(player._x, player._y, true)) {
hover_sound.start();
machineGunz.removeMovieClip();
weapon = "default";
}
if (flameGun.hitTest(player._x, player._y, true)) {
hover_sound.start();
flameGun.removeMovieClip();
weapon = "flame";
}
if (((_global.alive && (notOverHeated)) && (!jump)) && (Key.isDown(65))) {
shooting = true;
}
if (!Key.isDown(65)) {
shooting = false;
}
i = bullets.length - 1;
while (i >= 0) {
if (bullets[i].hitTest(player.hit)) {
if (bulletType[i] == "bad") {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - 5;
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if (bulletType[i] == "flamethrower") {
bullets[i]._xscale = bullets[i]._xscale + 100;
bullets[i]._yscale = bullets[i]._yscale + 100;
if (bullets[i]._xscale > 1200) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if ((bullets[i]._x > (player._x + 640)) or (bullets[i]._x < (player._x - 640))) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
i--;
}
if (shooting) {
if ((shotTimer + reloadTime) < getTimer()) {
shotTimer = getTimer();
overHeat = overHeat + 3;
if (overHeat > 100) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:250};
myColor.setTransform(myColorTransform);
dropSpeed = 0.5;
overHeat = 100;
cam.weaponoverheat._alpha = 100;
notOverHeated = false;
}
if (weapon == "pistols") {
bulletPower = 1;
reloadTime = 250;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
}
}
if (weapon == "default") {
machinegun_sound.start();
bulletPower = 2;
reloadTime = 100;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
}
if (weapon == "flame") {
flame_sound.start();
bulletPower = 3;
reloadTime = 100;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 10;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 10;
};
}
}
if (weapon == "shotGun") {
shotgun_sound.start();
bulletPower = 3;
reloadTime = 700;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y - 2.5;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y - 2.5;
};
}
}
}
}
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (cam._x < 315) {
cam._x = 315;
}
if (cam._x > 6800) {
cam._x = 6800;
}
if (player._x < callcam._x) {
endX = _root.callcam._x;
cam._x = cam._x + (((endX - cam._x) - 220) / 15);
} else if (lock == 0) {
endX = _root.player._x;
cam._x = cam._x + ((endX - cam._x) / 15);
}
if (!moveOn) {
if (player.hitTest(cam.right)) {
player._x = player._x - playerSpeed;
}
}
if (player.hitTest(cam.left)) {
player._x = player._x + playerSpeed;
}
if (player._y > 550) {
player._y = 550;
}
if ((player._y < 330) && (!jump)) {
player._y = 330;
}
if (_global.alive) {
if (!stab) {
if (weapon == "pistols") {
if (jump) {
player.gotoAndStop("jumpPistol");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootPistol");
}
if (running) {
player.gotoAndStop("shootWalkPistol");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idlePistol");
}
if (running) {
player.gotoAndStop("runPistol");
}
}
}
}
}
if (weapon == "default") {
if (jump) {
player.gotoAndStop("jump");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shoot");
}
if (running) {
player.gotoAndStop("shootWalk");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
if (weapon == "shotGun") {
if (jump) {
player.gotoAndStop("jumpshotGun");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootshotGun");
}
if (running) {
player.gotoAndStop("shootWalkshotGun");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleshotGun");
}
if (running) {
player.gotoAndStop("runshotGun");
}
}
}
}
}
if (weapon == "flame") {
if (jump) {
player.gotoAndStop("jumpflame");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootflame");
}
if (running) {
player.gotoAndStop("shootWalkflame");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleflame");
}
if (running) {
player.gotoAndStop("runflame");
}
}
}
}
}
}
}
if (!_global.alive) {
player.gotoAndStop("dead");
}
if (Key.isDown(83)) {
if (canAttack) {
if (_global.alive) {
if (!shooting) {
if (!jump) {
stab = true;
}
}
}
}
}
if (stab) {
playerSpeed = 0;
stabTimer++;
player.gotoAndStop("melee");
if (stabTimer == 14) {
playerSpeed = 7;
stabTimer = 0;
stab = false;
}
}
if (Key.isDown(68)) {
if (_global.alive) {
if (!sliding) {
if (!stab) {
if (onfloor) {
shooting = false;
groundMarker = player._y;
jump = true;
onfloor = false;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
yspeed = yspeed - jumpamount;
}
}
}
}
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (_global.alive && (inControl)) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
player._y = player._y - playerSpeed;
running = true;
}
if (Key.isDown(40)) {
player._y = player._y + playerSpeed;
running = true;
}
}
if (jump) {
player._y = player._y + yspeed;
if (player._y > groundMarker) {
shadow_mc.removeMovieClip();
onfloor = true;
jump = false;
yspeed = 0;
player._y = groundMarker;
} else {
yspeed = yspeed + (gravity * 2);
}
}
}
function countFrames() {
_root.frameCount = 0;
}
stop();
blu_sound = new Sound();
blu_sound.attachSound("blu");
hover_sound = new Sound();
hover_sound.attachSound("other");
shotgun_sound = new Sound();
shotgun_sound.attachSound("shotBoom");
machinegun_sound = new Sound();
machinegun_sound.attachSound("mg");
hurt_sound = new Sound();
hurt_sound.attachSound("hurt");
flame_sound = new Sound();
flame_sound.attachSound("flamwthrowa");
cam._xscale = 100;
cam._yscale = 100;
if (playerSelect == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 1) {
_root.attachMovie("playerWhite", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 2) {
_root.attachMovie("playerBlack", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("shootygun", "shootygun", _root.getNextHighestDepth(), {_x:1500, _y:450});
_root.attachMovie("machineGunz", "machineGunz", _root.getNextHighestDepth(), {_x:2700, _y:350});
_root.attachMovie("flameGun", "flameGun", _root.getNextHighestDepth(), {_x:4000, _y:330});
player._yscale = 65;
player._xscale = 65;
lives = 2;
livesNumber = 2;
runTrans = false;
moveOn = false;
bigGuy = 2;
toGo = 0;
inControl = true;
canAttack = true;
addComplete = 0;
stageDone = false;
weapon = "default";
stab = false;
_global.quit = false;
_global.alive = true;
_global.forceDrop = false;
notOverHeated = true;
overHeat = 0;
dropSpeed = 1;
_global.playerHealth = 100;
gaySound = 0;
enemyPower = 0.5;
stabTimer = 0;
dashSpeed = 10;
enemyNumber = 1;
bulletPower = 1;
randomNumber = 0;
jump = false;
enemySpeed = 50;
jumpamount = 25;
gravity = 2;
pullingCam = false;
yspeed = 0;
onfloor = true;
pressHack = 0;
lock = 0;
sliding = false;
slidingTimer = 0;
special = false;
specialTimer = 0;
clicks = 0;
shooting = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 7;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
pick = Math.round(Math.random() * 3) + 0;
hitTimer = 0;
shotTimer = 0;
reloadTime = 100;
enemyShotTimer = 0;
sectionOneRelease = true;
sectionTwoRelease = true;
sectionThreeRelease = true;
sectionFourRelease = true;
sectionFiveRelease = true;
sectionSixRelease = true;
sectionSevenRelease = true;
sectionEightRelease = true;
sectionNineRelease = true;
sectionTenRelease = true;
sectionElevenRelease = true;
groundMarker = player._y;
var bullets = new Array();
var bulletType = new Array();
var egroundMarker = new Array();
var egravity = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var falling = new Array();
var down = new Array();
var downTimer = new Array();
var depths = new Array();
var died = new Array();
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:450});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:450});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:450});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:450});
}
depths.push(player, shootygun, enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
player.onEnterFrame = function () {
if (moveOn) {
stabTimer = 0;
stab = false;
energy = 0;
canAttack = false;
inControl = false;
player._xscale = 65;
playerSpeed = 18;
player._x = player._x + playerSpeed;
running = true;
}
if (runTrans) {
toGo++;
if (toGo == 100) {
removeEverything();
nextFrame();
}
}
if (player._x > (cam._x + 550)) {
if (addComplete == 0) {
cam.trans.gotoAndStop("black");
runTrans = true;
playerSpeed = 0;
addComplete = 1;
}
stageDone = true;
cam.goSign._alpha = 0;
}
if (_global.playerHealth < 0) {
lives--;
livesNumber--;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
splatter._x = cam._x;
splatter._y = cam._y;
shooting = false;
_global.alive = false;
_global.playerHealth = 0;
}
cam.bar._xscale = _global.playerHealth;
if (enemyNumber == 0) {
if (gaySound == 0) {
blu_sound.start(0, 3);
gaySound = 1;
}
if (!stageDone) {
cam.goSign._alpha = 100;
}
lock = 0;
pullingCam = true;
} else {
gaySound = 0;
cam.goSign._alpha = 0;
pullingCam = false;
}
if (pullingCam) {
callcam._x = player._x;
} else if (lock == 0) {
lock = 1;
callcam._x = cam._x + 155;
}
if (!notOverHeated) {
overHeat = overHeat - dropSpeed;
shooting = false;
}
if (!shooting) {
if (notOverHeated) {
overHeat = overHeat - dropSpeed;
dropSpeed = 1;
}
}
if (overHeat < 0) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
cam.weaponoverheat._alpha = 0;
myColor.setTransform(myColorTransform);
overHeat = 0;
notOverHeated = true;
}
if (_global.alive) {
italy._y = cam._y - 1000;
}
if ((!_global.alive) && (lives < 0)) {
italy._y = cam._y;
}
italy._x = cam._x;
if (_global.alive) {
cont._y = cam._y - 1000;
}
if ((!_global.alive) && (lives > -1)) {
cont._y = cam._y;
}
if ((bigGuy == 0) && (enemyNumber == 0)) {
moveOn = true;
}
cont._x = cam._x;
cam.heatBar._yscale = overHeat;
shadow_mc._x = player._x;
cam._y = _root.player._y - 150;
theStage();
cam.camControl();
playerMovement();
calculateHyp();
enemyMovement();
cont.swapDepths(_root.getNextHighestDepth());
italy.swapDepths(_root.getNextHighestDepth());
depthActions();
noOverLap();
if (livesNumber < 0) {
livesNumber = 0;
}
cam.livesNum.text = livesNumber;
if (_global.quit) {
stopAllSounds();
removeEverything();
_root.gotoAndStop("title");
}
};
frameRateCounter = setInterval(countFrames, 1000);
Frame 12
play();
Frame 13
function removedied() {
i = died.length - 1;
while (i >= 0) {
died[i].removeMovieClip();
died.splice(i, 1);
i--;
}
}
function removebullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removebulletType() {
i = bulletType.length - 1;
while (i >= 0) {
bulletType[i].removeMovieClip();
bulletType.splice(i, 1);
i--;
}
}
function removeegroundMarker() {
i = egroundMarker.length - 1;
while (i >= 0) {
egroundMarker[i].removeMovieClip();
egroundMarker.splice(i, 1);
i--;
}
}
function removeegravity() {
i = egravity.length - 1;
while (i >= 0) {
egravity[i].removeMovieClip();
egravity.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removedead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removetype() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removehypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removedamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removehit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeenemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeenemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeenemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removefalling() {
i = falling.length - 1;
while (i >= 0) {
falling[i].removeMovieClip();
falling.splice(i, 1);
i--;
}
}
function removedown() {
i = down.length - 1;
while (i >= 0) {
down[i].removeMovieClip();
down.splice(i, 1);
i--;
}
}
function removedownTimer() {
i = downTimer.length - 1;
while (i >= 0) {
downTimer[i].removeMovieClip();
downTimer.splice(i, 1);
i--;
}
}
function removedepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function removeEverything() {
stopAllSounds();
italy.removeMovieClip();
cont.removeMovieClip();
machineGunz.removeMovieClip();
flameGun.removeMovieClip();
shootygun.removeMovieClip();
player.removeMovieClip();
removedied();
removebullets();
removebulletType();
removeegroundMarker();
removeegravity();
removepotionType();
removepotions();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removeboxes();
removeedropping();
removeeonfloor();
removeejump();
removeejumpamount();
removeeyspeed();
removeshot();
removeportTimer();
removebeingSmacked();
removedead_body();
removetype();
removehypArray();
removeenemyHealth();
removedamagedTimer();
removehit();
removeenemyAttackingTimer();
removeenemyAttacking();
removeenemy();
removeblocks();
removemoveAbout();
removewhere();
removeonPlatform();
removepickAttack();
removeport();
removefalling();
removedown();
removedownTimer();
removedepths();
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if ((enemyHealth[i] > 0) && (!down[i])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function theStage() {
if ((player._x > 1140) && (sectionOneRelease)) {
enemyNumber = 3;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:1600, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionOneRelease = false;
}
if ((player._x > 1700) && (sectionTwoRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:300, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionTwoRelease = false;
}
if ((player._x > 2300) && (sectionThreeRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2580, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionThreeRelease = false;
}
if ((player._x > 2700) && (sectionFourRelease)) {
enemyNumber = 2;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3100, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(50);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3100, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(50);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionFourRelease = false;
}
if ((player._x > 3300) && (sectionFiveRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionFiveRelease = false;
}
if ((player._x > 4000) && (sectionSixRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5000, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:2800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionSixRelease = false;
}
if ((player._x > 4800) && (sectionSevenRelease)) {
enemyNumber = 4;
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:-800, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:5800, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:6000, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionSevenRelease = false;
}
if ((player._x > 5500) && (sectionEightRelease)) {
enemyNumber = 3;
randomNumber++;
enemy_mc = _root.attachMovie("midlvlboss", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(3);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:3100, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(50);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
pick = Math.round(Math.random() * 3) + 0;
randomNumber++;
enemy_mc = _root.attachMovie("withGun", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:6200, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(2);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
sectionEightRelease = false;
}
}
function depthActions() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
dist_y = player._y - enemy[i]._y;
hypArray[i] = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (_global.forceDrop) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
_global.forceDrop = false;
}
enemy[i]._yscale = 180;
if (type[i] == 0) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 100) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 114) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 120});
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 3) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 75) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 75) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 1) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
bigGuy--;
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 280) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 2) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 280) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
i--;
}
}
function playerMovement() {
if (shootygun.hitTest(player._x, player._y, true)) {
hover_sound.start();
shootygun.removeMovieClip();
weapon = "shotGun";
}
if (machineGunz.hitTest(player._x, player._y, true)) {
hover_sound.start();
machineGunz.removeMovieClip();
weapon = "default";
}
if (flameGun.hitTest(player._x, player._y, true)) {
hover_sound.start();
flameGun.removeMovieClip();
weapon = "flame";
}
if (((_global.alive && (notOverHeated)) && (!jump)) && (Key.isDown(65))) {
shooting = true;
}
if (!Key.isDown(65)) {
shooting = false;
}
i = bullets.length - 1;
while (i >= 0) {
if (bullets[i].hitTest(player.hit)) {
if (bulletType[i] == "bad") {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - 5;
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if (bulletType[i] == "flamethrower") {
bullets[i]._xscale = bullets[i]._xscale + 100;
bullets[i]._yscale = bullets[i]._yscale + 100;
if (bullets[i]._xscale > 1200) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if ((bullets[i]._x > (player._x + 640)) or (bullets[i]._x < (player._x - 640))) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
i--;
}
if (shooting) {
if ((shotTimer + reloadTime) < getTimer()) {
shotTimer = getTimer();
overHeat = overHeat + 3;
if (overHeat > 100) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:250};
myColor.setTransform(myColorTransform);
dropSpeed = 0.5;
overHeat = 100;
cam.weaponoverheat._alpha = 100;
notOverHeated = false;
}
if (weapon == "pistols") {
bulletPower = 1;
reloadTime = 250;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
}
}
if (weapon == "default") {
bulletPower = 2;
reloadTime = 100;
machinegun_sound.start();
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
}
if (weapon == "flame") {
bulletPower = 3;
reloadTime = 100;
flame_sound.start();
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 10;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 10;
};
}
}
if (weapon == "shotGun") {
bulletPower = 3;
reloadTime = 700;
shotgun_sound.start();
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y - 2.5;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y - 2.5;
};
}
}
}
}
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (cam._x < 315) {
cam._x = 315;
}
if (cam._x > 6800) {
cam._x = 6800;
}
if (player._x < callcam._x) {
endX = _root.callcam._x;
cam._x = cam._x + (((endX - cam._x) - 220) / 15);
} else if (lock == 0) {
endX = _root.player._x;
cam._x = cam._x + ((endX - cam._x) / 15);
}
if (!moveOn) {
if (player.hitTest(cam.right)) {
player._x = player._x - playerSpeed;
}
}
if (player.hitTest(cam.left)) {
player._x = player._x + playerSpeed;
}
if (player._y > 550) {
player._y = 550;
}
if ((player._y < 330) && (!jump)) {
player._y = 330;
}
if (_global.alive) {
if (!stab) {
if (weapon == "pistols") {
if (jump) {
player.gotoAndStop("jumpPistol");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootPistol");
}
if (running) {
player.gotoAndStop("shootWalkPistol");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idlePistol");
}
if (running) {
player.gotoAndStop("runPistol");
}
}
}
}
}
if (weapon == "default") {
if (jump) {
player.gotoAndStop("jump");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shoot");
}
if (running) {
player.gotoAndStop("shootWalk");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
if (weapon == "shotGun") {
if (jump) {
player.gotoAndStop("jumpshotGun");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootshotGun");
}
if (running) {
player.gotoAndStop("shootWalkshotGun");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleshotGun");
}
if (running) {
player.gotoAndStop("runshotGun");
}
}
}
}
}
if (weapon == "flame") {
if (jump) {
player.gotoAndStop("jumpflame");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootflame");
}
if (running) {
player.gotoAndStop("shootWalkflame");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleflame");
}
if (running) {
player.gotoAndStop("runflame");
}
}
}
}
}
}
}
if (!_global.alive) {
player.gotoAndStop("dead");
}
if (Key.isDown(83)) {
if (canAttack) {
if (_global.alive) {
if (!shooting) {
if (!jump) {
stab = true;
}
}
}
}
}
if (stab) {
playerSpeed = 0;
stabTimer++;
player.gotoAndStop("melee");
if (stabTimer == 14) {
playerSpeed = 7;
stabTimer = 0;
stab = false;
}
}
if (Key.isDown(68)) {
if (_global.alive) {
if (!sliding) {
if (!stab) {
if (onfloor) {
shooting = false;
groundMarker = player._y;
jump = true;
onfloor = false;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
yspeed = yspeed - jumpamount;
}
}
}
}
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (_global.alive && (inControl)) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
player._y = player._y - playerSpeed;
running = true;
}
if (Key.isDown(40)) {
player._y = player._y + playerSpeed;
running = true;
}
}
if (jump) {
player._y = player._y + yspeed;
if (player._y > groundMarker) {
shadow_mc.removeMovieClip();
onfloor = true;
jump = false;
yspeed = 0;
player._y = groundMarker;
} else {
yspeed = yspeed + (gravity * 2);
}
}
}
function countFrames() {
_root.frameCount = 0;
}
stop();
blu_sound = new Sound();
blu_sound.attachSound("blu");
hover_sound = new Sound();
hover_sound.attachSound("other");
flame_sound = new Sound();
flame_sound.attachSound("flamwthrowa");
shotgun_sound = new Sound();
shotgun_sound.attachSound("shotBoom");
machinegun_sound = new Sound();
machinegun_sound.attachSound("mg");
hurt_sound = new Sound();
hurt_sound.attachSound("hurt");
cam._xscale = 100;
cam._yscale = 100;
if (playerSelect == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 1) {
_root.attachMovie("playerWhite", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 2) {
_root.attachMovie("playerBlack", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("shootygun", "shootygun", _root.getNextHighestDepth(), {_x:500, _y:450});
_root.attachMovie("machineGunz", "machineGunz", _root.getNextHighestDepth(), {_x:2700, _y:500});
_root.attachMovie("flameGun", "flameGun", _root.getNextHighestDepth(), {_x:4000, _y:330});
player._yscale = 65;
player._xscale = 65;
_global.forceDrop = false;
runTrans = false;
moveOn = false;
bigGuy = 2;
toGo = 0;
inControl = true;
canAttack = true;
addComplete = 0;
stageDone = false;
stab = false;
_global.quit = false;
_global.alive = true;
notOverHeated = true;
overHeat = 0;
dropSpeed = 1;
_global.playerHealth = 100;
gaySound = 0;
enemyPower = 0.5;
stabTimer = 0;
dashSpeed = 10;
enemyNumber = 4;
randomNumber = 0;
jump = false;
enemySpeed = 50;
jumpamount = 25;
gravity = 2;
pullingCam = false;
yspeed = 0;
onfloor = true;
pressHack = 0;
lock = 0;
sliding = false;
slidingTimer = 0;
special = false;
specialTimer = 0;
clicks = 0;
shooting = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 7;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
pick = Math.round(Math.random() * 3) + 0;
hitTimer = 0;
shotTimer = 0;
reloadTime = 100;
enemyShotTimer = 0;
sectionOneRelease = true;
sectionTwoRelease = true;
sectionThreeRelease = true;
sectionFourRelease = true;
sectionFiveRelease = true;
sectionSixRelease = true;
sectionSevenRelease = true;
sectionEightRelease = true;
sectionNineRelease = true;
sectionTenRelease = true;
sectionElevenRelease = true;
groundMarker = player._y;
var bullets = new Array();
var bulletType = new Array();
var egroundMarker = new Array();
var egravity = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var falling = new Array();
var down = new Array();
var downTimer = new Array();
var depths = new Array();
var died = new Array();
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(player, shootygun, enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
randomNumber++;
if (pick == 0) {
enemy_mc = _root.attachMovie("enemy", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 1) {
enemy_mc = _root.attachMovie("enemy2", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 2) {
enemy_mc = _root.attachMovie("enemy3", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
if (pick == 3) {
enemy_mc = _root.attachMovie("enemy4", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
}
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(0);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
randomNumber++;
enemy_mc = _root.attachMovie("midlvlboss", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:Math.round(Math.random() * 150) + 310});
depths.push(enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(10);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
player.onEnterFrame = function () {
if (moveOn) {
stabTimer = 0;
stab = false;
energy = 0;
canAttack = false;
inControl = false;
player._xscale = 65;
playerSpeed = 18;
player._x = player._x + playerSpeed;
running = true;
}
if (runTrans) {
toGo++;
if (toGo == 100) {
removeEverything();
nextFrame();
}
}
if (player._x > (cam._x + 550)) {
if (addComplete == 0) {
cam.trans.gotoAndStop("black");
runTrans = true;
playerSpeed = 0;
addComplete = 1;
}
stageDone = true;
cam.goSign._alpha = 0;
}
if (_global.playerHealth < 0) {
lives--;
livesNumber--;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
splatter._x = cam._x;
splatter._y = cam._y;
shooting = false;
_global.alive = false;
_global.playerHealth = 0;
}
cam.bar._xscale = _global.playerHealth;
if (enemyNumber == 0) {
if (gaySound == 0) {
blu_sound.start(0, 3);
gaySound = 1;
}
if (!stageDone) {
cam.goSign._alpha = 100;
}
lock = 0;
pullingCam = true;
} else {
gaySound = 0;
cam.goSign._alpha = 0;
pullingCam = false;
}
if (pullingCam) {
callcam._x = player._x;
} else if (lock == 0) {
lock = 1;
callcam._x = cam._x + 155;
}
if (!notOverHeated) {
overHeat = overHeat - dropSpeed;
shooting = false;
}
if (!shooting) {
if (notOverHeated) {
overHeat = overHeat - dropSpeed;
dropSpeed = 1;
}
}
if (overHeat < 0) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
cam.weaponoverheat._alpha = 0;
myColor.setTransform(myColorTransform);
overHeat = 0;
notOverHeated = true;
}
if (_global.alive) {
italy._y = cam._y - 1000;
}
if ((!_global.alive) && (lives < 0)) {
italy._y = cam._y;
}
italy._x = cam._x;
if (_global.alive) {
cont._y = cam._y - 1000;
}
if ((!_global.alive) && (lives > -1)) {
cont._y = cam._y;
}
if ((bigGuy == 0) && (enemyNumber == 0)) {
moveOn = true;
}
cont._x = cam._x;
cam.heatBar._yscale = overHeat;
shadow_mc._x = player._x;
cam._y = _root.player._y - 150;
theStage();
cam.camControl();
playerMovement();
calculateHyp();
enemyMovement();
cont.swapDepths(_root.getNextHighestDepth());
italy.swapDepths(_root.getNextHighestDepth());
depthActions();
noOverLap();
if (livesNumber < 0) {
livesNumber = 0;
}
cam.livesNum.text = livesNumber;
if (_global.quit) {
stopAllSounds();
removeEverything();
_root.gotoAndStop("title");
}
};
frameRateCounter = setInterval(countFrames, 1000);
Frame 14
play();
Frame 15
function removedied() {
i = died.length - 1;
while (i >= 0) {
died[i].removeMovieClip();
died.splice(i, 1);
i--;
}
}
function removebullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
i--;
}
}
function removebulletType() {
i = bulletType.length - 1;
while (i >= 0) {
bulletType[i].removeMovieClip();
bulletType.splice(i, 1);
i--;
}
}
function removeegroundMarker() {
i = egroundMarker.length - 1;
while (i >= 0) {
egroundMarker[i].removeMovieClip();
egroundMarker.splice(i, 1);
i--;
}
}
function removeegravity() {
i = egravity.length - 1;
while (i >= 0) {
egravity[i].removeMovieClip();
egravity.splice(i, 1);
i--;
}
}
function removepotionType() {
i = potionType.length - 1;
while (i >= 0) {
potionType[i].removeMovieClip();
potionType.splice(i, 1);
i--;
}
}
function removepotions() {
i = potions.length - 1;
while (i >= 0) {
potions[i].removeMovieClip();
potions.splice(i, 1);
i--;
}
}
function removeboxHealth() {
i = boxHealth.length - 1;
while (i >= 0) {
boxHealth[i].removeMovieClip();
boxHealth.splice(i, 1);
i--;
}
}
function removeboxHit() {
i = boxHit.length - 1;
while (i >= 0) {
boxHit[i].removeMovieClip();
boxHit.splice(i, 1);
i--;
}
}
function removeboxHitTimer() {
i = boxHitTimer.length - 1;
while (i >= 0) {
boxHitTimer[i].removeMovieClip();
boxHitTimer.splice(i, 1);
i--;
}
}
function removeboxes() {
i = boxes.length - 1;
while (i >= 0) {
boxes[i].removeMovieClip();
boxes.splice(i, 1);
i--;
}
}
function removeedropping() {
i = edropping.length - 1;
while (i >= 0) {
edropping[i].removeMovieClip();
edropping.splice(i, 1);
i--;
}
}
function removeeonfloor() {
i = eonfloor.length - 1;
while (i >= 0) {
eonfloor[i].removeMovieClip();
eonfloor.splice(i, 1);
i--;
}
}
function removeejump() {
i = ejump.length - 1;
while (i >= 0) {
ejump[i].removeMovieClip();
ejump.splice(i, 1);
i--;
}
}
function removeejumpamount() {
i = ejumpamount.length - 1;
while (i >= 0) {
ejumpamount[i].removeMovieClip();
ejumpamount.splice(i, 1);
i--;
}
}
function removeeyspeed() {
i = eyspeed.length - 1;
while (i >= 0) {
eyspeed[i].removeMovieClip();
eyspeed.splice(i, 1);
i--;
}
}
function removeshot() {
i = shot.length - 1;
while (i >= 0) {
shot[i].removeMovieClip();
shot.splice(i, 1);
i--;
}
}
function removeportTimer() {
i = portTimer.length - 1;
while (i >= 0) {
portTimer[i].removeMovieClip();
portTimer.splice(i, 1);
i--;
}
}
function removebeingSmacked() {
i = beingSmacked.length - 1;
while (i >= 0) {
beingSmacked[i].removeMovieClip();
beingSmacked.splice(i, 1);
i--;
}
}
function removedead_body() {
i = dead_body.length - 1;
while (i >= 0) {
dead_body[i].removeMovieClip();
dead_body.splice(i, 1);
i--;
}
}
function removetype() {
i = type.length - 1;
while (i >= 0) {
type[i].removeMovieClip();
type.splice(i, 1);
i--;
}
}
function removehypArray() {
i = hypArray.length - 1;
while (i >= 0) {
hypArray[i].removeMovieClip();
hypArray.splice(i, 1);
i--;
}
}
function removeenemyHealth() {
i = enemyHealth.length - 1;
while (i >= 0) {
enemyHealth[i].removeMovieClip();
enemyHealth.splice(i, 1);
i--;
}
}
function removedamagedTimer() {
i = damagedTimer.length - 1;
while (i >= 0) {
damagedTimer[i].removeMovieClip();
damagedTimer.splice(i, 1);
i--;
}
}
function removehit() {
i = hit.length - 1;
while (i >= 0) {
hit[i].removeMovieClip();
hit.splice(i, 1);
i--;
}
}
function removeenemyAttackingTimer() {
i = enemyAttackingTimer.length - 1;
while (i >= 0) {
enemyAttackingTimer[i].removeMovieClip();
enemyAttackingTimer.splice(i, 1);
i--;
}
}
function removeenemyAttacking() {
i = enemyAttacking.length - 1;
while (i >= 0) {
enemyAttacking[i].removeMovieClip();
enemyAttacking.splice(i, 1);
i--;
}
}
function removeenemy() {
i = enemy.length - 1;
while (i >= 0) {
enemy[i].removeMovieClip();
enemy.splice(i, 1);
i--;
}
}
function removeblocks() {
i = blocks.length - 1;
while (i >= 0) {
blocks[i].removeMovieClip();
blocks.splice(i, 1);
i--;
}
}
function removemoveAbout() {
i = moveAbout.length - 1;
while (i >= 0) {
moveAbout[i].removeMovieClip();
moveAbout.splice(i, 1);
i--;
}
}
function removewhere() {
i = where.length - 1;
while (i >= 0) {
where[i].removeMovieClip();
where.splice(i, 1);
i--;
}
}
function removeonPlatform() {
i = onPlatform.length - 1;
while (i >= 0) {
onPlatform[i].removeMovieClip();
onPlatform.splice(i, 1);
i--;
}
}
function removepickAttack() {
i = pickAttack.length - 1;
while (i >= 0) {
pickAttack[i].removeMovieClip();
pickAttack.splice(i, 1);
i--;
}
}
function removeport() {
i = port.length - 1;
while (i >= 0) {
port[i].removeMovieClip();
port.splice(i, 1);
i--;
}
}
function removefalling() {
i = falling.length - 1;
while (i >= 0) {
falling[i].removeMovieClip();
falling.splice(i, 1);
i--;
}
}
function removedown() {
i = down.length - 1;
while (i >= 0) {
down[i].removeMovieClip();
down.splice(i, 1);
i--;
}
}
function removedownTimer() {
i = downTimer.length - 1;
while (i >= 0) {
downTimer[i].removeMovieClip();
downTimer.splice(i, 1);
i--;
}
}
function removedepths() {
i = depths.length - 1;
while (i >= 0) {
depths[i].removeMovieClip();
depths.splice(i, 1);
i--;
}
}
function removeEverything() {
stopAllSounds();
italy.removeMovieClip();
cont.removeMovieClip();
machineGunz.removeMovieClip();
flameGun.removeMovieClip();
shootygun.removeMovieClip();
player.removeMovieClip();
removedied();
removebullets();
removebulletType();
removeegroundMarker();
removeegravity();
removepotionType();
removepotions();
removeboxHealth();
removeboxHit();
removeboxHitTimer();
removeboxes();
removeedropping();
removeeonfloor();
removeejump();
removeejumpamount();
removeeyspeed();
removeshot();
removeportTimer();
removebeingSmacked();
removedead_body();
removetype();
removehypArray();
removeenemyHealth();
removedamagedTimer();
removehit();
removeenemyAttackingTimer();
removeenemyAttacking();
removeenemy();
removeblocks();
removemoveAbout();
removewhere();
removeonPlatform();
removepickAttack();
removeport();
removefalling();
removedown();
removedownTimer();
removedepths();
}
function noOverLap() {
i = enemy.length - 1;
while (i >= 0) {
j = enemy.length - 1;
while (j >= 0) {
if (!(enemy[i] === enemy[j])) {
if (enemy[i].hitTest(enemy[j])) {
if ((enemyHealth[i] > 0) && (!down[i])) {
endX = _root.enemy[j]._x;
enemy[i]._x = enemy[i]._x - ((endX - enemy[i]._x) / enemySpeed);
}
}
}
j--;
}
i--;
}
}
function theStage() {
}
function depthActions() {
i = depths.length - 1;
while (i >= 0) {
if (!jump) {
depths[i].idiot_depth = Math.floor((depths[i]._y * 480) + depths[i]._x);
depths[i].swapDepths(depths[i].idiot_depth);
}
i--;
}
}
function calculateHyp() {
i = enemy.length - 1;
while (i >= 0) {
dist_x = player._x - enemy[i]._x;
dist_y = player._y - enemy[i]._y;
hypArray[i] = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
i--;
}
}
function enemyMovement() {
i = enemy.length - 1;
while (i >= 0) {
if (_global.forceDrop) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
_global.forceDrop = false;
}
enemy[i]._yscale = 80;
if (enemy[i]._x < 150) {
enemy[i]._x = 150;
}
if (enemy[i]._x > 920) {
enemy[i]._x = 920;
}
if (runTrans) {
player._alpha = player._alpha - 1;
enemy[i]._alpha = enemy[i]._alpha - 1;
}
if (type[i] == 0) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 100) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 114) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 120});
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 3) + 0;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 75) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 75) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 25) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 75) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 1) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
bigGuy--;
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 80) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
enemyAttackingTimer[i] = 100;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 700) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 80) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -80) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 85, _y:enemy[i]._y - 48});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 80) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 80;
} else {
enemy[i]._xscale = -80;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
if (type[i] == 2) {
if (enemy[i]._y > 550) {
enemy[i]._y = 550;
}
if (enemy[i]._y < 330) {
enemy[i]._y = 330;
}
if (enemyHealth[i] < 1) {
if (died[i] == 0) {
hurt_sound.start();
enemyNumber--;
enemy[i].gotoAndStop("fall");
died[i] = 1;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
if (ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i]._y = enemy[i]._y + eyspeed[i];
if (enemy[i]._y > egroundMarker[i]) {
edropping[i] = false;
eonfloor[i] = true;
ejump[i] = false;
eyspeed[i] = 0;
enemy[i]._y = egroundMarker[i];
} else {
eyspeed[i] = eyspeed[i] + (egravity[i] * 2);
}
}
if (falling[i]) {
if (enemy[i]._y == egroundMarker[i]) {
down[i] = true;
}
}
if (down[i]) {
if (enemyHealth[i] < 1) {
enemy[i].gotoAndStop("dead");
}
if (enemyHealth[i] > 0) {
enemy[i].gotoAndStop("down");
downTimer[i]++;
if (downTimer[i] == 40) {
hit[i] = 0;
damagedTimer[i] = 0;
down[i] = false;
falling[i] = false;
downTimer[i] = 0;
}
}
}
if ((!down[i]) && (enemyHealth[i] > 0)) {
if (hypArray[i] < 700) {
if (enemyAttacking[i] == 1) {
if (enemy[i].marker.hitTest(player.hit)) {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - (enemyPower * 1.5);
}
}
enemyAttackingTimer[i]++;
} else {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
}
if (enemyAttackingTimer[i] > 100) {
if (!ejump[i]) {
if ((enemyShotTimer + 70) < getTimer()) {
enemyShotTimer = getTimer();
machinegun_sound.start();
if (enemy[i]._xscale == 180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x - 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
if (enemy[i]._xscale == -180) {
randomNumber++;
enemyBullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x + 45, _y:(enemy[i]._y + Math.round(Math.random() * 20)) - 40});
bullets.push(enemyBullet_mc);
bulletType.push("bad");
enemyBullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
}
enemy[i].gotoAndStop("attack");
enemyAttacking[i] = 1;
if (enemyAttackingTimer[i] == 140) {
enemyAttacking[i] = 0;
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
pickAttack[i] = Math.round(Math.random() * 3) + 0;
}
}
}
if (enemyAttacking[i] == 0) {
if (player.hitTest(enemy[i].enemyHitMarker) && (stabTimer == 5)) {
enemyHealth[i] = enemyHealth[i] - 2;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:enemy[i]._x, _y:enemy[i]._y - 70});
hit[i] = 1;
}
j = bullets.length - 1;
while (j >= 0) {
if (bulletType[j] == "default") {
if (bullets[j].hitTest(enemy[i])) {
bullets[j]._alpha = 0;
} else {
bullets[j]._alpha = 100;
}
}
if (bullets[j].hitTest(enemy[i].enemyHitMarker)) {
enemyHealth[i] = enemyHealth[i] - bulletPower;
randomNumber++;
_root.attachMovie("blood", "blood" + randomNumber, _root.getNextHighestDepth(), {_x:bullets[j]._x, _y:bullets[j]._y});
if (beingSmacked[i] > 2) {
if (!ejump[i]) {
beingSmacked[i] = 0;
egroundMarker[i] = enemy[i]._y;
falling[i] = true;
ejump[i] = true;
eonfloor[i] = false;
eyspeed[i] = 0;
eyspeed[i] = eyspeed[i] - ejumpamount[i];
}
}
beingSmacked[i]++;
hit[i] = 1;
bullets[j].removeMovieClip();
bullets.splice(j, 1);
bulletType.splice(j, 1);
}
j--;
}
if (hit[i] == 1) {
if (!ejump[i]) {
if (enemy[i]._xscale == 180) {
enemy[i]._x = enemy[i]._x + 3;
} else {
enemy[i]._x = enemy[i]._x - 3;
}
enemy[i].gotoAndStop("hit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 8) {
hit[i] = 0;
damagedTimer[i] = 0;
}
}
if (ejump[i]) {
enemy[i].gotoAndStop("ahit");
enemyAttackingTimer[i] = Math.round(Math.random() * 100) + 0;
enemyAttacking[i] = 0;
damagedTimer[i]++;
if (damagedTimer[i] > 4) {
enemy[i].gotoAndStop("fall");
hit[i] = 0;
damagedTimer[i] = 0;
}
}
}
if (hit[i] == 0) {
if (player._x < enemy[i]._x) {
enemy[i]._xscale = 180;
} else {
enemy[i]._xscale = -180;
}
portTimer[i]++;
if (portTimer[i] > 32) {
where[i] = Math.round(Math.random() * 1) + 0;
moveAbout[i] = Math.round(Math.random() * 1) + 2;
portTimer[i] = 0;
}
if ((where[i] == 0) or (where[i] == 1)) {
if ((!ejump[i]) && (!edropping[i])) {
enemy[i].gotoAndStop("run");
}
if (moveAbout[i] == 0) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 1) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 175) / enemySpeed);
enemy[i]._y = enemy[i]._y + ((endY - enemy[i]._y) / enemySpeed);
}
}
if (moveAbout[i] == 2) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) - 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) - 45) / enemySpeed);
}
}
if (moveAbout[i] == 3) {
if ((!falling[i]) && (!jump)) {
endX = _root.player._x;
endY = _root.player._y;
enemy[i]._x = enemy[i]._x + (((endX - enemy[i]._x) + 200) / enemySpeed);
enemy[i]._y = enemy[i]._y + (((endY - enemy[i]._y) + 45) / enemySpeed);
}
}
} else {
if (!ejump[i]) {
enemy[i].gotoAndStop("idle");
}
if (ejump[i]) {
enemy[i].gotoAndStop("fall");
}
}
}
}
}
}
i--;
}
}
function playerMovement() {
if (shootygun.hitTest(player._x, player._y, true)) {
hover_sound.start();
shootygun.removeMovieClip();
weapon = "shotGun";
}
if (machineGunz.hitTest(player._x, player._y, true)) {
hover_sound.start();
machineGunz.removeMovieClip();
weapon = "default";
}
if (flameGun.hitTest(player._x, player._y, true)) {
hover_sound.start();
flameGun.removeMovieClip();
weapon = "flame";
}
if (((_global.alive && (notOverHeated)) && (!jump)) && (Key.isDown(65))) {
shooting = true;
}
if (!Key.isDown(65)) {
shooting = false;
}
i = bullets.length - 1;
while (i >= 0) {
if (bullets[i].hitTest(player.hit)) {
if (bulletType[i] == "bad") {
hitPlayer = 1;
_global.playerHealth = _global.playerHealth - 5;
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if (bulletType[i] == "flamethrower") {
bullets[i]._xscale = bullets[i]._xscale + 100;
bullets[i]._yscale = bullets[i]._yscale + 100;
if (bullets[i]._xscale > 1200) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
}
if ((bullets[i]._x > (player._x + 640)) or (bullets[i]._x < (player._x - 640))) {
bullets[i].removeMovieClip();
bullets.splice(i, 1);
bulletType.splice(i, 1);
}
i--;
}
if (shooting) {
if ((shotTimer + reloadTime) < getTimer()) {
shotTimer = getTimer();
overHeat = overHeat + 3;
if (overHeat > 100) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:250};
myColor.setTransform(myColorTransform);
dropSpeed = 0.5;
overHeat = 100;
cam.weaponoverheat._alpha = 100;
notOverHeated = false;
}
if (weapon == "pistols") {
bulletPower = 1;
reloadTime = 250;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 18;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 15, _y:player._y - 38});
bullets.push(bullet_mc);
bulletType.push("dualPistols");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 25, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("dualPistols");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 18;
};
}
}
if (weapon == "default") {
machinegun_sound.start();
bulletPower = 2;
reloadTime = 100;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 40;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 65, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("machineGun");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 40;
};
}
}
if (weapon == "flame") {
flame_sound.start();
bulletPower = 3;
reloadTime = 100;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 10;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("flameBullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("flamethrower");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 10;
};
}
}
if (weapon == "shotGun") {
shotgun_sound.start();
bulletPower = 3;
reloadTime = 700;
if (player._xscale == 65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x + 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x + 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x + 30;
this._y = this._y - 2.5;
};
}
if (player._xscale == -65) {
randomNumber++;
bullet_mc = _root.attachMovie("bullet", "bullet" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet_mc);
bulletType.push("shotty");
bullet_mc.onEnterFrame = function () {
this._x = this._x - 30;
};
randomNumber++;
bullet2_mc = _root.attachMovie("bullet", "bullet2" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet2_mc);
bulletType.push("shotty");
bullet2_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y + 2.5;
};
randomNumber++;
bullet3_mc = _root.attachMovie("bullet", "bullet3" + randomNumber, _root.getNextHighestDepth(), {_x:player._x - 45, _y:player._y - 42});
bullets.push(bullet3_mc);
bulletType.push("shotty");
bullet3_mc.onEnterFrame = function () {
this._x = this._x - 30;
this._y = this._y - 2.5;
};
}
}
}
}
if (hitPlayer == 0) {
var _local4 = player.transform.colorTransform;
player.transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
if (hitPlayer == 1) {
var _local4 = player.transform.colorTransform;
_local4.rgb = 4294967295;
player.transform.colorTransform = _local4;
hitTimer++;
if (hitTimer == 1) {
hitPlayer = 0;
hitTimer = 0;
}
}
if (cam._x < 315) {
cam._x = 315;
}
if (cam._x > 800) {
cam._x = 800;
}
if (player._x < callcam._x) {
endX = _root.callcam._x;
cam._x = cam._x + (((endX - cam._x) - 220) / 15);
} else if (lock == 0) {
endX = _root.player._x;
cam._x = cam._x + ((endX - cam._x) / 15);
}
if (!moveOn) {
if (player.hitTest(cam.right)) {
player._x = player._x - playerSpeed;
}
}
if (player.hitTest(cam.left)) {
player._x = player._x + playerSpeed;
}
if (player._x < 115) {
player._x = 115;
}
if (player._x > 990) {
player._x = 990;
}
if (player._y > 550) {
player._y = 550;
}
if ((player._y < 330) && (!jump)) {
player._y = 330;
}
if (_global.alive) {
if (!stab) {
if (weapon == "pistols") {
if (jump) {
player.gotoAndStop("jumpPistol");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootPistol");
}
if (running) {
player.gotoAndStop("shootWalkPistol");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idlePistol");
}
if (running) {
player.gotoAndStop("runPistol");
}
}
}
}
}
if (weapon == "default") {
if (jump) {
player.gotoAndStop("jump");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shoot");
}
if (running) {
player.gotoAndStop("shootWalk");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idle");
}
if (running) {
player.gotoAndStop("run");
}
}
}
}
}
if (weapon == "shotGun") {
if (jump) {
player.gotoAndStop("jumpshotGun");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootshotGun");
}
if (running) {
player.gotoAndStop("shootWalkshotGun");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleshotGun");
}
if (running) {
player.gotoAndStop("runshotGun");
}
}
}
}
}
if (weapon == "flame") {
if (jump) {
player.gotoAndStop("jumpflame");
}
if (shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("shootflame");
}
if (running) {
player.gotoAndStop("shootWalkflame");
}
}
}
}
if (!shooting) {
if (!jump) {
if (!special) {
if (!running) {
player.gotoAndStop("idleflame");
}
if (running) {
player.gotoAndStop("runflame");
}
}
}
}
}
}
}
if (!_global.alive) {
player.gotoAndStop("dead");
}
if (Key.isDown(83)) {
if (canAttack) {
if (_global.alive) {
if (!shooting) {
if (!jump) {
stab = true;
}
}
}
}
}
if (stab) {
playerSpeed = 0;
stabTimer++;
player.gotoAndStop("melee");
if (stabTimer == 14) {
playerSpeed = 7;
stabTimer = 0;
stab = false;
}
}
if (Key.isDown(68)) {
if (_global.alive) {
if (!sliding) {
if (!stab) {
if (onfloor) {
shooting = false;
groundMarker = player._y;
jump = true;
onfloor = false;
_root.attachMovie("shadow_mc", "shadow_mc", _root.getNextHighestDepth(), {_y:player._y, _x:player._x});
yspeed = yspeed - jumpamount;
}
}
}
}
}
if (!Key.isDown(38)) {
running = false;
}
if (!Key.isDown(40)) {
running = false;
}
if (!Key.isDown(39)) {
running = false;
}
if (!Key.isDown(37)) {
running = false;
}
if (_global.alive && (inControl)) {
if (Key.isDown(39)) {
player._xscale = 65;
player._x = player._x + playerSpeed;
running = true;
}
if (Key.isDown(37)) {
player._xscale = -65;
player._x = player._x - playerSpeed;
running = true;
}
if (Key.isDown(38)) {
player._y = player._y - playerSpeed;
running = true;
}
if (Key.isDown(40)) {
player._y = player._y + playerSpeed;
running = true;
}
}
if (jump) {
player._y = player._y + yspeed;
if (player._y > groundMarker) {
shadow_mc.removeMovieClip();
onfloor = true;
jump = false;
yspeed = 0;
player._y = groundMarker;
} else {
yspeed = yspeed + (gravity * 2);
}
}
}
function countFrames() {
_root.frameCount = 0;
}
stop();
blu_sound = new Sound();
blu_sound.attachSound("blu");
hover_sound = new Sound();
hover_sound.attachSound("other");
shotgun_sound = new Sound();
shotgun_sound.attachSound("shotBoom");
machinegun_sound = new Sound();
machinegun_sound.attachSound("mg");
hurt_sound = new Sound();
hurt_sound.attachSound("hurt");
flame_sound = new Sound();
flame_sound.attachSound("flamwthrowa");
cam._xscale = 100;
cam._yscale = 100;
if (playerSelect == 0) {
_root.attachMovie("player", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 1) {
_root.attachMovie("playerWhite", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
if (playerSelect == 2) {
_root.attachMovie("playerBlack", "player", _root.getNextHighestDepth(), {_x:150, _y:450});
}
_root.attachMovie("shootygun", "shootygun", _root.getNextHighestDepth(), {_x:1500, _y:450});
_root.attachMovie("machineGunz", "machineGunz", _root.getNextHighestDepth(), {_x:2700, _y:350});
_root.attachMovie("flameGun", "flameGun", _root.getNextHighestDepth(), {_x:4000, _y:330});
player._yscale = 65;
player._xscale = 65;
runTrans = false;
moveOn = false;
bigGuy = 1;
toGo = 0;
inControl = true;
canAttack = true;
addComplete = 0;
stageDone = false;
stab = false;
_global.quit = false;
_global.alive = true;
notOverHeated = true;
overHeat = 0;
dropSpeed = 1;
gaySound = 0;
enemyPower = 0.5;
stabTimer = 0;
dashSpeed = 10;
enemyNumber = 1;
randomNumber = 0;
jump = false;
enemySpeed = 30;
jumpamount = 25;
gravity = 2;
pullingCam = true;
yspeed = 0;
onfloor = true;
pressHack = 0;
lock = 0;
_global.forceDrop = false;
sliding = false;
slidingTimer = 0;
special = false;
specialTimer = 0;
clicks = 0;
shooting = false;
hit2 = false;
hit3 = false;
running = false;
attacking = false;
playerSpeed = 7;
is_attacking = 0;
smack = 0;
hitPlayer = 0;
pick = Math.round(Math.random() * 3) + 0;
hitTimer = 0;
shotTimer = 0;
reloadTime = 100;
enemyShotTimer = 0;
groundMarker = player._y;
var bullets = new Array();
var bulletType = new Array();
var egroundMarker = new Array();
var egravity = new Array();
var potionType = new Array();
var potions = new Array();
var boxHealth = new Array();
var boxHit = new Array();
var boxHitTimer = new Array();
var boxes = new Array();
var edropping = new Array();
var eonfloor = new Array();
var ejump = new Array();
var ejumpamount = new Array();
var eyspeed = new Array();
var shot = new Array();
var portTimer = new Array();
var beingSmacked = new Array();
var dead_body = new Array();
var type = new Array();
var hypArray = new Array();
var enemyHealth = new Array();
var damagedTimer = new Array();
var hit = new Array();
var enemyAttackingTimer = new Array();
var enemyAttacking = new Array();
var enemy = new Array();
var blocks = new Array();
var moveAbout = new Array();
var where = new Array();
var onPlatform = new Array();
var pickAttack = new Array();
var port = new Array();
var falling = new Array();
var down = new Array();
var downTimer = new Array();
var depths = new Array();
var died = new Array();
randomNumber++;
enemy_mc = _root.attachMovie("cop", "enemy" + randomNumber, _root.getNextHighestDepth(), {_x:700, _y:450});
depths.push(player, shootygun, enemy_mc);
enemy.push(enemy_mc);
egroundMarker.push(enemy_mc._y);
died.push(0);
falling.push(false);
egravity.push(2);
down.push(false);
downTimer.push(0);
edropping.push(false);
eonfloor.push(true);
ejump.push(false);
ejumpamount.push(20);
eyspeed.push(0);
portTimer.push(0);
port.push(0);
pickAttack.push(Math.round(Math.random() * 2) + 0);
type.push(1);
enemyAttacking.push(false);
enemyAttackingTimer.push(Math.round(Math.random() * 100) + 0);
enemyHealth.push(110);
damagedTimer.push(0);
hit.push(0);
hypArray.push(0);
moveAbout.push(0);
where.push(0);
onPlatform.push(false);
beingSmacked.push(0);
player.onEnterFrame = function () {
if (moveOn) {
stabTimer = 0;
stab = false;
energy = 0;
canAttack = false;
inControl = false;
player._xscale = 65;
playerSpeed = 18;
player._x = player._x + playerSpeed;
running = true;
}
if (bigGuy == 0) {
removeEverything();
nextFrame();
}
if (runTrans) {
toGo++;
}
if (enemyNumber == 0) {
if (addComplete == 0) {
cam.trans.gotoAndStop("black");
runTrans = true;
canAttack = false;
inControl = false;
playerSpeed = 0;
addComplete = 1;
}
stageDone = true;
cam.goSign._alpha = 0;
}
if (_global.playerHealth < 0) {
lives--;
livesNumber--;
_root.attachMovie("splatter", "splatter", _root.getNextHighestDepth());
splatter._x = cam._x;
splatter._y = cam._y;
shooting = false;
_global.alive = false;
_global.playerHealth = 0;
}
cam.bar._xscale = _global.playerHealth;
if (!notOverHeated) {
overHeat = overHeat - dropSpeed;
shooting = false;
}
if (!shooting) {
if (notOverHeated) {
overHeat = overHeat - dropSpeed;
dropSpeed = 1;
}
}
if (overHeat < 0) {
myColor = new Color(cam.heatBar);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
cam.weaponoverheat._alpha = 0;
myColor.setTransform(myColorTransform);
overHeat = 0;
notOverHeated = true;
}
if (_global.alive) {
italy._y = cam._y - 1000;
}
if ((!_global.alive) && (lives < 0)) {
italy._y = cam._y;
}
italy._x = cam._x;
if (_global.alive) {
cont._y = cam._y - 1000;
}
if ((!_global.alive) && (lives > -1)) {
cont._y = cam._y;
}
if ((bigGuy == 0) && (enemyNumber == 0)) {
moveOn = true;
}
cont._x = cam._x;
cam.heatBar._yscale = overHeat;
shadow_mc._x = player._x;
cam._y = _root.player._y - 150;
theStage();
cam.camControl();
playerMovement();
calculateHyp();
enemyMovement();
cont.swapDepths(_root.getNextHighestDepth());
italy.swapDepths(_root.getNextHighestDepth());
depthActions();
noOverLap();
if (livesNumber < 0) {
livesNumber = 0;
}
cam.livesNum.text = livesNumber;
if (_global.quit) {
stopAllSounds();
removeEverything();
_root.gotoAndStop("title");
}
};
frameRateCounter = setInterval(countFrames, 1000);
Frame 17
stopAllSounds();
_root.gotoAndStop("title");
Symbol 2 Button
on (release) {
getURL ("http://www.bandias.com/?a=mod_other_promo&f=thug", "_blank");
}
Symbol 10 Button
on (release) {
_root.nextFrame();
}
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip Frame 50
on (release) {
_root.nextFrame();
}
Symbol 14 MovieClip Frame 70
stop();
Symbol 183 MovieClip Frame 11
stop();
Symbol 184 MovieClip [player] Frame 1
stop();
Symbol 184 MovieClip [player] Frame 2
stop();
Symbol 184 MovieClip [player] Frame 3
stop();
Symbol 184 MovieClip [player] Frame 4
stop();
Symbol 184 MovieClip [player] Frame 5
stop();
Symbol 184 MovieClip [player] Frame 6
stop();
Symbol 184 MovieClip [player] Frame 7
stop();
Symbol 184 MovieClip [player] Frame 8
stop();
Symbol 184 MovieClip [player] Frame 9
stop();
Symbol 184 MovieClip [player] Frame 10
stop();
Symbol 184 MovieClip [player] Frame 11
stop();
Symbol 184 MovieClip [player] Frame 12
stop();
Symbol 184 MovieClip [player] Frame 13
stop();
Symbol 184 MovieClip [player] Frame 14
stop();
Symbol 184 MovieClip [player] Frame 15
stop();
Symbol 184 MovieClip [player] Frame 16
stop();
Symbol 184 MovieClip [player] Frame 17
stop();
Symbol 184 MovieClip [player] Frame 18
stop();
Symbol 184 MovieClip [player] Frame 19
stop();
Symbol 184 MovieClip [player] Frame 20
stop();
Symbol 184 MovieClip [player] Frame 21
stop();
Symbol 184 MovieClip [player] Frame 22
stop();
Symbol 225 MovieClip Frame 30
stop();
Symbol 226 MovieClip [enemy] Frame 1
stop();
Symbol 226 MovieClip [enemy] Frame 2
stop();
Symbol 226 MovieClip [enemy] Frame 3
stop();
Symbol 226 MovieClip [enemy] Frame 4
stop();
Symbol 226 MovieClip [enemy] Frame 5
stop();
Symbol 226 MovieClip [enemy] Frame 6
stop();
Symbol 226 MovieClip [enemy] Frame 7
stop();
Symbol 226 MovieClip [enemy] Frame 8
stop();
Symbol 256 MovieClip Frame 30
stop();
Symbol 257 MovieClip [enemy2] Frame 1
stop();
Symbol 257 MovieClip [enemy2] Frame 2
stop();
Symbol 257 MovieClip [enemy2] Frame 3
stop();
Symbol 257 MovieClip [enemy2] Frame 4
stop();
Symbol 257 MovieClip [enemy2] Frame 5
stop();
Symbol 257 MovieClip [enemy2] Frame 6
stop();
Symbol 257 MovieClip [enemy2] Frame 7
stop();
Symbol 257 MovieClip [enemy2] Frame 8
stop();
Symbol 279 MovieClip Frame 30
stop();
Symbol 280 MovieClip [enemy3] Frame 1
stop();
Symbol 280 MovieClip [enemy3] Frame 2
stop();
Symbol 280 MovieClip [enemy3] Frame 3
stop();
Symbol 280 MovieClip [enemy3] Frame 4
stop();
Symbol 280 MovieClip [enemy3] Frame 5
stop();
Symbol 280 MovieClip [enemy3] Frame 6
stop();
Symbol 280 MovieClip [enemy3] Frame 7
stop();
Symbol 280 MovieClip [enemy3] Frame 8
stop();
Symbol 301 MovieClip Frame 30
stop();
Symbol 302 MovieClip [enemy4] Frame 1
stop();
Symbol 302 MovieClip [enemy4] Frame 2
stop();
Symbol 302 MovieClip [enemy4] Frame 3
stop();
Symbol 302 MovieClip [enemy4] Frame 4
stop();
Symbol 302 MovieClip [enemy4] Frame 5
stop();
Symbol 302 MovieClip [enemy4] Frame 6
stop();
Symbol 302 MovieClip [enemy4] Frame 7
stop();
Symbol 302 MovieClip [enemy4] Frame 8
stop();
Symbol 304 MovieClip [blood] Frame 11
this.removeMovieClip();
Symbol 339 MovieClip Frame 30
stop();
Symbol 340 MovieClip [midlvlboss] Frame 1
stop();
Symbol 340 MovieClip [midlvlboss] Frame 2
stop();
Symbol 340 MovieClip [midlvlboss] Frame 3
stop();
Symbol 340 MovieClip [midlvlboss] Frame 4
stop();
Symbol 340 MovieClip [midlvlboss] Frame 5
stop();
Symbol 340 MovieClip [midlvlboss] Frame 6
stop();
Symbol 340 MovieClip [midlvlboss] Frame 7
stop();
Symbol 340 MovieClip [midlvlboss] Frame 8
stop();
Symbol 454 MovieClip [playerWhite] Frame 1
stop();
Symbol 454 MovieClip [playerWhite] Frame 2
stop();
Symbol 454 MovieClip [playerWhite] Frame 3
stop();
Symbol 454 MovieClip [playerWhite] Frame 4
stop();
Symbol 454 MovieClip [playerWhite] Frame 5
stop();
Symbol 454 MovieClip [playerWhite] Frame 6
stop();
Symbol 454 MovieClip [playerWhite] Frame 7
stop();
Symbol 454 MovieClip [playerWhite] Frame 8
stop();
Symbol 454 MovieClip [playerWhite] Frame 9
stop();
Symbol 454 MovieClip [playerWhite] Frame 10
stop();
Symbol 454 MovieClip [playerWhite] Frame 11
stop();
Symbol 454 MovieClip [playerWhite] Frame 12
stop();
Symbol 454 MovieClip [playerWhite] Frame 13
stop();
Symbol 454 MovieClip [playerWhite] Frame 14
stop();
Symbol 454 MovieClip [playerWhite] Frame 15
stop();
Symbol 454 MovieClip [playerWhite] Frame 16
stop();
Symbol 454 MovieClip [playerWhite] Frame 17
stop();
Symbol 454 MovieClip [playerWhite] Frame 18
stop();
Symbol 454 MovieClip [playerWhite] Frame 19
stop();
Symbol 454 MovieClip [playerWhite] Frame 20
stop();
Symbol 454 MovieClip [playerWhite] Frame 21
stop();
Symbol 454 MovieClip [playerWhite] Frame 22
stop();
Symbol 559 MovieClip [playerBlack] Frame 1
stop();
Symbol 559 MovieClip [playerBlack] Frame 2
stop();
Symbol 559 MovieClip [playerBlack] Frame 3
stop();
Symbol 559 MovieClip [playerBlack] Frame 4
stop();
Symbol 559 MovieClip [playerBlack] Frame 5
stop();
Symbol 559 MovieClip [playerBlack] Frame 6
stop();
Symbol 559 MovieClip [playerBlack] Frame 7
stop();
Symbol 559 MovieClip [playerBlack] Frame 8
stop();
Symbol 559 MovieClip [playerBlack] Frame 9
stop();
Symbol 559 MovieClip [playerBlack] Frame 10
stop();
Symbol 559 MovieClip [playerBlack] Frame 11
stop();
Symbol 559 MovieClip [playerBlack] Frame 12
stop();
Symbol 559 MovieClip [playerBlack] Frame 13
stop();
Symbol 559 MovieClip [playerBlack] Frame 14
stop();
Symbol 559 MovieClip [playerBlack] Frame 15
stop();
Symbol 559 MovieClip [playerBlack] Frame 16
stop();
Symbol 559 MovieClip [playerBlack] Frame 17
stop();
Symbol 559 MovieClip [playerBlack] Frame 18
stop();
Symbol 559 MovieClip [playerBlack] Frame 19
stop();
Symbol 559 MovieClip [playerBlack] Frame 20
stop();
Symbol 559 MovieClip [playerBlack] Frame 21
stop();
Symbol 559 MovieClip [playerBlack] Frame 22
stop();
Symbol 561 MovieClip [flash] Frame 8
this.removeMovieClip();
Symbol 593 MovieClip Frame 30
stop();
Symbol 594 MovieClip [withGun] Frame 1
stop();
Symbol 594 MovieClip [withGun] Frame 2
stop();
Symbol 594 MovieClip [withGun] Frame 3
stop();
Symbol 594 MovieClip [withGun] Frame 4
stop();
Symbol 594 MovieClip [withGun] Frame 5
stop();
Symbol 594 MovieClip [withGun] Frame 6
stop();
Symbol 594 MovieClip [withGun] Frame 7
stop();
Symbol 594 MovieClip [withGun] Frame 8
stop();
Symbol 618 MovieClip Frame 63
stop();
Symbol 627 MovieClip Frame 7
stop();
Symbol 633 MovieClip Frame 5
stop();
Symbol 649 MovieClip Frame 15
stop();
Symbol 653 MovieClip [splatter] Frame 81
this.removeMovieClip();
Symbol 682 MovieClip [cop] Frame 1
stop();
Symbol 682 MovieClip [cop] Frame 2
stop();
Symbol 682 MovieClip [cop] Frame 3
stop();
Symbol 682 MovieClip [cop] Frame 4
stop();
Symbol 682 MovieClip [cop] Frame 5
stop();
Symbol 682 MovieClip [cop] Frame 6
stop();
Symbol 682 MovieClip [cop] Frame 7
stop();
Symbol 692 MovieClip Frame 5
stop();
Symbol 697 MovieClip Frame 10
stop();
Symbol 700 MovieClip Frame 5
stop();
Symbol 709 MovieClip Frame 30
stop();
Symbol 710 MovieClip Frame 1
_root.stop();
Symbol 710 MovieClip Frame 175
_root.play();
stopAllSounds();
Symbol 713 MovieClip Frame 1
stop();
Symbol 713 MovieClip Frame 2
stop();
Symbol 716 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();
Symbol 724 MovieClip Frame 1
stop();
Symbol 724 MovieClip Frame 2
stop();
Symbol 727 MovieClip Frame 1
stop();
Symbol 727 MovieClip Frame 2
stop();
Symbol 730 MovieClip Frame 1
stop();
Symbol 730 MovieClip Frame 2
stop();
Symbol 782 MovieClip Frame 1
_root.stop();
Symbol 782 MovieClip Frame 410
_root.play();
Symbol 814 MovieClip Frame 12
stop();
Symbol 818 Button
on (release) {
gotoAndPlay (2);
_root.soundstatus = "off";
}
Symbol 819 MovieClip Frame 11
stop();
Symbol 821 Button
on (release) {
gotoAndPlay (1);
_root.soundstatus = "on";
}
Symbol 822 MovieClip Frame 1
stop();
Symbol 822 MovieClip Frame 2
stop();
Instance of Symbol 826 MovieClip in Symbol 827 MovieClip [sound_contr] Frame 1
onClipEvent (load) {
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame) {
if (_root.soundstatus == "on") {
step = 5;
}
if (_root.soundstatus == "off") {
step = -5;
}
maxvolume = maxvolume + step;
if (maxvolume > 100) {
maxvolume = 100;
}
if (maxvolume < 0) {
maxvolume = 0;
}
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
Symbol 828 MovieClip Frame 101
stop();
Symbol 829 MovieClip Frame 1
stop();
Symbol 829 MovieClip Frame 2
stop();
Symbol 830 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();
Symbol 834 MovieClip Frame 1
_root.frameCount++;
Symbol 834 MovieClip Frame 2
gotoAndPlay (1);
Symbol 840 MovieClip Frame 1
stop();
Symbol 840 MovieClip Frame 2
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 2
stop();
Instance of Symbol 840 MovieClip "yes" in Symbol 844 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("over");
}
on (rollOut) {
this.gotoAndStop("up");
}
on (release) {
_global.playerHealth = 100;
_global.alive = true;
_global.forceDrop = true;
}
Instance of Symbol 843 MovieClip "no" in Symbol 844 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("over");
}
on (rollOut) {
this.gotoAndStop("up");
}
on (release) {
_global.quit = true;
}
Instance of Symbol 49 MovieClip in Symbol 844 MovieClip Frame 1
on (release) {
getURL ("http://www.bandias.com/?a=mod_other_promo&f=thug", "_blank");
}
Symbol 847 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 2
stop();
Instance of Symbol 847 MovieClip in Symbol 850 MovieClip Frame 1
on (rollOver) {
this.gotoAndStop("over");
}
on (rollOut) {
this.gotoAndStop("up");
}
on (release) {
_global.quit = true;
}
Instance of Symbol 49 MovieClip in Symbol 850 MovieClip Frame 1
on (release) {
getURL ("http://www.bandias.com/?a=mod_other_promo&f=thug", "_blank");
}
Symbol 867 MovieClip Frame 1
_root.stop();
Symbol 867 MovieClip Frame 193
_root.play();
Symbol 899 MovieClip Frame 33
stop();
Symbol 919 MovieClip Frame 1
_root.stop();
Symbol 919 MovieClip Frame 415
_root.play();