Combined Code
movieClip 4 {
frame 1 {
this.onPress = function () {
getURL('http://www.facebook.com/ArmorGames', _blank);
};
}
}
movieClip 6 {
frame 1 {
this.onPress = function () {
getURL('http://armorgames.com', _blank);
};
}
}
movieClip 8 {
frame 1 {
_alpha = 0;
switch (_name) {
case 'btn1':
btnNumber = 1;
break;
case 'btn2':
btnNumber = 2;
break;
case 'btn3':
btnNumber = 3;
break;
case 'btn4':
btnNumber = 4;
break;
case 'btn5':
btnNumber = 5;
break;
case 'btn6':
btnNumber = 6;
}
this.onRollOver = function () {
_parent.targety = _y;
if (_parent.slide._alpha < 20) {
_parent.slide._y = _y;
}
if (_parent.slide._currentframe != btnNumber) {
_parent.slide.gotoAndStop(btnNumber);
}
};
}
}
// unknown tag 88 length 208
movieClip 17 {
frame 1 {
stop();
}
}
// unknown tag 88 length 105
// unknown tag 88 length 229
movieClip 28 mainmenu {
frame 1 {
this.swapDepths(_root.mainmenudepth);
targety = -50;
slide._alpha = 0;
this.onEnterFrame = function () {
slide._y += (targety - slide._y) / 2;
if (_xmouse < btn1._x || _xmouse > btn1._x + btn1._width || _ymouse < btn1._y) {
if (slide._alpha > 0) {
slide._alpha -= 20;
}
} else {
if (slide._alpha < 80) {
slide._alpha += 20;
}
}
};
btn1.onRelease = function () {
if (!_root.fadeaway) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 4;
_root.slideprevx = 0;
_root.playsound('menu.wav');
}
};
btn2.onRelease = function () {
if (!_root.fadeaway) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 9;
_root.playsound('menu.wav');
}
};
btn3.onRelease = function () {
if (!_root.fadeaway) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 8;
_root.playsound('menu.wav');
}
};
btn4.onRelease = function () {
if (!_root.fadeaway) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 5;
_root.playsound('menu.wav');
}
};
btn5.onRelease = function () {
if (!_root.fadeaway) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 7;
_root.playsound('menu.wav');
}
};
btn6.onRelease = function () {
if (!_root.fadeaway) {
getURL('http://armorgames.com', _blank);
}
};
}
}
movieClip 30 {
}
movieClip 32 {
}
movieClip 34 {
}
movieClip 36 {
}
movieClip 38 {
}
movieClip 40 {
}
movieClip 41 hud_tutorialtext {
frame 313 {
stop();
}
}
movieClip 43 mapfx_wall {
frame 1 {
this.cacheAsBitmap = true;
}
}
movieClip 45 {
}
movieClip 46 mapfx_snow {
frame 1 {
_rotation = -20;
_x = 420;
_y = 350;
}
frame 127 {
gotoAndPlay(2);
}
}
// unknown tag 88 length 218
movieClip 90 {
}
movieClip 94 {
frame 1 {
stop();
}
}
movieClip 95 {
frame 1 {
switch (this._name) {
case 'panel1':
number = 1;
break;
case 'panel2':
number = 2;
break;
case 'panel3':
number = 3;
break;
case 'panel4':
number = 4;
break;
case 'panel5':
number = 5;
break;
case 'panel6':
number = 6;
break;
case 'panel7':
number = 7;
break;
case 'panel8':
number = 8;
break;
case 'panel9':
number = 9;
break;
case 'panel10':
number = 10;
}
cicon.gotoAndStop(number);
if (_root.savedata3.data.levelarray[number - 1] == 2) {
lock.gotoAndStop(3);
}
if (_root.savedata3.data.levelarray[number - 1] == 1) {
lock.gotoAndStop(2);
}
if (_root.savedata3.data.levelarray[number - 1] == 0) {
this.useHandCursor = false;
}
this.onPress = function () {
if (_parent._alpha >= 100 && lock._currentframe != 1 && this.useHandCursor) {
_root.playsound('menu.wav');
_parent.disableall();
_parent._parent.gotolevel(number);
}
};
}
}
movieClip 96 menuc_slider {
frame 1 {
function enableall() {
panel1.useHandCursor = true;
panel2.useHandCursor = true;
panel3.useHandCursor = true;
panel4.useHandCursor = true;
panel5.useHandCursor = true;
panel6.useHandCursor = true;
panel7.useHandCursor = true;
panel8.useHandCursor = true;
panel9.useHandCursor = true;
panel10.useHandCursor = true;
}
function disableall() {
panel1.useHandCursor = false;
panel2.useHandCursor = false;
panel3.useHandCursor = false;
panel4.useHandCursor = false;
panel5.useHandCursor = false;
panel6.useHandCursor = false;
panel7.useHandCursor = false;
panel8.useHandCursor = false;
panel9.useHandCursor = false;
panel10.useHandCursor = false;
}
}
}
movieClip 99 {
}
movieClip 111 {
frame 1 {
gotoAndStop(_parent._parent.playernumber + 1);
if (_name == 'gunhand' || _name == 'gunhand2') {
gotoAndStop(_parent._parent._parent.playernumber + 1);
}
}
}
movieClip 112 gun_moss500 {
frame 1 {
shootx = 0;
shooty = 2;
handx = 51;
handy = -4;
shellX = 20;
flashX = 38;
Name = 'STUBBY SHOTGUN';
_parent._parent.rof = 18;
_parent._parent.firepower = 6;
_parent._parent.recoil = 3;
_parent._parent.blowback = 20;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.9;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 6 {
_parent._parent.hand2.hand._alpha = 0;
_root.playsound('bolt2.wav');
}
frame 9 {
_parent._parent.ejectshot();
}
frame 15 {
gotoAndPlay(2);
}
}
movieClip 114 gun_mini14 {
frame 1 {
shootx = 12;
shooty = 1;
handx = 48;
handy = -14;
shellX = 20;
flashX = 75;
Name = 'COMPACT RIFLE';
_parent._parent.rof = 5;
_parent._parent.firepower = 30;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 8;
_parent._parent.bullets = 15;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 12;
_parent._parent.weight = 0.85;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
frame 1 {
stop();
Stage.showMenu = false;
total = _root.getBytesTotal();
this.onEnterFrame = function () {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
if (loaded == total) {
total = 0;
play();
delete this.onEnterFrame;
}
};
}
movieClip 118 {
frame 1 {
this.onPress = function () {
getURL('http://armorgames.com', _blank);
};
}
}
// unknown tag 88 length 151
frame 2 {
function stopallmusic() {
music111.stop();
music222.stop();
music333.stop();
music444.stop();
music555.stop();
}
function playsound(sounds) {
if (_root.savedata2.data.soundON) {
_root.soundnumber += 1;
if (_root.soundnumber >= 500) {
_root.soundnumber = 400;
}
asdfsound = _root.createEmptyMovieClip('sound' + soundnumber, soundnumber);
qwersound = new Sound(asdfsound);
qwersound.attachSound(sounds);
qwersound.setVolume(50);
qwersound.start(0, 0);
}
}
function playsound2(sounds) {
if (_root.savedata2.data.soundON) {
_root.soundnumber += 1;
if (_root.soundnumber >= 500) {
_root.soundnumber = 400;
}
asdfsound = _root.createEmptyMovieClip('sound' + soundnumber, soundnumber);
qwersound = new Sound(asdfsound);
qwersound.attachSound(sounds);
qwersound.setVolume(100);
qwersound.start(0, 0);
}
}
function CP(cpn, cpx, cpy, cpr, asdf, asdf2) {
pDepth += 1;
if (pDepth >= 9900) {
pDepth = 1001;
}
newMC = _root.attachMovie(cpn, 'particle' + pDepth, pDepth);
newMC._x = cpx;
newMC._y = cpy;
newMC._rotation = cpr;
newMC.asdf = asdf;
newMC.asdf2 = asdf2;
}
function CP2(cpn, cpx, cpy, cpr, asdf) {
pDepth2 += 1;
if (pDepth2 >= -1001) {
pDepth2 = -2000;
}
newMC = _root.attachMovie(cpn, 'particle' + pDepth2, pDepth2);
newMC._x = cpx;
newMC._y = cpy;
newMC._rotation = cpr;
newMC.asdf = asdf;
}
function dropsound() {
switch (random(3)) {
case 0:
_root.playsound2('drop1.wav');
break;
case 1:
_root.playsound2('drop2.wav');
break;
case 2:
_root.playsound2('drop3.wav');
}
}
function explodesound() {
switch (random(4)) {
case 0:
_root.playsound2('explosion1.wav');
break;
case 1:
_root.playsound2('explosion2.wav');
break;
case 2:
_root.playsound2('explosion3.wav');
break;
case 3:
_root.playsound2('explosion4.wav');
}
}
function hitsound() {
switch (random(2)) {
case 0:
_root.playsound2('hit1.wav');
break;
case 1:
_root.playsound2('hit2.wav');
}
}
function diesound() {
switch (random(4)) {
case 0:
_root.playsound2('die1.wav');
break;
case 1:
_root.playsound2('die2.wav');
break;
case 2:
_root.playsound2('die3.wav');
break;
case 3:
_root.playsound2('die4.wav');
}
}
function gunsound(wepnum) {
switch (wepnum) {
case 1:
_root.playsound('pistol3.wav');
break;
case 2:
_root.playsound('pistol3.wav');
break;
case 3:
_root.playsound('pistol1.wav');
break;
case 4:
_root.playsound('pistol3.wav');
break;
case 5:
_root.playsound('pistol2.wav');
break;
case 6:
_root.playsound('pistol0.wav');
break;
case 8:
_root.playsound('pistol3.wav');
break;
case 9:
_root.playsound('pistol0.wav');
break;
case 10:
_root.playsound('rifle6.wav');
break;
case 11:
_root.playsound('snipe1.wav');
break;
case 12:
_root.playsound('smg1.wav');
break;
case 13:
_root.playsound('shotgun1.wav');
break;
case 14:
_root.playsound('snipe2.wav');
break;
case 15:
_root.playsound('shotgun3.wav');
break;
case 16:
_root.playsound('snipe3.wav');
break;
case 17:
_root.playsound('rifle2.wav');
break;
case 18:
_root.playsound('shotgun3.wav');
break;
case 19:
_root.playsound('silenced2.wav');
break;
case 20:
_root.playsound('rifle6.wav');
break;
case 21:
_root.playsound('smg3.wav');
break;
case 22:
_root.playsound('smg4.wav');
break;
case 23:
_root.playsound('smg1.wav');
break;
case 24:
_root.playsound('smg2.wav');
break;
case 25:
_root.playsound('smg3.wav');
break;
case 26:
_root.playsound('smg4.wav');
break;
case 27:
_root.playsound('smg1.wav');
break;
case 28:
_root.playsound('smg2.wav');
break;
case 29:
_root.playsound('smg3.wav');
break;
case 30:
_root.playsound('smg4.wav');
break;
case 31:
_root.playsound('smg1.wav');
break;
case 32:
_root.playsound('smg2.wav');
break;
case 33:
_root.playsound('snipe4.wav');
break;
case 34:
_root.playsound('snipe5.wav');
break;
case 35:
_root.playsound('snipe6.wav');
break;
case 36:
_root.playsound('snipe1.wav');
break;
case 37:
_root.playsound('snipe2.wav');
break;
case 38:
_root.playsound('snipe3.wav');
break;
case 39:
_root.playsound('snipe4.wav');
break;
case 40:
_root.playsound('silenced1.wav');
break;
case 41:
_root.playsound('snipe6.wav');
break;
case 42:
_root.playsound('snipe1.wav');
break;
case 43:
_root.playsound('snipe2.wav');
break;
case 44:
_root.playsound('shotgun3.wav');
break;
case 45:
_root.playsound('shotgun2.wav');
break;
case 46:
_root.playsound('shotgun3.wav');
break;
case 47:
_root.playsound('shotgun3.wav');
break;
case 48:
_root.playsound('shotgun1.wav');
break;
case 49:
_root.playsound('shotgun2.wav');
break;
case 50:
_root.playsound('shotgun1.wav');
break;
case 51:
_root.playsound('shotgun3.wav');
break;
case 52:
_root.playsound('shotgun3.wav');
break;
case 53:
_root.playsound('shotgun2.wav');
break;
case 54:
_root.playsound('shotgun3.wav');
break;
case 55:
_root.playsound('rifle3.wav');
break;
case 56:
_root.playsound('rifle6.wav');
break;
case 57:
_root.playsound('rifle1.wav');
break;
case 58:
_root.playsound('silenced2.wav');
break;
case 59:
_root.playsound('rifle3.wav');
break;
case 60:
_root.playsound('rifle4.wav');
break;
case 61:
_root.playsound('rifle5.wav');
break;
case 62:
_root.playsound('rifle1.wav');
break;
case 63:
_root.playsound('rifle2.wav');
break;
case 64:
_root.playsound('rifle3.wav');
break;
case 65:
_root.playsound('lmg.wav');
break;
case 66:
_root.playsound('rifle5.wav');
}
}
p1depth = 10001;
p2depth = 10002;
p3depth = 10003;
p4depth = 10004;
arrow1depth = 10005;
arrow2depth = 10006;
arrow3depth = 10007;
arrow4depth = 10008;
mapfxdepth = 10009;
huddepth = 10010;
teamwindepth = 10011;
pausedepth = 10199;
fadedepth = 10200;
mainmenudepth = 10100;
pDepth = 1001;
pDepth2 = -2000;
gototest = false;
slideprevx = 0;
soundnumber = 400;
_root.showunlocks = 0;
savedata3 = SharedObject.getLocal('arenagamedata3');
if (!savedata3.data.filled) {
savedata3.data.filled = true;
savedata3.data.levelarray = new Array();
i = 0;
while (i < 11) {
savedata3.data.levelarray[i] = 0;
++i;
}
savedata3.data.levelarray[0] = 1;
savedata3.data.levelarray[1] = 1;
savedata3.data.levelarray[2] = 0;
savedata3.data.levelarray[3] = 0;
savedata3.data.levelarray[4] = 0;
savedata3.data.levelarray[5] = 0;
savedata3.data.levelarray[6] = 0;
savedata3.data.levelarray[7] = 0;
savedata3.data.levelarray[8] = 0;
savedata3.data.levelarray[9] = 0;
savedata3.data.p1name = 'Player 1';
savedata3.data.p1color = 2;
savedata3.data.p1shirt = 1;
savedata3.data.p1hat = 1;
savedata3.data.p1gun = 1;
savedata3.data.p1perk = 7;
savedata3.data.p1ptype = 1;
savedata3.data.p2name = 'Player 2';
savedata3.data.p2color = 5;
savedata3.data.p2shirt = 1;
savedata3.data.p2hat = 1;
savedata3.data.p2gun = 1;
savedata3.data.p2perk = 7;
savedata3.data.p2ptype = 0;
savedata3.data.gunarray = new Array();
i = 0;
while (i < 57) {
savedata3.data.gunarray[i] = true;
++i;
}
savedata3.data.gunarray[18] = false;
savedata3.data.gunarray[19] = false;
savedata3.data.gunarray[20] = false;
savedata3.data.gunarray[21] = false;
savedata3.data.gunarray[22] = false;
savedata3.data.gunarray[29] = false;
savedata3.data.gunarray[30] = false;
savedata3.data.gunarray[31] = false;
savedata3.data.gunarray[32] = false;
savedata3.data.gunarray[33] = false;
savedata3.data.gunarray[40] = false;
savedata3.data.gunarray[41] = false;
savedata3.data.gunarray[42] = false;
savedata3.data.gunarray[43] = false;
savedata3.data.gunarray[44] = false;
savedata3.data.gunarray[52] = false;
savedata3.data.gunarray[53] = false;
savedata3.data.gunarray[54] = false;
savedata3.data.gunarray[55] = false;
savedata3.data.gunarray[56] = false;
}
savedata2 = SharedObject.getLocal('arenagamedata2');
if (!savedata2.data.filled) {
savedata2.data.filled = true;
savedata2.data.musicON = true;
savedata2.data.soundON = true;
savedata2.data.def_quality = 2;
savedata2.data.controlarray = new Array();
i = 0;
while (i < 4) {
savedata2.data.controlarray[i] = new Array();
j = 0;
while (j < 6) {
savedata2.data.controlarray[i][j] = 0;
++j;
}
++i;
}
savedata2.data.controlarray[0][0] = 38;
savedata2.data.controlarray[0][1] = 37;
savedata2.data.controlarray[0][2] = 40;
savedata2.data.controlarray[0][3] = 39;
savedata2.data.controlarray[0][4] = 219;
savedata2.data.controlarray[0][5] = 221;
savedata2.data.controlarray[1][0] = 87;
savedata2.data.controlarray[1][1] = 65;
savedata2.data.controlarray[1][2] = 83;
savedata2.data.controlarray[1][3] = 68;
savedata2.data.controlarray[1][4] = 84;
savedata2.data.controlarray[1][5] = 89;
savedata2.data.controlarray[2][0] = 111;
savedata2.data.controlarray[2][1] = 103;
savedata2.data.controlarray[2][2] = 104;
savedata2.data.controlarray[2][3] = 105;
savedata2.data.controlarray[2][4] = 106;
savedata2.data.controlarray[2][5] = 109;
savedata2.data.controlarray[3][0] = 101;
savedata2.data.controlarray[3][1] = 97;
savedata2.data.controlarray[3][2] = 98;
savedata2.data.controlarray[3][3] = 99;
savedata2.data.controlarray[3][4] = 96;
savedata2.data.controlarray[3][5] = 110;
}
}
movieClip 126 {
}
movieClip 132 {
}
movieClip 135 {
frame 1 {
_root.stop();
gotoAndPlay(2);
this.useHandCursor = false;
this.onPress = function () {
getURL('http://armorgames.com', _blank);
};
}
frame 225 {
_root.nextFrame();
}
}
frame 3 {
stop();
musictemp1 = _root.createEmptyMovieClip('sound510', 510);
music111 = new Sound(musictemp1);
music111.attachSound('music111');
musictemp2 = _root.createEmptyMovieClip('sound511', 511);
music222 = new Sound(musictemp2);
music222.attachSound('music222');
musictemp3 = _root.createEmptyMovieClip('sound512', 512);
music333 = new Sound(musictemp3);
music333.attachSound('music333');
musictemp4 = _root.createEmptyMovieClip('sound513', 513);
music444 = new Sound(musictemp4);
music444.attachSound('music444');
musictemp5 = _root.createEmptyMovieClip('sound514', 514);
music555 = new Sound(musictemp5);
music555.attachSound('music555');
}
movieClip 136 {
}
movieClip 137 {
frame 54 {
stop();
}
}
movieClip 138 {
}
movieClip 147 {
frame 1 {
this.onPress = function () {
getURL('http://www.thekevingu.com', _blank);
};
}
frame 100 {
stop();
this.onEnterFrame = function () {
_alpha = _alpha - 10;
if (_alpha <= 1) {
_root.gotomenu = true;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 159 fx_bling {
frame 1 {
_x = asdf._x;
_y = asdf._y;
_alpha = 0;
time = 0;
_xscale = 700;
_yscale = _xscale;
yoffset = 30;
if (_x == 0 && _y == 0) {
removeMovieClip(this);
delete this.onEnterFrame;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = asdf._x;
_y = asdf._y - yoffset;
time += 1;
if (time <= 20) {
if (_alpha < 100) {
_alpha = _alpha + 50;
}
if (_xscale > 100) {
_xscale = _xscale + (90 - _xscale) / 5;
}
_yscale = _xscale;
} else {
if (time >= 40) {
_alpha = _alpha - 10;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
}
yoffset += (110 - yoffset) / 5;
if (_root.deleteeverything || _root.gamewin) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
gotoAndStop(mod + 1);
if (_root.gamemode == 4) {
levelnumber.text = leveldisplay;
}
score = 0;
switch (mod) {
case 1:
score = 100;
break;
case 2:
score = 200;
break;
case 3:
score = 300;
break;
case 4:
score = 50;
}
_root.pgsdata[asdf.PLAYERNUMBER - 1][7] += score;
}
}
movieClip 163 {
frame 1 {
stop();
}
}
movieClip 164 fx_combo {
frame 1 {
level = 1;
_rotation = random(15) + 5;
if (random(2) == 0) {
_rotation = _rotation * -1;
}
scaletarget = 190;
if (asdf == 1) {
displaytext.displaytext.text = 'HIT';
} else {
if (asdf > 1) {
displaytext.displaytext.text = asdf + ' HITS';
} else {
if (asdf == -1) {
displaytext.gotoAndStop(2);
displaytext.displaytext.text = 'SNIPED';
scaletarget = 199.9;
} else {
if (asdf == -2) {
displaytext.gotoAndStop(3);
displaytext.displaytext.text = 'BOOM';
scaletarget = 199;
} else {
if (asdf == -3) {
displaytext.gotoAndStop(3);
displaytext.displaytext.text = 'QUACK';
scaletarget = 199;
} else {
if (asdf == -4) {
displaytext.gotoAndStop(2);
displaytext.displaytext.text = 'PWND';
scaletarget = 199;
} else {
if (asdf == -5) {
displaytext.gotoAndStop(2);
displaytext.displaytext.text = 'SPLAT';
scaletarget = 199;
} else {
if (asdf == -6) {
displaytext.gotoAndStop(2);
displaytext.displaytext.text = 'SMACKED';
scaletarget = 199;
} else {
if (asdf == -7) {
displaytext.gotoAndStop(3);
displaytext.displaytext.text = 'POW';
scaletarget = 195;
}
}
}
}
}
}
}
}
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (200 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_xscale = _xscale - 3;
_yscale = _xscale;
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 166 fx_cratename {
frame 1 {
_alpha = 0;
level = 1;
time = 0;
switch (asdf) {
case 1:
displaytext.text = _root.player1.hand1.gun.Name;
break;
case 2:
displaytext.text = _root.player2.hand1.gun.Name;
break;
case 3:
displaytext.text = _root.player3.hand1.gun.Name;
break;
case 4:
displaytext.text = _root.player4.hand1.gun.Name;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_y = _y - 0.5;
if (level == 1) {
if (_alpha < 80) {
_alpha = _alpha + 10;
}
time += 1;
if (time >= 40) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 169 {
}
movieClip 170 fx_deagle {
frame 1 {
vx = 20 * asdf;
vy = -6;
rotationspeed = 15 * asdf;
_xscale = _xscale * asdf;
facing = asdf;
hitsomething = false;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (!hitsomething) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].frame.hitTest(_x, _y, true)) {
_root.activeplayers[i].vx += 20 * facing;
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
j = 0;
while (j < 4) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_bloodstain', _x + vx, _y, 0, 0);
_root.CP('fx_combo', _x + vx, _y - 50, 0, -6);
tagplayer(_root.activeplayers[i]);
vx *= -0.5;
_x = _x + vx;
hitsomething = true;
}
++i;
}
}
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 172 fx_droppack {
frame 1 {
if (_rotation < 0) {
_xscale = -100;
}
vx = 5 * _rotation;
vy = -5;
vy = Math.random() * 5 - 10;
rotationspeed = Math.random() * 2 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 175 {
}
movieClip 176 fx_jetpack {
frame 1 {
_rotation = random(360);
vx = Math.random() * 10 - 5;
vy = Math.random() * 5 + 1;
_x = _x + (Math.random() * 2 - 1);
_y = _y + Math.random() * 2;
fx._alpha = 0;
_root.playsound('jetpack.wav');
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (fx._alpha < 100) {
fx._alpha += 15;
}
_x = _x + vx;
_y = _y + vy;
vx *= 0.9;
_xscale = _xscale - 7;
_yscale = _xscale;
if (_y >= 900 || _root.deleteeverything || _xscale <= 10) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 188 {
frame 1 {
gotoAndStop(_parent._parent.playernumber + 1);
}
}
movieClip 189 {
frame 1 {
stop();
}
frame 6 {
_parent.walkanim = 2;
}
frame 15 {
_parent.walkanim = 1;
}
}
movieClip 192 {
}
movieClip 193 {
}
movieClip 205 {
frame 1 {
gotoAndStop(_parent._parent._parent.playernumber + 1);
}
}
movieClip 224 {
frame 1 {
stop();
switch (_parent._parent._parent.PLAYERNUMBER) {
case 1:
gotoAndStop(_root.p1shirt);
break;
case 2:
gotoAndStop(_root.p2shirt);
break;
case 3:
gotoAndStop(_root.p3shirt);
break;
case 4:
gotoAndStop(_root.p4shirt);
}
if (_parent._parent._parent.nametag.nametext.text == 'Homer') {
gotoAndStop(32);
}
}
frame 1 {
id = 'Casual Shirt';
}
frame 2 {
id = 'White Suit';
}
frame 3 {
id = 'Gray Suit';
}
frame 4 {
id = 'Professional Killer';
}
frame 5 {
id = 'Fancy Tux';
}
frame 6 {
id = 'Leather Jacket';
}
frame 7 {
id = 'Pompous Shirt';
}
frame 8 {
id = 'Pirate';
}
frame 9 {
id = 'Kung Fu Master';
}
frame 10 {
id = 'Caveman';
}
frame 11 {
id = 'Santa Claus';
}
frame 12 {
id = 'Exterminator';
}
frame 13 {
id = 'Jumpsuit';
}
frame 14 {
id = 'Rambo';
}
frame 15 {
id = 'Hawaiian';
}
}
movieClip 225 {
}
movieClip 237 {
frame 1 {
this.gotoAndStop(_parent._parent._parent._parent.playernumber + 1);
}
}
movieClip 238 {
}
movieClip 239 {
frame 1 {
gotoAndPlay(random(50) + 2);
}
frame 60 {
gotoAndPlay(2);
}
}
movieClip 240 {
}
movieClip 257 {
}
movieClip 258 {
}
movieClip 269 {
frame 1 {
stop();
switch (_parent.PLAYERNUMBER) {
case 1:
gotoAndStop(_root.p1hat);
break;
case 2:
gotoAndStop(_root.p2hat);
break;
case 3:
gotoAndStop(_root.p3hat);
break;
case 4:
gotoAndStop(_root.p4hat);
}
}
frame 1 {
id = 'Tool Cool For Hats';
}
frame 2 {
id = 'Mohawk';
}
frame 3 {
id = 'Santa Claus';
}
frame 4 {
id = 'White Fedora';
}
frame 5 {
id = 'Dark Gray Fedora';
}
frame 6 {
id = 'Fancy Top Hat';
}
frame 7 {
id = 'Caveman';
}
frame 8 {
id = 'Crazy Clown';
this.swapDepths(_parent.eyes);
}
frame 9 {
id = 'Pylon Hat';
}
frame 10 {
id = 'Straw Hat';
}
frame 11 {
id = 'Pompous Hat';
}
frame 12 {
id = 'Viking Helmet';
}
frame 13 {
id = 'Rambo';
}
frame 14 {
id = 'Spikey Helmet';
}
frame 15 {
id = 'ARRRRRRGH!';
}
frame 16 {
id = 'Goldfish Bowl';
}
frame 17 {
id = 'Bunny Ears';
}
frame 18 {
id = 'Army Helmet';
}
frame 19 {
id = 'The Duke';
}
frame 20 {
id = 'Pot Head';
}
frame 21 {
id = 'Slick Hair';
}
frame 22 {
id = 'Female Hair';
this.swapDepths(_parent.eyes);
}
frame 23 {
id = 'The Very Best';
}
frame 24 {
id = 'Crown';
}
}
movieClip 281 {
frame 1 {
stop();
switch (_parent.PLAYERNUMBER) {
case 1:
gotoAndStop(_root.p1hat);
break;
case 2:
gotoAndStop(_root.p2hat);
break;
case 3:
gotoAndStop(_root.p3hat);
break;
case 4:
gotoAndStop(_root.p4hat);
}
}
}
movieClip 282 {
frame 1 {
stop();
}
}
movieClip 283 fx_playertrail {
frame 1 {
stop();
_xscale = 80 * asdf;
_yscale = 80;
if (_rotation < 0) {
_xscale = 50 * asdf;
_yscale = 50;
_rotation = Math.abs(_rotation);
}
PLAYERNUMBER = Math.floor(_rotation);
switch (PLAYERNUMBER) {
case 1:
playernumber = _root.p1color;
break;
case 2:
playernumber = _root.p2color;
break;
case 3:
playernumber = _root.p3color;
break;
case 4:
playernumber = _root.p4color;
}
_rotation = 0;
_alpha = 20;
time = 10;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
time -= 1;
if (_alpha <= 1 || time <= 0) {
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 292 fx_powerupname {
frame 1 {
_alpha = 0;
level = 1;
time = 0;
gotoAndStop(asdf + 1);
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_y = _y - 2;
if (level == 1) {
if (_alpha < 80) {
_alpha = _alpha + 10;
}
time += 1;
if (time >= 40) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 294 fx_shell {
frame 1 {
vx = Math.random() * 10 - 5;
vy = Math.random() * 5 - 10;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 296 fx_shell2 {
frame 1 {
vx = Math.random() * 10 - 5;
vy = Math.random() * 5 - 10;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 298 fx_shell3 {
frame 1 {
vx = Math.random() * 4 - 2;
vy = Math.random() * 2;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 300 fx_shell4 {
frame 1 {
vx = Math.random() * 2 - 1;
vy = Math.random() * 5;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 302 fx_shot {
frame 1 {
vx = Math.random() * 10 - 5;
vy = Math.random() * 5 - 10;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 303 fx_shot3 {
frame 1 {
vx = Math.random() * 4 - 2;
vy = Math.random() * 2;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 304 fx_ex0 {
frame 1 {
level = 1;
if (random(2) == 0) {
_rotation = _rotation * -1;
}
scaletarget = 95;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (100 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 20;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 306 fx_ex2 {
frame 1 {
level = 1;
scaletarget = 195;
_xscale = 10;
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (200 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 307 fx_ex22 {
frame 1 {
level = 1;
scaletarget = 97;
_xscale = 10;
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (100 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 308 fx_ex {
frame 1 {
level = 1;
if (random(2) == 0) {
_rotation = _rotation * -1;
}
scaletarget = 190;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (200 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 20;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 310 fx_ex3 {
frame 1 {
_x = _x + (random(20) - 10);
_y = _y - random(20);
vx = Math.random() * 20 - 10;
vy = Math.random() * 10 - 20;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
_xscale = _xscale - 2;
_yscale = _xscale;
vy += _root.gravity * 1.3;
if (_y >= 900 || _alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 312 fx_ex4 {
frame 1 {
level = 1;
_rotation = _rotation + (random(20) - 10);
scaletarget = 249;
_xscale = 10;
_yscale = xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (250 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 313 fx_ex44 {
frame 1 {
level = 1;
_rotation = _rotation + (random(20) - 10);
scaletarget = 124;
_xscale = 10;
_yscale = xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (125 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 10;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 315 fx_ex5 {
frame 1 {
_x = _x + (random(80) - 40);
_y = _y + (random(80) - 20);
vx = Math.random() * 10 - 5;
vy = Math.random() * 4 - 5;
_x = _x + vx * 1;
_y = _y + vy * 1;
_xscale = _xscale + random(100);
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
vy -= 0.1;
vx *= 0.9;
_y = _y + vy;
_xscale = _xscale - 6;
_yscale = _xscale;
if (_xscale <= 10 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 316 fx_ex555 {
frame 1 {
_x = _x + (random(80) - 40);
_y = _y + (random(80) - 20);
vx = Math.random() * 10 - 5;
vy = Math.random() * 4 - 5;
_x = _x + vx * 1;
_y = _y + vy * 1;
_xscale = _xscale + random(70);
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
vy -= 0.1;
vx *= 0.9;
_y = _y + vy;
_xscale = _xscale - 6;
_yscale = _xscale;
if (_xscale <= 10 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 318 fx_ex6 {
frame 1 {
level = 1;
if (random(2) == 0) {
_rotation = _rotation * -1;
}
scaletarget = 190;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (200 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 20;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 319 fx_ex66 {
frame 1 {
level = 1;
if (random(2) == 0) {
_rotation = _rotation * -1;
}
scaletarget = 95;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (level == 1) {
_xscale = _xscale + (100 - _xscale) / 3;
_yscale = _xscale;
if (_xscale >= scaletarget) {
level = 2;
}
}
if (level == 2) {
_alpha = _alpha - 20;
}
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 321 fx_ex7 {
frame 1 {
_x = _x + (random(20) - 10);
_y = _y - random(20);
vx = Math.random() * 20 - 10;
vy = Math.random() * 10 - 20;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
_xscale = _xscale - 2;
_yscale = _xscale;
vy += _root.gravity * 1.3;
if (_y >= 900 || _alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 323 fx_blood {
frame 1 {
_rotation = random(135) - 90;
if (random(2) == 0) {
_rotation = _rotation + 180;
}
speed = Math.random() * 5 + 5;
dirx = Math.cos(_rotation * Math.PI / 180) * speed;
diry = Math.sin(_rotation * Math.PI / 180) * speed;
_x = _x + dirx * 1;
_y = _y + diry * 1;
_xscale = _xscale - random(60);
_yscale = _xscale;
time = 0;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
speed += 0.5;
if (_rotation > -90 && _rotation < 90) {
_rotation = _rotation + 4;
} else {
_rotation = _rotation - 4;
}
dirx = Math.cos(_rotation * Math.PI / 180) * speed;
diry = Math.sin(_rotation * Math.PI / 180) * speed;
_x = _x + dirx;
_y = _y + diry;
if (_y >= 900 || _alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 328 fx_bloodstain {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_rotation = random(360);
time = 0;
_xscale = 150;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_xscale = _xscale + 50;
_yscale = _xscale;
_alpha = _alpha - 20;
if (_alpha <= 1 || time >= 4 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 330 {
}
movieClip 331 fx_campaignlose {
frame 1 {
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = -_root._x;
_y = -_root._y;
}
};
}
frame 20 {
stop();
}
}
movieClip 333 fx_double {
frame 1 {
_y = _y - 10;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_alpha = _alpha - 5;
_xscale = _xscale - 5;
_yscale = _xscale;
_y = _y + 1;
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 335 fx_dropmag {
frame 1 {
vy = 0;
rotationspeed = 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 337 {
}
movieClip 339 fx_dropmag2 {
frame 1 {
vy = 0;
rotationspeed = 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 7 {
stop();
}
}
movieClip 341 fx_dropmag3 {
frame 1 {
vy = 0;
rotationspeed = 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 4 {
stop();
}
}
movieClip 343 fx_dynamite {
frame 1 {
vx = Math.random() * 10 - 5;
vy = Math.random() * 4 - 2;
_x = _x + vx * 1;
_y = _y + vy * 1;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
vx += vx * -0.8;
_y = _y + vy;
_xscale = _xscale - 5;
_yscale = _xscale;
_rotation = _rotation + rotationspeed;
_alpha = _alpha - 20;
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 347 {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
}
}
movieClip 348 fx_flash {
frame 1 {
if (random(2) == 0) {
_yscale = _yscale * -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_alpha = _alpha - 51;
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 349 fx_flash2 {
frame 1 {
if (random(2) == 0) {
_yscale = _yscale * -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_alpha = _alpha - 51;
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 351 fx_instatrail {
frame 1 {
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_alpha = _alpha - 20;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 353 fx_package {
frame 1 {
_x = _x + (random(20) - 10);
_y = _y - random(20);
vx = Math.random() * 20 - 10;
vy = Math.random() * 10 - 20;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
_xscale = _xscale - 2;
_yscale = _xscale;
vy += _root.gravity * 1.3;
if (_y >= 900 || _alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 355 fx_pickup {
frame 1 {
_x = _x + (random(20) - 10);
_y = _y - random(20);
vx = Math.random() * 20 - 10;
vy = Math.random() * 10 - 20;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
_xscale = _xscale - 6;
_yscale = _xscale;
vy += 1.2;
if (_y >= 900 || _alpha <= 1 || _root.deleteeverything || _xscale <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 357 fx_speedloader {
frame 1 {
vx = Math.random() * 2 - 1;
vy = Math.random() * 5;
vy = 0;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 360 {
frame 1 {
gotoAndStop(_parent.asdf);
}
}
movieClip 361 fx_teamwin {
frame 1 {
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = -_root._x;
_y = -_root._y;
}
};
}
frame 20 {
stop();
}
}
movieClip 364 {
frame 1 {
wavenumber.text = _root.zombiewave;
}
}
movieClip 365 fx_zombiewaveup {
frame 1 {
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = -_root._x;
_y = -_root._y;
}
};
}
frame 80 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 368 {
frame 1 {
stop();
}
}
movieClip 369 bullet {
frame 1 {
function tagplayer(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
mc.gothitby = _root.p1name;
_root.pgsdata[0][4] += 1;
break;
case 2:
mc.gothitby = _root.p2name;
_root.pgsdata[1][4] += 1;
break;
case 3:
mc.gothitby = _root.p3name;
_root.pgsdata[2][4] += 1;
break;
case 4:
mc.gothitby = _root.p4name;
_root.pgsdata[3][4] += 1;
}
mc.hitbynade = false;
}
function dothehittest() {
if (!freepass) {
if (_root.ground.hitTest(_x, _y, true)) {
_x = _x - speed;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x + i * (speed / 5), _y, true)) {
_x = _x + (speed / 5) * (i - 1);
break;
}
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_spark', _x, _y, 0);
_root.CP('fx_debris', _x, _y, 0);
++i;
}
removethis = true;
}
}
}
function deletethis() {
removeMovieClip(this);
delete this.onEnterFrame;
}
speed = 25;
facing = 1;
if (_rotation != 0) {
speed *= -1;
facing = -1;
}
time = 1;
trail._width = 20;
trail._alpha = 0;
freepass = false;
firepower = Math.abs(asdf % 1000);
if (firepower > 50) {
trail.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!removethis) {
_x = _x + speed;
if (!removethis) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != asdf2) {
if (_root.activeplayers[i].PLAYERNUMBER != Math.floor(asdf / 1000) && _root.activeplayers[i].frame.hitTest(_x, _y, true)) {
if (_root.activeplayers[i].shieldtime == 0) {
_root.activeplayers[i].vx += firepower * facing * _root.activeplayers[i].damagemulti;
} else {
_root.activeplayers[i].vx += firepower * facing * 0.33;
_root.activeplayers[i].shield.gotoAndPlay(23);
}
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.hitsound();
j = 0;
while (j < 3) {
_root.CP('fx_blood', _x, _y, 0, 0);
if (_root.activeplayers[i].iszombie && j == 1) {
break;
}
++j;
}
_root.CP('fx_bloodstain', _x + speed, _y, 0, 0);
if (firepower >= 40) {
_root.CP('fx_combo', _x + speed, _y - 50, 0, -1);
} else {
_root.CP('fx_combo', _x + speed, _y - 50, 0, qwer);
}
tagplayer(_root.activeplayers[i]);
deletethis();
}
if (_root.activeplayers[i].AI) {
if (_root.activeplayers[i].frame.hitTest(_x + speed * 4, _y, true) || _root.activeplayers[i].frame.hitTest(_x + speed * 6, _y, true)) {
if (_root.activeplayers[i].jumpnum == 2) {
_root.activeplayers[i].KEYUP = true;
}
if (firepower >= 40 && _root.activeplayers[i].vy > -8 && _root.activeplayers[i].jumpnum == 1) {
_root.activeplayers[i].KEYUP = true;
}
}
}
}
++i;
}
}
if (_x < -600 || _x > 1500) {
deletethis();
}
time += 1;
if (time >= 3 && trail._alpha < 100) {
trail._alpha += 50;
}
if (trail._width < 100) {
trail._width += 10;
}
} else {
_alpha = _alpha - 25;
if (_alpha <= 1) {
deletethis();
}
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 370 bullet2 {
frame 1 {
function shotgunhit(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
_root.pgsdata[0][4] += 1;
break;
case 2:
_root.pgsdata[1][4] += 1;
break;
case 3:
_root.pgsdata[2][4] += 1;
break;
case 4:
_root.pgsdata[3][4] += 1;
}
mc.hitbynade = false;
}
function tagplayer(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
mc.gothitby = _root.p1name;
break;
case 2:
mc.gothitby = _root.p2name;
break;
case 3:
mc.gothitby = _root.p3name;
break;
case 4:
mc.gothitby = _root.p4name;
}
mc.hitbynade = false;
}
function dothehittest() {
if (!freepass) {
if (_root.ground.hitTest(_x, _y, true)) {
_x = _x - speed;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x + i * (speed / 5), _y, true)) {
_x = _x + (speed / 5) * (i - 1);
break;
}
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_spark', _x, _y, 0);
_root.CP('fx_debris', _x, _y, 0);
++i;
}
removethis = true;
}
}
}
function deletethis() {
removeMovieClip(this);
delete this.onEnterFrame;
}
speed = 25 + random(6) - 3;
facing = 1;
vx = Math.cos(_rotation * Math.PI / 180) * speed;
vy = Math.sin(_rotation * Math.PI / 180) * speed;
if (_rotation > 90 || _rotation < -90) {
facing = -1;
}
time = 1;
trail._alpha = 0;
freepass = false;
firepower = Math.abs(asdf % 1000);
time = 0;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!removethis) {
_x = _x + vx;
_y = _y + vy;
if (!removethis) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != asdf2) {
if (_root.activeplayers[i].PLAYERNUMBER != Math.floor(asdf / 1000) && _root.activeplayers[i].frame.hitTest(_x, _y, true)) {
if (_root.activeplayers[i].shieldtime == 0) {
_root.activeplayers[i].vx += firepower * facing * _root.activeplayers[i].damagemulti;
} else {
_root.activeplayers[i].vx += firepower * facing * 0.33;
_root.activeplayers[i].shield.gotoAndPlay(23);
}
_root.activeplayers[i].hitnumber += 1;
shotgun = _root.activeplayers[i].hitnumber;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.CP('fx_blood', _x, _y, 0, 0);
_root.CP('fx_bloodstain', _x + speed, _y, 0, 0);
if (shotgun == 6 && firepower >= 7) {
_root.CP('fx_combo', _x + speed, _y - 50, 0, -4);
} else {
if (shotgun == 1) {
_root.hitsound();
_root.CP('fx_combo', _x + speed, _y - 50, 0, qwer);
shotgunhit(_root.activeplayers[i]);
}
}
tagplayer(_root.activeplayers[i]);
deletethis();
}
}
++i;
}
}
if (_x < -600 || _x > 1500) {
deletethis();
}
time += 1;
if (time == 5) {
trail._alpha = 100;
}
if (firepower >= 7) {
if (time > 6) {
_alpha = _alpha - 25;
}
if (time > 9) {
deletethis();
}
} else {
if (time > 8) {
_alpha = _alpha - 25;
}
if (time > 11) {
deletethis();
}
}
if (trail._width > 20) {
trail._width -= 20;
}
} else {
_alpha = _alpha - 25;
if (_alpha <= 1) {
deletethis();
}
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 377 {
}
movieClip 378 bullet3 {
frame 1 {
function tagplayer(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
mc.gothitby = _root.p1name;
_root.pgsdata[0][4] += 1;
break;
case 2:
mc.gothitby = _root.p2name;
_root.pgsdata[1][4] += 1;
break;
case 3:
mc.gothitby = _root.p3name;
_root.pgsdata[2][4] += 1;
break;
case 4:
mc.gothitby = _root.p4name;
_root.pgsdata[3][4] += 1;
}
mc.hitbynade = false;
}
function dothehittest() {
if (!freepass) {
if (_root.ground.hitTest(_x, _y, true)) {
_x = _x - speed;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x + i * (speed / 5), _y, true)) {
_x = _x + (speed / 5) * (i - 1);
break;
}
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_spark', _x, _y, 0);
_root.CP('fx_debris', _x, _y, 0);
++i;
}
removethis = true;
}
}
}
function deletethis() {
removeMovieClip(this);
delete this.onEnterFrame;
}
speed = 25;
facing = 1;
if (_rotation != 0) {
speed *= -1;
facing = -1;
}
time = 1;
freepass = false;
firepower = Math.abs(asdf % 1000);
if (firepower > 60) {
trail.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!removethis) {
fx._xscale = random(50) + 50;
fx._yscale = fx._xscale;
_x = _x + speed;
_root.CP('fx_instatrail', _x, _y, -90 + facing * 90, 0);
if (!removethis) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != asdf2) {
if (_root.activeplayers[i].PLAYERNUMBER != Math.floor(asdf / 1000) && _root.activeplayers[i].frame.hitTest(_x, _y, true)) {
_root.activeplayers[i].vx += firepower * facing * _root.activeplayers[i].damagemulti;
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.CP('fx_combo', _x + speed, _y - 50, 0, qwer);
gotkilled();
tagplayer(_root.activeplayers[i]);
_root.activeplayers[i].instagib.play();
deletethis();
}
if (_root.activeplayers[i].AI) {
if (_root.activeplayers[i].frame.hitTest(_x + speed * 4, _y, true) || _root.activeplayers[i].frame.hitTest(_x + speed * 6, _y, true)) {
if (_root.activeplayers[i].jumpnum == 2) {
_root.activeplayers[i].KEYUP = true;
}
if (firepower >= 10 && _root.activeplayers[i].vy > -8 && _root.activeplayers[i].jumpnum == 1) {
_root.activeplayers[i].KEYUP = true;
}
}
}
}
++i;
}
}
if (_x < -600 || _x > 1500) {
deletethis();
}
if (trail._alpha < 100) {
trail._alpha += 33;
}
if (trail._width < 100) {
trail._width += 10;
}
} else {
_alpha = _alpha - 25;
if (_alpha <= 1) {
deletethis();
}
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 379 bullet4 {
frame 1 {
function tagplayer(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
mc.gothitby = _root.p1name;
_root.pgsdata[0][4] += 1;
break;
case 2:
mc.gothitby = _root.p2name;
_root.pgsdata[1][4] += 1;
break;
case 3:
mc.gothitby = _root.p3name;
_root.pgsdata[2][4] += 1;
break;
case 4:
mc.gothitby = _root.p4name;
_root.pgsdata[3][4] += 1;
}
mc.hitbynade = false;
}
function dothehittest() {
if (!freepass) {
if (_root.ground.hitTest(_x, _y, true)) {
_x = _x - speed;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x + i * (speed / 5), _y, true)) {
_x = _x + (speed / 5) * (i - 1);
break;
}
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_spark', _x, _y, 0);
_root.CP('fx_debris', _x, _y, 0);
++i;
}
removethis = true;
}
}
}
function deletethis() {
removeMovieClip(this);
delete this.onEnterFrame;
}
speed = 25;
facing = 1;
if (_rotation != 0) {
speed *= -1;
facing = -1;
}
time = 1;
trail._width = 20;
trail._alpha = 0;
freepass = false;
firepower = Math.abs(asdf % 1000);
if (firepower > 50) {
trail.gotoAndStop(2);
}
_alpha = 0;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!removethis) {
_x = _x + speed;
if (!removethis) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != asdf2) {
if (_root.activeplayers[i].PLAYERNUMBER != Math.floor(asdf / 1000) && _root.activeplayers[i].frame.hitTest(_x, _y, true)) {
if (_root.activeplayers[i].shieldtime == 0) {
_root.activeplayers[i].vx += firepower * facing * _root.activeplayers[i].damagemulti;
} else {
_root.activeplayers[i].vx += firepower * facing * 0.33;
_root.activeplayers[i].shield.gotoAndPlay(23);
}
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.hitsound();
tagplayer(_root.activeplayers[i]);
deletethis();
}
}
++i;
}
}
_alpha = _alpha - 100;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < -600 || _x > 1500) {
deletethis();
}
} else {
_alpha = _alpha - 25;
if (_alpha <= 1) {
deletethis();
}
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 382 bullet5_grenade {
frame 1 {
function blowup() {
switch (Math.floor(asdf / 1000)) {
case 1:
immunity = 1;
break;
case 2:
immunity = 2;
break;
case 3:
immunity = 3;
break;
case 4:
immunity = 4;
}
i = 0;
while (i < _root.activeplayers.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance <= 200) {
radians = Math.atan2(_root.activeplayers[i]._y - 30 - _y, _root.activeplayers[i]._x - _x);
degrees = radians * 180 / Math.PI;
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 5;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 10;
if (_root.activeplayers[i].PLAYERNUMBER == immunity) {
pushx *= 0.5;
pushy *= 0.5;
}
_root.activeplayers[i].vx += pushx;
_root.activeplayers[i].vy += pushy;
switch (Math.floor(asdf / 1000)) {
case 1:
_root.activeplayers[i].gothitby = _root.p1name;
break;
case 2:
_root.activeplayers[i].gothitby = _root.p2name;
break;
case 3:
_root.activeplayers[i].gothitby = _root.p3name;
break;
case 4:
_root.activeplayers[i].gothitby = _root.p4name;
}
_root.activeplayers[i].hitbynade = true;
}
++i;
}
shake = random(30) + 20;
if (random(2) == 0) {
shake *= -1;
}
_root._x += shake;
_root.CP('fx_ex6', _x, _y - 20, 0);
_root.CP('fx_ex2', _x, _y - 20, 0);
_root.CP('fx_ex', _x, _y - 20, 0);
_root.CP('fx_ex4', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
_root.CP('fx_combo', _x, _y - 50, 0, -2);
removeMovieClip(this);
delete this.onEnterFrame;
}
stop();
firepower = Math.abs(asdf % 1000);
firepower = 20;
vx = _rotation * firepower;
vy = -8;
if (firepower < 0) {
vy += firepower;
}
fusetime = 0;
_rotation = random(360);
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
freepass = false;
hitground = false;
_xscale = 80;
_yscale = 80;
this.onEnterFrame = function () {
_rotation = _rotation + rotationspeed;
if (vy < 24) {
vy += _root.gravity + 0.12;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.hitTest(_x, _y + 8, true) && vy > 0) {
_y = _y - vy;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x, _y + 8 + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 1);
vx *= 0.8;
vy *= -0.8;
break;
}
++i;
}
}
}
i = 0;
while (i < _root.activeplayers.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < 40) {
blowup();
}
++i;
}
if (!_root.ground.hitTest(_x, _y, true) && !_root.ground.hitTest(_x, _y + 10, true)) {
freepass = false;
}
if (_root.ground.hitTest(_x, _y, true) && !freepass) {
freepass = true;
}
fusetime += 1;
if (fusetime > 40) {
blowup();
}
if (_y >= 900 || _x < -500 || _x > 1400 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 6 {
gotoAndPlay(2);
}
}
movieClip 383 bullet6 {
frame 1 {
function tagplayer(mc) {
switch (Math.floor(asdf / 1000)) {
case 1:
mc.gothitby = _root.p1name;
_root.pgsdata[0][4] += 1;
break;
case 2:
mc.gothitby = _root.p2name;
_root.pgsdata[1][4] += 1;
break;
case 3:
mc.gothitby = _root.p3name;
_root.pgsdata[2][4] += 1;
break;
case 4:
mc.gothitby = _root.p4name;
_root.pgsdata[3][4] += 1;
}
mc.hitbynade = false;
}
function dothehittest() {
if (!freepass) {
if (_root.ground.hitTest(_x, _y, true)) {
_x = _x - speed;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x + i * (speed / 5), _y, true)) {
_x = _x + (speed / 5) * (i - 1);
break;
}
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_spark', _x, _y, 0);
_root.CP('fx_debris', _x, _y, 0);
++i;
}
removethis = true;
}
}
}
function deletethis() {
removeMovieClip(this);
delete this.onEnterFrame;
}
speed = 25;
facing = 1;
if (_rotation != 0) {
speed *= -1;
facing = -1;
}
time = 1;
trail._width = 20;
trail._alpha = 0;
freepass = false;
firepower = Math.abs(asdf % 1000);
if (firepower > 50) {
trail.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!removethis) {
_x = _x + speed;
if (!removethis) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != asdf2) {
if (_root.activeplayers[i].PLAYERNUMBER != Math.floor(asdf / 1000) && _root.activeplayers[i].frame.hitTest(_x, _y, true)) {
if (_root.activeplayers[i].shieldtime == 0) {
_root.activeplayers[i].vx += firepower * facing * _root.activeplayers[i].damagemulti;
} else {
_root.activeplayers[i].vx += firepower * facing * 0.3;
_root.activeplayers[i].shield.gotoAndPlay(23);
}
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.hitsound();
j = 0;
while (j < 2) {
_root.CP('fx_blood', _x, _y, 0, 0);
if (_root.activeplayers[i].iszombie && j == 1) {
break;
}
++j;
}
_root.CP('fx_bloodstain', _x + speed, _y, 0, 0);
if (firepower >= 40) {
_root.CP('fx_combo', _x + speed, _y - 50, 0, -1);
} else {
_root.CP('fx_combo', _x + speed, _y - 50, 0, qwer);
}
tagplayer(_root.activeplayers[i]);
deletethis();
}
}
++i;
}
}
if (_x < -600 || _x > 1500) {
deletethis();
}
time += 1;
if (time >= 5 && trail._alpha < 100) {
trail._alpha += 50;
}
if (trail._width < 80) {
trail._width += 10;
}
} else {
_alpha = _alpha - 25;
if (_alpha <= 1) {
deletethis();
}
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
// unknown tag 88 length 64
movieClip 399 hud_killfeed {
frame 1 {
_alpha = 0;
time = 0;
if (mckiller != 'none') {
messagebox.text = mckiller;
messagebox3.text = mcname;
messagebox2._x = mckiller.length * 11 + 23;
if (_currentframe == 1) {
messagebox2.text = 'KILLED';
messagebox3._x = messagebox2._x + 80;
} else {
if (_currentframe == 3) {
messagebox2.text = 'CHEAPSHOT\'d';
messagebox3._x = messagebox2._x + 140;
} else {
if (_currentframe == 4) {
messagebox2.text = 'EXPLODED';
messagebox3._x = messagebox2._x + 110;
} else {
if (_currentframe == 5) {
messagebox2.text = 'GREEDYKILLED';
messagebox3._x = messagebox2._x + 150;
}
}
}
}
} else {
messagebox.text = mcname;
}
stop();
this.onEnterFrame = function () {
time += 1;
_y = _y + ((feednumber - 1) * 30 - _y) / 3;
if (time <= 10 && _alpha < 100) {
_alpha = _alpha + 10;
}
if (time > 110) {
_alpha = _alpha - 10;
if (_alpha <= 1) {
--_parent.feednumber;
_parent.scrollup = true;
removeMovieClip(this);
delete this.onEnterFrame;
}
}
if (_parent.scrollup) {
feednumber -= 1;
}
};
}
}
movieClip 406 hud_wavedisplay {
}
movieClip 409 {
}
movieClip 413 {
}
movieClip 415 {
}
movieClip 416 gun_m1911 {
frame 1 {
shootx = 25;
shooty = 2;
handx = 30;
handy = -5;
shellX = 25;
flashX = 45;
Name = 'COOL PISTOL';
_parent._parent.rof = 10;
_parent._parent.firepower = 20;
_parent._parent.recoil = 1;
_parent._parent.blowback = 30;
_parent._parent.bullets = 9;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 1;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
_parent._parent.ejectshell();
}
frame 7 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
_parent._parent.ejectshell();
}
frame 19 {
_root.CP('fx_dropmag', _parent._parent._x + (_parent._parent.hand1.hand._x - 5) * _parent._parent.facing, _parent._parent._y - 20, 0, 0);
}
frame 49 {
_root.playsound('pistol_mag.wav');
}
frame 57 {
_root.playsound('pistol_slide.wav');
}
frame 60 {
gotoAndPlay(2);
_parent._parent.bullets = 9;
_parent._parent.idletime = 20;
_parent._parent.adjustrof2();
}
}
movieClip 418 {
}
movieClip 421 {
}
movieClip 422 gun_deagle {
frame 1 {
shootx = 25;
shooty = 2;
handx = 30;
handy = -5;
shellX = 20;
flashX = 47;
Name = 'SAND HAWK';
_parent._parent.rof = 13;
_parent._parent.firepower = 24;
_parent._parent.recoil = 2;
_parent._parent.blowback = 30;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 0.95;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
_parent._parent.ejectshell();
}
frame 6 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
_parent._parent.ejectshell();
_root.playsound('pistol_slide.wav');
}
frame 28 {
asdf = _parent._parent;
_root.CP('fx_deagle', asdf._x + (asdf.hand1.hand._x + 30) * asdf.facing, asdf._y - 55, -60 * asdf.facing, asdf.facing);
}
frame 70 {
gotoAndPlay(2);
_parent._parent.bullets = 7;
_parent._parent.idletime = 20;
_parent._parent.adjustrof2();
}
}
movieClip 425 {
}
movieClip 427 {
}
movieClip 429 {
}
movieClip 431 {
}
movieClip 433 {
}
movieClip 434 gun_glock {
frame 1 {
shootx = 25;
shooty = 2;
handx = 30;
handy = -5;
shellX = 25;
flashX = 45;
Name = 'SINE PISTOL';
_parent._parent.rof = 6;
_parent._parent.firepower = 16;
_parent._parent.recoil = 0.7;
_parent._parent.blowback = 20;
_parent._parent.bullets = 17;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 1;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
_parent._parent.ejectshell();
}
frame 6 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
_parent._parent.ejectshell();
}
frame 12 {
_root.CP('fx_dropmag2', _parent._parent._x + (_parent._parent.hand1.hand._x - 5) * _parent._parent.facing, _parent._parent._y - 20, 0, 0);
}
frame 42 {
_root.playsound('pistol_mag.wav');
}
frame 60 {
_root.playsound('pistol_slide.wav');
}
frame 75 {
gotoAndPlay(2);
_parent._parent.bullets = 17;
_parent._parent.idletime = 20;
_parent._parent.adjustrof2();
}
}
movieClip 437 {
}
movieClip 439 {
}
movieClip 441 {
}
movieClip 442 gun_bull {
frame 1 {
shootx = 23;
shooty = 2;
handx = 28;
handy = -5;
shellX = 25;
flashX = 45;
Name = 'ANGRY COW';
_parent._parent.rof = 16;
_parent._parent.firepower = 30;
_parent._parent.recoil = 3;
_parent._parent.blowback = 30;
_parent._parent.bullets = 6;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.95;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
}
frame 22 {
_root.playsound('pistol_mag.wav');
}
frame 26 {
asdf = _parent._parent;
i = 0;
while (i < 6) {
_root.CP('fx_shell4', asdf._x + (asdf.hand1.hand._x + 4) * asdf.facing, asdf._y - 38, -60 * asdf.facing, asdf.facing);
++i;
}
}
frame 64 {
_root.playsound('pistol_slide.wav');
}
frame 64 {
_root.CP('fx_speedloader', asdf._x + (asdf.hand1.hand._x + 4) * asdf.facing, asdf._y - 38, -60 * asdf.facing, asdf.facing);
}
frame 70 {
gotoAndPlay(2);
_parent._parent.bullets = 6;
_parent._parent.idletime = 20;
_parent._parent.adjustrof2();
}
}
movieClip 445 {
}
movieClip 446 {
}
movieClip 448 {
}
movieClip 450 {
}
movieClip 451 gun_49 {
frame 1 {
shootx = 25;
shooty = 2;
handx = 30;
handy = -5;
shellX = 25;
flashX = 45;
Name = 'FIFTY EIGHT';
_parent._parent.rof = 8;
_parent._parent.firepower = 18;
_parent._parent.recoil = 1;
_parent._parent.blowback = 30;
_parent._parent.bullets = 16;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 1;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
_parent._parent.ejectshell();
}
frame 7 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
_parent._parent.ejectshell();
_root.CP('fx_dropmag3', _parent._parent._x + (_parent._parent.hand1.hand._x - 5) * _parent._parent.facing, _parent._parent._y - 20, 0, 0);
}
frame 47 {
_root.playsound('pistol_slide.wav');
}
frame 68 {
_root.playsound('pistol_mag.wav');
}
frame 74 {
gotoAndPlay(2);
_parent._parent.bullets = 16;
_parent._parent.idletime = 20;
_parent._parent.adjustrof2();
}
}
movieClip 454 {
}
movieClip 456 {
}
movieClip 457 gun_python {
frame 1 {
shootx = 23;
shooty = 2;
handx = 28;
handy = -5;
shellX = 25;
flashX = 50;
Name = 'SNAKE';
_parent._parent.rof = 22;
_parent._parent.firepower = 36;
_parent._parent.recoil = 5;
_parent._parent.blowback = 40;
_parent._parent.bullets = 6;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.95;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
_parent.hand._alpha = 100;
}
frame 3 {
gotoAndPlay(2);
}
frame 10 {
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
}
frame 23 {
_root.playsound('pistol_mag.wav');
}
frame 31 {
asdf = _parent._parent;
i = 0;
while (i < 6) {
_root.CP('fx_shell4', asdf._x + (asdf.hand1.hand._x + 4) * asdf.facing, asdf._y - 38, -60 * asdf.facing, asdf.facing);
++i;
}
}
frame 80 {
_root.playsound('pistol_slide.wav');
}
frame 80 {
_root.CP('fx_speedloader', asdf._x + (asdf.hand1.hand._x + 4) * asdf.facing, asdf._y - 38, -60 * asdf.facing, asdf.facing);
}
frame 86 {
gotoAndPlay(2);
_parent._parent.bullets = 6;
_parent._parent.idletime = 20;
}
}
movieClip 459 {
}
movieClip 461 gun_instagib {
frame 1 {
shootx = 12;
shooty = 0;
handx = 42;
handy = -14;
shellX = 20;
flashX = 65;
Name = 'DE- MATERIALIZER';
_parent._parent.rof = 12;
_parent._parent.firepower = 25;
_parent._parent.recoil = 7;
_parent._parent.blowback = 20;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 40;
_parent._parent.weight = 1;
}
frame 2 {
stop();
}
frame 10 {
gotoAndPlay(2);
}
}
movieClip 463 gun_ak47 {
frame 1 {
shootx = 12;
shooty = -1;
handx = 42;
handy = -14;
shellX = 20;
flashX = 75;
Name = 'CLASSIC ASSAULT RIFLE';
_parent._parent.rof = 4;
_parent._parent.firepower = 22;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 465 gun_hk {
frame 1 {
shootx = 10;
shooty = 1;
handx = 42;
handy = -11;
shellX = 20;
flashX = 70;
Name = 'COOL SNIPER';
_parent._parent.rof = 31;
_parent._parent.firepower = 60;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 10 {
_root.playsound('bolt1.wav');
}
frame 16 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 467 gun_mp5k {
frame 1 {
shootx = 10;
shooty = 3;
handx = 42;
handy = -11;
shellX = 20;
flashX = 45;
Name = 'SHORT SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 17;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.95;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 470 {
}
movieClip 471 gun_ithaca {
frame 1 {
shootx = 2;
shooty = -3;
handx = 48;
handy = -12;
shellX = 20;
flashX = 55;
Name = 'SAWED OFF SHOTGUN';
_parent._parent.rof = 25;
_parent._parent.firepower = 8;
_parent._parent.recoil = 5;
_parent._parent.blowback = 20;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 14 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot();
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 473 gun_scar {
frame 1 {
shootx = 12;
shooty = -1;
handx = 48;
handy = -14;
shellX = 20;
flashX = 72;
Name = 'MILITARY SNIPER';
_parent._parent.rof = 13;
_parent._parent.firepower = 58;
_parent._parent.recoil = 1.5;
_parent._parent.blowback = 8;
_parent._parent.bullets = 8;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell2();
gotoAndPlay(2);
}
}
movieClip 475 gun_usas {
frame 1 {
shootx = 12;
shooty = 3;
handx = 49;
handy = -11;
shellX = 20;
flashX = 60;
Name = 'FAT SHOTGUN';
_parent._parent.rof = 6;
_parent._parent.firepower = 5;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 12;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.75;
shotgun = 7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshot();
gotoAndPlay(2);
}
}
movieClip 477 gun_501 {
frame 1 {
shootx = 15;
shooty = 1;
handx = 47;
handy = -11;
shellX = 20;
flashX = 85;
Name = 'CLASSIC SNIPER';
_parent._parent.rof = 25;
_parent._parent.firepower = 56;
_parent._parent.recoil = 8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 6;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.75;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 7 {
_root.playsound('bolt1.wav');
}
frame 13 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 23 {
gotoAndPlay(2);
}
}
movieClip 479 {
}
movieClip 481 gun_lever {
frame 1 {
shootx = 2;
shooty = 0;
handx = 40;
handy = -12;
shellX = 20;
flashX = 55;
Name = 'LEVER SHOTGUN';
_parent._parent.rof = 18;
_parent._parent.firepower = 8;
_parent._parent.recoil = 5;
_parent._parent.blowback = 10;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.8;
shotgun = 7;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 6 {
_parent.hand._alpha = 0;
}
frame 8 {
_root.playsound('bolt2.wav');
}
frame 12 {
_parent._parent.ejectshot();
}
frame 17 {
gotoAndPlay(2);
}
}
movieClip 483 gun_p90 {
frame 1 {
shootx = 30;
shooty = -5;
handx = 45;
handy = -11;
shellX = 5;
flashX = 65;
Name = 'TACTICAL SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 14;
_parent._parent.recoil = 0.3;
_parent._parent.blowback = 5;
_parent._parent.bullets = 50;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell3();
gotoAndPlay(2);
}
}
movieClip 485 gun_m17 {
frame 1 {
shootx = 23;
shooty = -1;
handx = 51;
handy = -11;
shellX = -3;
flashX = 58;
Name = 'BULLPUP ASSAULT RIFLE';
_parent._parent.rof = 4;
_parent._parent.firepower = 22;
_parent._parent.recoil = 0.5;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 487 gun_bizon {
frame 1 {
shootx = 10;
shooty = 3;
handx = 42;
handy = -11;
shellX = 20;
flashX = 50;
Name = 'COMPACT SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 14;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 48;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 489 gun_tommy {
frame 1 {
shootx = 10;
shooty = 1;
handx = 42;
handy = -11;
shellX = 20;
flashX = 60;
Name = 'MAFIA SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 25;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 8;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 491 gun_ump {
frame 1 {
shootx = 15;
shooty = 3;
handx = 47;
handy = -12;
shellX = 25;
flashX = 50;
Name = 'SLICK SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 21;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 25;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 493 gun_augsmg {
frame 1 {
shootx = 25;
shooty = 2;
handx = 47;
handy = -10;
shellX = 0;
flashX = 53;
Name = 'BULLPUP SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 495 gun_mp5a3 {
frame 1 {
shootx = 10;
shooty = 3;
handx = 42;
handy = -13;
shellX = 20;
flashX = 55;
Name = 'POLICE SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 18;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 497 gun_lusa {
frame 1 {
shootx = 15;
shooty = 3;
handx = 42;
handy = -12;
shellX = 25;
flashX = 50;
Name = 'LOSER SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 4;
_parent._parent.recoil = 0.2;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.6;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 499 gun_m12 {
frame 1 {
shootx = 15;
shooty = 3;
handx = 47;
handy = -12;
shellX = 25;
flashX = 50;
Name = 'LIGHT SMG';
_parent._parent.rof = 4;
_parent._parent.firepower = 15;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 32;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 501 gun_mas38 {
frame 1 {
shootx = 18;
shooty = 2;
handx = 40;
handy = -12;
shellX = 25;
flashX = 55;
Name = 'ANTIQUE SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 15;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 32;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 503 gun_aksu {
frame 1 {
shootx = 18;
shooty = -2;
handx = 52;
handy = -14;
shellX = 25;
flashX = 60;
Name = 'COMPACT ASSAULT RIFLE';
_parent._parent.rof = 4;
_parent._parent.firepower = 22;
_parent._parent.recoil = 1;
_parent._parent.blowback = 10;
_parent._parent.bullets = 25;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 5;
_parent._parent.weight = 0.85;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 505 gun_kriss {
frame 1 {
shootx = 15;
shooty = -6;
handx = 51;
handy = -12;
shellX = 25;
flashX = 53;
Name = 'ADVANCED SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 16;
_parent._parent.recoil = 0.2;
_parent._parent.blowback = 5;
_parent._parent.bullets = 28;
_parent._parent.idlerotate = 20;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 507 gun_mp9 {
frame 1 {
shootx = 20;
shooty = 3;
handx = 43;
handy = -10;
shellX = 17;
flashX = 45;
Name = 'MICRO SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 15;
_parent._parent.recoil = 0.5;
_parent._parent.blowback = 10;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.95;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 509 gun_mas {
frame 1 {
shootx = 18;
shooty = 2;
handx = 40;
handy = -12;
shellX = 25;
flashX = 55;
Name = 'OLD SMG';
_parent._parent.rof = 3;
_parent._parent.firepower = 15;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 10;
_parent._parent.bullets = 32;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 3;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 511 gun_awm {
frame 1 {
shootx = 10;
shooty = 1;
handx = 42;
handy = -11;
shellX = 25;
flashX = 75;
Name = 'MODERN SNIPER';
_parent._parent.rof = 31;
_parent._parent.firepower = 63;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 10 {
_root.playsound('bolt1.wav');
}
frame 16 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 513 gun_hecate {
frame 1 {
shootx = 10;
shooty = 3;
handx = 47;
handy = -11;
shellX = 20;
flashX = 85;
Name = 'HI-POWER SNIPER';
_parent._parent.rof = 31;
_parent._parent.firepower = 70;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.65;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 10 {
_root.playsound('bolt1.wav');
}
frame 16 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 515 gun_m95 {
frame 1 {
shootx = 20;
shooty = 1;
handx = 42;
handy = -11;
shellX = -5;
flashX = 85;
Name = 'BULLPUP SNIPER';
_parent._parent.rof = 31;
_parent._parent.firepower = 63;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = 25;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 7 {
_root.playsound('bolt1.wav');
}
frame 16 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 517 gun_dsr {
frame 1 {
shootx = 20;
shooty = 1;
handx = 42;
handy = -11;
shellX = -5;
flashX = 75;
Name = 'TACTICAL SNIPER';
_parent._parent.rof = 31;
_parent._parent.firepower = 60;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.75;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 9 {
_root.playsound('bolt1.wav');
}
frame 16 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 30 {
gotoAndPlay(2);
}
}
movieClip 519 gun_ssg69 {
frame 1 {
shootx = 10;
shooty = -3;
handx = 42;
handy = -11;
shellX = 25;
flashX = 75;
Name = 'RELIABLE SNIPER';
_parent._parent.rof = 25;
_parent._parent.firepower = 60;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 6 {
_root.playsound('bolt1.wav');
}
frame 13 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 521 gun_lrs2 {
frame 1 {
shootx = 13;
shooty = 1;
handx = 42;
handy = -11;
shellX = 25;
flashX = 75;
Name = 'ASSASSIN SNIPER';
_parent._parent.rof = 25;
_parent._parent.firepower = 60;
_parent._parent.recoil = 10;
_parent._parent.blowback = 10;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.9;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 3 {
_parent.hand._alpha = 0;
}
frame 6 {
_root.playsound('bolt1.wav');
}
frame 13 {
_parent._parent.ejectshell2();
_root.playsound('bolt2.wav');
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 523 gun_galatz {
frame 1 {
shootx = 12;
shooty = -1;
handx = 40;
handy = -16;
shellX = 20;
flashX = 77;
Name = 'RAPID SNIPER';
_parent._parent.rof = 15;
_parent._parent.firepower = 51;
_parent._parent.recoil = 1.2;
_parent._parent.blowback = 8;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell2();
gotoAndPlay(2);
}
}
movieClip 525 gun_vss {
frame 1 {
shootx = 15;
shooty = -3;
handx = 45;
handy = -16;
shellX = 20;
flashX = 77;
Name = 'STEALTH SNIPER';
_parent._parent.rof = 15;
_parent._parent.firepower = 56;
_parent._parent.recoil = 1.2;
_parent._parent.blowback = 8;
_parent._parent.bullets = 10;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell2();
gotoAndPlay(2);
}
}
movieClip 527 gun_m76 {
frame 1 {
shootx = 12;
shooty = -2;
handx = 50;
handy = -16;
shellX = 20;
flashX = 79;
Name = 'RUGGED SNIPER';
_parent._parent.rof = 12;
_parent._parent.firepower = 55;
_parent._parent.recoil = 1.2;
_parent._parent.blowback = 8;
_parent._parent.bullets = 10;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell2();
gotoAndPlay(2);
}
}
movieClip 529 gun_sr25 {
frame 1 {
shootx = 12;
shooty = 3;
handx = 50;
handy = -12;
shellX = 20;
flashX = 79;
Name = 'AMERICAN SNIPER';
_parent._parent.rof = 12;
_parent._parent.firepower = 55;
_parent._parent.recoil = 1.5;
_parent._parent.blowback = 8;
_parent._parent.bullets = 8;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell2();
gotoAndPlay(2);
}
}
movieClip 531 gun_leversniper {
frame 1 {
shootx = 7;
shooty = 0;
handx = 45;
handy = -12;
shellX = 25;
flashX = 60;
Name = 'LEVER SNIPER';
_parent._parent.rof = 18;
_parent._parent.firepower = 60;
_parent._parent.recoil = 5;
_parent._parent.blowback = 10;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
_parent.hand._alpha = 100;
}
frame 6 {
_parent.hand._alpha = 0;
}
frame 8 {
_root.playsound('bolt1.wav');
}
frame 12 {
_parent._parent.ejectshell2();
}
frame 13 {
_root.playsound('bolt1.wav');
}
frame 17 {
gotoAndPlay(2);
}
}
movieClip 533 {
}
movieClip 535 {
}
movieClip 537 {
}
movieClip 538 gun_sawnoff {
frame 1 {
shootx = 6;
shooty = -3;
handx = 48;
handy = -12;
shellX = 20;
flashX = 40;
Name = 'GANGSTER SHOTGUN';
_parent._parent.rof = 40;
_parent._parent.firepower = 10;
_parent._parent.recoil = 8;
_parent._parent.blowback = 4;
_parent._parent.bullets = 4;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.75;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 6 {
_root.playsound('bolt1.wav');
}
frame 7 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 11 {
_parent._parent.ejectshot();
_parent._parent.ejectshot();
}
frame 23 {
_root.playsound('bolt2.wav');
}
frame 39 {
gotoAndPlay(2);
}
}
movieClip 541 {
}
movieClip 542 gun_ksg {
frame 1 {
shootx = 16;
shooty = 2;
handx = 58;
handy = -7;
shellX = 0;
flashX = 50;
Name = 'TACTICAL SHOTGUN';
_parent._parent.rof = 24;
_parent._parent.firepower = 8;
_parent._parent.recoil = 5;
_parent._parent.blowback = 20;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.8;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 15 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot3();
}
frame 23 {
gotoAndPlay(2);
}
}
movieClip 544 gun_aa12 {
frame 1 {
shootx = 12;
shooty = 3;
handx = 49;
handy = -15;
shellX = 20;
flashX = 60;
Name = 'FULL AUTO SHOTGUN';
_parent._parent.rof = 6;
_parent._parent.firepower = 6;
_parent._parent.recoil = 0.2;
_parent._parent.blowback = 8;
_parent._parent.bullets = 12;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.75;
shotgun = 7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshot();
gotoAndPlay(2);
}
}
movieClip 546 gun_jackhammer {
frame 1 {
shootx = 23;
shooty = 3;
handx = 52;
handy = -12;
shellX = -1;
flashX = 62;
Name = 'PROTOTYPE SHOTGUN';
_parent._parent.rof = 6;
_parent._parent.firepower = 8;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 8;
_parent._parent.bullets = 10;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 15;
_parent._parent.weight = 0.7;
shotgun = 7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshot3();
gotoAndPlay(2);
}
}
movieClip 549 {
}
movieClip 550 gun_pm12 {
frame 1 {
shootx = 2;
shooty = -1;
handx = 58;
handy = -11;
shellX = 20;
flashX = 55;
Name = 'AVERAGE SHOTGUN';
_parent._parent.rof = 25;
_parent._parent.firepower = 7;
_parent._parent.recoil = 5;
_parent._parent.blowback = 20;
_parent._parent.bullets = 10;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.8;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 15 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot();
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 553 {
}
movieClip 554 gun_870 {
frame 1 {
shootx = 11;
shooty = -7;
handx = 53;
handy = -13;
shellX = 20;
flashX = 50;
Name = 'CHROME SHOTGUN';
_parent._parent.rof = 25;
_parent._parent.firepower = 8;
_parent._parent.recoil = 5;
_parent._parent.blowback = 20;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.8;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 15 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot();
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 557 {
}
movieClip 558 gun_spas12 {
frame 1 {
shootx = 2;
shooty = 2;
handx = 50;
handy = -10;
shellX = 20;
flashX = 58;
Name = 'ANTI AIRCRAFT GUN';
_parent._parent.rof = 25;
_parent._parent.firepower = 9;
_parent._parent.recoil = 10;
_parent._parent.blowback = 20;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 40;
_parent._parent.weight = 0.7;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 15 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot();
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 560 gun_saiga12 {
frame 1 {
shootx = 12;
shooty = -1;
handx = 52;
handy = -14;
shellX = 20;
flashX = 63;
Name = 'ASSAULT SHOTGUN';
_parent._parent.rof = 12;
_parent._parent.firepower = 7;
_parent._parent.recoil = 3;
_parent._parent.blowback = 10;
_parent._parent.bullets = 8;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.75;
shotgun = 7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshot();
gotoAndPlay(2);
}
}
movieClip 562 gun_saiga20 {
frame 1 {
shootx = 12;
shooty = -4;
handx = 52;
handy = -14;
shellX = 20;
flashX = 63;
Name = 'HUNTING SHOTGUN';
_parent._parent.rof = 12;
_parent._parent.firepower = 6;
_parent._parent.recoil = 2;
_parent._parent.blowback = 10;
_parent._parent.bullets = 7;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 20;
_parent._parent.weight = 0.75;
shotgun = 7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshot();
gotoAndPlay(2);
}
}
movieClip 566 {
}
movieClip 567 gun_spas97 {
frame 1 {
shootx = 2;
shooty = 2;
handx = 55;
handy = -10;
shellX = 20;
flashX = 53;
Name = 'FUTURISTIC SHOTGUN';
_parent._parent.rof = 25;
_parent._parent.firepower = 9;
_parent._parent.recoil = 5;
_parent._parent.blowback = 20;
_parent._parent.bullets = 6;
_parent._parent.idlerotate = -80;
_parent._parent.adjustrof();
_parent._parent.pushback = 40;
_parent._parent.weight = 0.7;
shotgun = 7;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 15 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 18 {
_parent._parent.ejectshot();
}
frame 24 {
gotoAndPlay(2);
}
}
movieClip 569 {
}
movieClip 571 {
frame 1 {
shootx = -10;
shooty = -3;
handx = 40;
handy = -22;
shellX = 20;
flashX = 71;
Name = 'MINIGUN';
_parent._parent.rof = 2;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.5;
_parent._parent.blowback = 0;
_parent._parent.bullets = 150;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.7;
}
}
movieClip 573 gun_g36c {
frame 1 {
shootx = 16;
shooty = -1;
handx = 60;
handy = -12;
shellX = 25;
flashX = 57;
Name = 'SHORT ASSAULT RIFLE';
_parent._parent.rof = 4;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 575 gun_rpk {
frame 1 {
shootx = 7;
shooty = 1;
handx = 50;
handy = -13;
shellX = 15;
flashX = 70;
Name = 'CLASSIC MACHINE GUN';
_parent._parent.rof = 3;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 40;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.75;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 577 gun_sig552 {
frame 1 {
shootx = 7;
shooty = 0;
handx = 42;
handy = -14;
shellX = 21;
flashX = 64;
Name = 'COVERT ASSAULT RIFLE';
_parent._parent.rof = 5;
_parent._parent.firepower = 22;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 579 gun_galil {
frame 1 {
shootx = 12;
shooty = -1;
handx = 48;
handy = -14;
shellX = 20;
flashX = 72;
Name = 'GUERILLA ASSAULT RIFLE';
_parent._parent.rof = 5;
_parent._parent.firepower = 25;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 35;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 582 gun_m4 {
frame 1 {
shootx = 12;
shooty = 2;
handx = 51;
handy = -16;
shellX = 21;
flashX = 62;
Name = 'ASSAULT CARBINE';
_parent._parent.rof = 4;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.85;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 584 gun_hk33 {
frame 1 {
shootx = 7;
shooty = 1;
handx = 50;
handy = -17;
shellX = 15;
flashX = 66;
Name = 'LONG RANGE RIFLE';
_parent._parent.rof = 7;
_parent._parent.firepower = 32;
_parent._parent.recoil = 2;
_parent._parent.blowback = 7;
_parent._parent.bullets = 20;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.75;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 586 gun_f2000 {
frame 1 {
shootx = 23;
shooty = -1;
handx = 47;
handy = -9;
shellX = 40;
flashX = 56;
Name = 'FUTURISTIC ASSAULT RIFLE';
_parent._parent.rof = 4;
_parent._parent.firepower = 25;
_parent._parent.recoil = 0.2;
_parent._parent.blowback = 3;
_parent._parent.bullets = 30;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 5 {
_parent._parent.ejectshell4();
gotoAndPlay(2);
}
}
movieClip 588 gun_scarh {
frame 1 {
shootx = 9;
shooty = 1;
handx = 48;
handy = -15;
shellX = 17;
flashX = 65;
Name = 'HI-POWER RIFLE';
_parent._parent.rof = 7;
_parent._parent.firepower = 34;
_parent._parent.recoil = 2;
_parent._parent.blowback = 7;
_parent._parent.bullets = 20;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.75;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 590 gun_stoner {
frame 1 {
shootx = 14;
shooty = 1;
handx = 50;
handy = -11;
shellX = 19;
flashX = 70;
Name = 'TOP-LOAD MACHINE GUN';
_parent._parent.rof = 3;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 50;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell4();
gotoAndPlay(2);
}
}
movieClip 592 gun_m249 {
frame 1 {
shootx = 14;
shooty = 1;
handx = 50;
handy = -8;
shellX = 19;
flashX = 68;
Name = 'MILITARY MACHINE GUN';
_parent._parent.rof = 3;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 60;
_parent._parent.idlerotate = -70;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell4();
gotoAndPlay(2);
}
}
movieClip 594 gun_hbar {
frame 1 {
shootx = 14;
shooty = 1;
handx = 45;
handy = -11;
shellX = 0;
flashX = 70;
Name = 'BULLPUP MACHINE GUN';
_parent._parent.rof = 3;
_parent._parent.firepower = 18;
_parent._parent.recoil = 0.8;
_parent._parent.blowback = 7;
_parent._parent.bullets = 42;
_parent._parent.idlerotate = -60;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.8;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
gotoAndPlay(2);
}
}
movieClip 595 {
frame 1 {
stop();
}
}
movieClip 596 fx_dropgun {
frame 1 {
if (_rotation < 0) {
_xscale = -100;
}
vx = 5 * _rotation;
vy = -5;
vy = Math.random() * 5 - 10;
dropgun.gotoAndStop(asdf);
rotationspeed = Math.random() * 2 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + rotationspeed;
vy += _root.gravity * 1.3;
if (_y >= 900 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 597 {
}
movieClip 599 gun_mini {
frame 1 {
shootx = -10;
shooty = -3;
handx = 40;
handy = -22;
shellX = 20;
flashX = 71;
Name = 'MINIGUN';
_parent._parent.rof = 2;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0.5;
_parent._parent.blowback = 0;
_parent._parent.bullets = 150;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 10;
_parent._parent.weight = 0.7;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell3();
gotoAndPlay(2);
}
}
movieClip 602 {
}
movieClip 606 gun_m1911weak {
frame 1 {
shootx = 25;
shooty = 2;
handx = 30;
handy = -5;
shellX = 25;
flashX = 45;
Name = 'COOL PISTOL INFINITY';
_parent._parent.rof = 10;
_parent._parent.firepower = 20;
_parent._parent.recoil = 1;
_parent._parent.blowback = 30;
_parent._parent.bullets = 9999;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 1;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
}
frame 7 {
gotoAndPlay(2);
}
}
movieClip 608 {
}
movieClip 610 {
}
movieClip 611 gun_nade1 {
frame 1 {
shootx = 18;
shooty = 6;
handx = 43;
handy = 1;
shellX = 25;
flashX = 30;
Name = 'POLICE GRENADE LAUNCHER';
_parent._parent.rof = 40;
_parent._parent.firepower = 0;
_parent._parent.recoil = 1;
_parent._parent.blowback = 20;
_parent._parent.bullets = 5;
_parent._parent.idlerotate = 30;
_parent._parent.adjustrof();
_parent._parent.pushback = 30;
_parent._parent.weight = 0.85;
home = _parent._parent;
}
frame 2 {
stop();
_parent._parent.hand2.hand._alpha = 100;
}
frame 3 {
_root.CP('fx_flash2', home._x + home.hand1.gun.flashX * home.facing, home._y - 38, -90 + home.facing * 90, 0);
}
frame 7 {
_parent._parent.hand2.hand._alpha = 0;
}
frame 39 {
gotoAndPlay(2);
}
}
movieClip 613 {
}
movieClip 615 {
}
movieClip 617 gun_gloves {
frame 1 {
shootx = -5.5;
shooty = 10.85;
handx = 0;
handy = 0;
shellX = 0;
flashX = 0;
Name = '';
_parent._parent.rof = 12;
_parent._parent.firepower = 20;
_parent._parent.recoil = 0;
_parent._parent.blowback = 0;
_parent._parent.bullets = 9999;
_parent._parent.idlerotate = 0;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
_parent._parent.weight = 1;
_parent._parent.hand2.hand._alpha = 0;
_parent.hand._alpha = 0;
}
frame 2 {
stop();
}
frame 4 {
asdf = _parent._parent;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].frame.hitTest(asdf._x + 70 * asdf.facing, asdf._y - 30, true) || _root.activeplayers[i].frame.hitTest(asdf._x + 35 * asdf.facing, asdf._y - 30, true)) {
_root.activeplayers[i].vx += 50 * asdf.facing;
_root.activeplayers[i].hitnumber += 1;
_root.activeplayers[i].hittimer = 0;
qwer = _root.activeplayers[i].hitnumber;
_root.CP('fx_combo', asdf._x + 100 * asdf.facing, asdf._y - 80, 0, -7);
}
++i;
}
}
frame 9 {
gotoAndPlay(2);
}
}
movieClip 620 {
}
movieClip 622 gun_m1911gold {
frame 1 {
shootx = 25;
shooty = 2;
handx = 0;
handy = 0;
shellX = 25;
flashX = 45;
Name = 'LAME GUN';
_parent._parent.rof = 10;
_parent._parent.firepower = 20;
_parent._parent.recoil = 1;
_parent._parent.blowback = 30;
_parent._parent.bullets = 24;
_parent._parent.idlerotate = 40;
_parent._parent.adjustrof();
_parent._parent.pushback = 0;
}
frame 2 {
stop();
}
frame 3 {
_parent._parent.ejectshell();
}
frame 7 {
gotoAndPlay(2);
}
}
movieClip 624 {
}
movieClip 625 fadeaway {
frame 1 {
_x = -_root._x;
_y = -_root._y;
if (_root.gamewin) {
_x = _root.activeplayers[0]._x - 225;
_y = _root.activeplayers[0]._y - 200;
_xscale = 50;
_yscale = 50;
}
this.onEnterFrame = function () {
_x = -_root._x;
_y = -_root._y;
if (_root.gamewin) {
_x = _root.activeplayers[0]._x - 225;
_y = _root.activeplayers[0]._y - 200;
}
};
}
frame 10 {
if (_root._currentframe == 9) {
_root.menup.swapDepths(1);
removeMovieClip(_root.menup);
delete _root.menup.onEnterFrame;
}
if (_root._currentframe == 10) {
_root.stopallmusic();
if (_root.savedata2.data.musicON) {
_root.music222.start(0.1, 100);
}
_root.returntomenu();
delete _root.onEnterFrame;
}
if (_root._currentframe == 8) {
_root.gunlib.swapDepths(1);
removeMovieClip(_root.gunlib);
delete _root.gunlib.onEnterFrame;
}
if (_root._currentframe == 7) {
_root.menu_credits.swapDepths(1);
removeMovieClip(_root.menu_credits);
delete _root.menu_credits.onEnterFrame;
}
if (_root._currentframe == 6) {
_root.pgs.swapDepths(1);
removeMovieClip(_root.pgs);
delete _root.pgs.onEnterFrame;
}
if (_root._currentframe == 5) {
Key.removeListener(_root.menu_options.keyListener);
_root.menu_options.swapDepths(1);
removeMovieClip(_root.menu_options);
delete _root.menu_options.onEnterFrame;
}
if (_root._currentframe == 4) {
_root.menu_campaign.swapDepths(1);
removeMovieClip(_root.menu_campaign);
delete _root.menu_campaign.onEnterFrame;
}
_root.gotoAndPlay(targetframe);
_root._x = 0;
_root._y = 0;
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
}
frame 21 {
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 633 game_pause {
frame 1 {
_x = _root.hud._x;
_y = _root.hud._y;
_root.GAMEPAUSED = true;
btn1.onRelease = function () {
_root.GAMEPAUSED = false;
removeMovieClip(_root.game_pause);
delete _root.game_pause.onEnterFrame;
};
btn2.onRelease = function () {
_root.GAMEPAUSED = false;
_root.endgame();
};
}
}
movieClip 645 {
frame 1 {
stop();
}
}
// unknown tag 88 length 63
movieClip 648 {
}
movieClip 649 player_arrow {
frame 1 {
_x = 480;
_y = 300;
_alpha = 0;
switch (this._name) {
case 'arrow1':
target = _root.player1;
break;
case 'arrow2':
target = _root.player2;
break;
case 'arrow3':
target = _root.player3;
break;
case 'arrow4':
target = _root.player4;
}
arrow.gotoAndStop(target.playernumber + 1);
this.onEnterFrame = function () {
radians = Math.atan2(target._y - _y, target._x - _x);
degrees = radians * 180 / Math.PI;
_x = -_root._x + 450;
_y = -_root._y + 300;
_rotation = degrees + 90;
dist._rotation = -_rotation;
dist.disttext.text = Math.round(Math.sqrt(Math.pow(target._x - _x, 2) + Math.pow(target._y - _y, 2)));
if (target._y <= -_root._y + 50 || target._y >= -_root._y + 550 || target._x <= -_root._x + 50 || target._x >= -_root._x + 910) {
_alpha = 100;
} else {
_alpha = 0;
}
if (target._alpha != 100 && target.lives <= 0) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 653 {
frame 1 {
stop();
if (_parent.flawless == 1) {
gotoAndStop(2);
} else {
if (_parent.flawless == 2) {
gotoAndStop(3);
}
}
}
}
movieClip 654 player_winner {
frame 1 {
_x = 0;
_y = -150;
flawless = 0;
if (_parent.lives == _root.totallives) {
flawless = 1;
}
if (_parent.lives == _root.totallives - 1) {
flawless = 2;
}
}
frame 41 {
stop();
}
}
movieClip 657 {
}
movieClip 660 {
}
movieClip 661 {
}
movieClip 662 {
}
movieClip 663 wep_ducky {
frame 1 {
vx = 0;
vy = -5;
fusetime = 0;
if (asdf < 0) {
vx = -2 + asdf * 1.8;
_xscale = -100;
_rotation = _rotation - 10;
} else {
vx = 2 + asdf * 1.8;
}
if (random(2) == 0) {
rotationspeed *= -1;
}
freepass = true;
hitground = false;
_xscale = _xscale * 0.8;
_yscale = _yscale * 0.8;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (vy < 24) {
vy += _root.gravity;
}
if (_xscale > 0) {
if (vx > 2) {
vx += (2 - vx) / 10;
}
} else {
if (vx < -2) {
vx += (-2 - vx) / 10;
}
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.hitTest(_x, _y + 8, true) && vy > 0) {
_y = _y - vy;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x, _y + 8 + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 1);
vy *= -0.4;
break;
}
++i;
}
}
}
if (!_root.ground.hitTest(_x, _y, true) && !_root.ground.hitTest(_x, _y + 10, true)) {
freepass = false;
}
if (_root.ground.hitTest(_x, _y, true) && !freepass) {
freepass = true;
}
fusetime += 1;
if (fusetime > 80) {
i = 0;
while (i < _root.activeplayers.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance <= 200) {
radians = Math.atan2(_root.activeplayers[i]._y - 30 - _y, _root.activeplayers[i]._x - _x);
degrees = radians * 180 / Math.PI;
if (_root.activeplayers[i].perknumber == 6 || _root.activeplayers[i].shieldtime > 0) {
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 25;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 50;
if (_root.activeplayers[i].shield._alpha > 99) {
_root.activeplayers[i].shield.gotoAndPlay(23);
}
} else {
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 5;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 10;
}
_root.activeplayers[i].vx += pushx;
_root.activeplayers[i].vy += pushy;
}
++i;
}
shake = random(30) + 20;
if (random(2) == 0) {
shake *= -1;
}
_root._x += shake;
_root.CP('fx_ex6', _x, _y - 20, 0);
_root.CP('fx_ex2', _x, _y - 20, 0);
_root.CP('fx_ex', _x, _y - 20, 0);
_root.CP('fx_ex4', _x, _y - 20, 0);
if (_root._quality != 'LOW') {
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex7', _x, _y - 20, 0);
++i;
}
}
_root.explodesound();
_root.CP('fx_combo', _x, _y - 50, 0, -3);
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_y >= 900 || _x < -500 || _x > 1400 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 665 wep_grenade {
frame 1 {
vx = Math.random() * 10 - 5;
vy = Math.random() * 5 - 15;
firepower = Math.abs(asdf % 1000);
vx = _rotation * firepower;
vy = -firepower;
if (firepower < 0) {
vy += firepower;
}
fusetime = 0;
_rotation = _rotation * 50;
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
freepass = false;
hitground = false;
_xscale = 80;
_yscale = 80;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!hitground) {
_rotation = _rotation + rotationspeed;
} else {
if (Math.abs(90 - _rotation) < Math.abs(-90 - _rotation)) {
_rotation = _rotation + (90 - _rotation) / 5;
} else {
_rotation = _rotation + (-90 - _rotation) / 5;
}
}
if (vy < 24) {
vy += _root.gravity + 0.12;
}
dirx = Math.cos((_rotation - 90) * Math.PI / 180) * 25;
diry = Math.sin((_rotation - 90) * Math.PI / 180) * 25;
_root.CP('fx_dynamite', _x + dirx, _y + diry, 0);
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.hitTest(_x, _y + 8, true) && vy > 0) {
_y = _y - vy;
i = 1;
while (i <= 5) {
if (_root.ground.hitTest(_x, _y + 8 + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 1);
rotationspeed *= 0.5;
vx *= 0.6;
vy *= -0.4;
hitground = true;
break;
}
++i;
}
}
}
if (!_root.ground.hitTest(_x, _y, true) && !_root.ground.hitTest(_x, _y + 10, true)) {
freepass = false;
}
if (_root.ground.hitTest(_x, _y, true) && !freepass) {
freepass = true;
}
fusetime += 1;
if (fusetime == 40) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].AI && _root.activeplayers[i].perknumber != 6) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (_root.activeplayers[i]._y < _y + 20 && distance <= 150) {
_root.activeplayers[i].KEYUP = true;
if (_root.activeplayers[i]._x < _x) {
_root.activeplayers[i].lockright = 10;
}
if (_root.activeplayers[i]._x > _x) {
_root.activeplayers[i].lockleft = 10;
}
}
}
++i;
}
}
if (fusetime > 50) {
i = 0;
while (i < _root.activeplayers.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance <= 200) {
radians = Math.atan2(_root.activeplayers[i]._y - 30 - _y, _root.activeplayers[i]._x - _x);
degrees = radians * 180 / Math.PI;
if (_root.activeplayers[i].perknumber == 6 || _root.activeplayers[i].shieldtime > 0) {
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 25;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 50;
if (_root.activeplayers[i].shield._alpha > 99) {
_root.activeplayers[i].shield.gotoAndPlay(23);
}
} else {
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 5;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 10;
}
_root.activeplayers[i].vx += pushx;
_root.activeplayers[i].vy += pushy;
switch (Math.floor(asdf / 1000)) {
case 1:
_root.activeplayers[i].gothitby = _root.p1name;
break;
case 2:
_root.activeplayers[i].gothitby = _root.p2name;
break;
case 3:
_root.activeplayers[i].gothitby = _root.p3name;
break;
case 4:
_root.activeplayers[i].gothitby = _root.p4name;
}
_root.activeplayers[i].hitbynade = true;
}
++i;
}
shake = random(30) + 20;
if (random(2) == 0) {
shake *= -1;
}
_root._x += shake;
_root.CP('fx_ex6', _x, _y - 20, 0);
_root.CP('fx_ex2', _x, _y - 20, 0);
_root.CP('fx_ex', _x, _y - 20, 0);
_root.CP('fx_ex4', _x, _y - 20, 0);
if (_root._quality != 'LOW') {
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
}
_root.explodesound();
_root.CP('fx_combo', _x, _y - 50, 0, -2);
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_y >= 900 || _x < -500 || _x > 1400 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 667 {
}
movieClip 668 crate {
frame 1 {
falling = true;
vy = 10;
stop();
if (_x > _root.ground._x + _root.ground.platform._x + _root.ground.platform._width / 2) {
_xscale = _xscale * -1;
}
_root.cratearray[_root.cratearray.length] = this;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (falling) {
if (vy < 18) {
vy += 1;
}
_y = _y + vy;
if (_root.ground.platform.hitTest(_x, _y, true)) {
falling = false;
_y = _y - vy;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 1);
play();
break;
}
++i;
}
}
}
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].iszombie) {
break;
}
if (_root.campaignlevel == 10 && _root.activeplayers[i].AI) {
break;
}
if (this.hitTest(_root.activeplayers[i].frame)) {
do {
randgun = random(57) + 10;
} while (_root.savedata3.data.gunarray[randgun - 10] == false);
if (_root.activeplayers[i].perknumber == 4 && random(3) == 0) {
randgun = 55;
}
if (_root.gamemode == 2) {
randgun = 9;
}
if (randgun == 26 && _root.activeplayers[i].AI) {
randgun = 55;
}
_root.activeplayers[i].getgun(randgun);
_root.pgsdata[_root.activeplayers[i].PLAYERNUMBER - 1][5] += 1;
i = 0;
while (i < 5) {
_root.CP('fx_package', _x, _y, 0);
++i;
}
_root.playsound2('bolt2.wav');
removeMovieClip(this);
delete this.onEnterFrame;
j = 0;
while (j < _root.cratearray.length) {
if (_root.cratearray[j] == this) {
_root.cratearray.splice(j, 1);
}
++j;
}
break;
}
++i;
}
if (_root.deleteeverything || _root.gamewin) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
frame 55 {
gotoAndPlay(15);
}
}
movieClip 678 fx_jumpland {
frame 1 {
gotoAndStop(_root.ground._currentframe);
vx = Math.random() * 24 - 12;
vy = Math.random() * 1 - 1;
_alpha = Math.round(Math.abs(vx) + 10) * 4;
_xscale = _xscale + random(80);
_yscale = _xscale;
_x = _x + (random(10) - 5);
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = _x + vx;
_y = _y + vy;
vx *= 0.8;
_rotation = _rotation + rotationspeed;
_alpha = _alpha - 3;
if (_alpha <= 1 || _root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 680 {
}
movieClip 681 {
frame 1 {
stop();
}
frame 5 {
stop();
}
frame 15 {
gotoAndPlay(1);
}
frame 28 {
facing = _parent.facing;
xx = _parent._x;
yy = _parent._y;
_root.CP('wep_ducky', xx + 35 * facing, yy - 25, 0, Math.abs(_parent.vx + facing) * facing);
_parent.offhandammo -= 1;
}
frame 35 {
gotoAndPlay(1);
}
frame 41 {
gotoAndPlay(1);
}
}
movieClip 685 {
frame 1 {
stop();
}
}
movieClip 687 {
}
movieClip 688 {
frame 1 {
stop();
}
frame 62 {
_parent.SELFDESTRUCT();
_root.diesound();
}
}
movieClip 689 {
}
movieClip 691 {
frame 1 {
_alpha = 0;
}
}
movieClip 695 {
}
movieClip 696 {
frame 1 {
stop();
}
frame 22 {
stop();
}
frame 30 {
gotoAndPlay(22);
}
}
movieClip 697 player {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.gamemode == 5) {
bullets *= 2;
}
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
_root.diesound();
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
lives -= 1;
if (lives < 0) {
lives = 0;
}
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (_root.campaignmode && _root.campaignlevel == 4 && _root.double) {
_root.double.SELFDESTRUCT();
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
currentwave = 0;
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
speedtime = 0;
delete this.onEnterFrame;
}
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function respawn() {
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1 || _root.gamemode == 3 || _root.gamemode == 5) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
if (perknumber == 8) {
offhandammo += 2;
}
_root.hud.update();
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
_xscale = 80;
_yscale = 80;
instagib.gotoAndStop(1);
minimulti = 1;
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
if (_root.gamemode == 5) {
shieldtime = 140;
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 3) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 3) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 3) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
AI = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
KEYUP = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][0];
KEYLEFT = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][1];
KEYDOWN = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][2];
KEYRIGHT = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][3];
KEYSHOOT = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][4];
KEYNADE = _root.savedata2.data.controlarray[PLAYERNUMBER - 1][5];
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
killsself = false;
iszombie = false;
damagemulti = 1;
currentlevel = 0;
UPGRADE();
currentgun = 2;
currentwave = 1;
respawn();
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamewin) {
vx = 0;
vy = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
if (!disabled && !_root.gamewin) {
if (Key.isDown(KEYDOWN) && jumpnum == 2 && !freepass && !downkey && !_root.ground.box.hitTest(_x, _y - 15)) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!Key.isDown(KEYDOWN) && downkey) {
downkey = false;
}
}
if (Key.isDown(KEYDOWN)) {
if (_root.ground.box.hitTest(_x, _y - 15, true) && _root.ground.box._currentframe == 2) {
_root.ground.box.target = this;
_root.ground.box.play();
}
if (_root.ground.box.hitTest(_x, _y - 15, true) && _root.ground.box.randgun > 0 && _root.ground.box._currentframe < 160 && _root.ground.box._currentframe > 73) {
getgun(_root.ground.box.randgun);
_root.playsound2('bolt2.wav');
_root.ground.box.randgun = -1;
_root.ground.box.gotoAndPlay(160);
}
}
if (Key.isDown(KEYUP) && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.55;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!Key.isDown(KEYUP)) {
jumpkey = false;
}
if (Key.isDown(KEYUP) && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (Key.isDown(KEYUP)) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 1.5;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (body.jetpack._alpha != 0 && jetfuel <= 0) {
_root.CP('fx_droppack', _x - 20 * facing, _y - 40, facing * -1, 0);
body.jetpack._alpha = 0;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (Key.isDown(KEYLEFT)) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (Key.isDown(KEYRIGHT)) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (Key.isDown(KEYNADE) && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!Key.isDown(KEYNADE) && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (Key.isDown(KEYNADE)) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (Key.isDown(KEYNADE) && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (!Key.isDown(KEYNADE) && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (Key.isDown(KEYNADE) && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (!Key.isDown(KEYNADE) && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (waittime < rof) {
waittime += 1;
}
if (Key.isDown(KEYSHOOT) && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1 || _root.gamemode == 3 || _root.gamemode == 5) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 5 && _root.gamemode != 3 && !_root.teamgame) {
_root.hud.countdown.play();
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy > 30) {
vy = 30;
}
if (vy < -30) {
vy = -30;
}
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
instagib._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
instagib._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
if (_root.gamemode == 5 && currentwave != _root.zombiewave) {
currentwave = _root.zombiewave;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 699 {
frame 1 {
_alpha = 0;
}
}
movieClip 700 player_zombie {
frame 1 {
function gotkilled() {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_root.zombiekilled -= 1;
_root.zombiekilledtotal += 1;
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
AI = true;
iszombie = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
offhandnumber = 1;
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
displayname = 'zombie';
playernumber = 8;
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
currentlevel = 0;
UPGRADE();
currentgun = 2;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
weight = 1;
damagemulti = 2 - _root.zombiewave * 0.05;
playerspeed *= 0.3 + _root.zombiewave * 0.066;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamewin) {
vx = 0;
vy = 0;
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (activeplayers[i].iszombie) {
break;
}
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
if (i == 3) {
break;
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
}
} else {}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (killself) {
SELFDESTRUCT();
}
if (_root.deleteeverything) {
removeMovieClip(this);
delete this.onEnterFrame;
}
ducky._xscale = 100 * facing;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].iszombie) {
break;
}
if (_root.activeplayers[i].frame.hitTest(_x, _y - 15, true)) {
if (_root.activeplayers[i].shieldtime <= 0) {
radians = Math.atan2(_root.activeplayers[i]._y - 30 - _y, _root.activeplayers[i]._x - _x);
degrees = radians * 180 / Math.PI;
pushx = Math.cos(degrees * Math.PI / 180) * (350 - distance) / 10;
pushy = Math.sin(degrees * Math.PI / 180) * (350 - distance) / 20;
_root.activeplayers[i].vx += pushx;
_root.activeplayers[i].lives -= 1;
if (_root.activeplayers[i].lives <= 0) {
_root.activeplayers[i].SELFDESTRUCT();
}
if (!isNaN(pushy)) {
_root.activeplayers[i].vy += pushy;
}
j = 0;
while (j < 4) {
_root.CP('fx_blood', _x, _y, 0, 0);
if (_root.activeplayers[i].iszombie && j == 1) {
break;
}
++j;
}
_root.CP('fx_bloodstain', _x, _y, 0, 0);
}
_root.CP('fx_ex66', _x, _y - 20, 0);
_root.CP('fx_ex22', _x, _y - 20, 0);
_root.CP('fx_ex0', _x, _y - 20, 0);
_root.CP('fx_ex44', _x, _y - 20, 0);
i = 0;
while (i < 2) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 2) {
_root.CP('fx_ex7', _x, _y - 20, 0);
++i;
}
_root.CP('fx_combo', _x, _y - 50, 0, -3);
_root.explodesound();
gotkilled();
}
if (i == 3) {
break;
}
++i;
}
}
};
}
}
movieClip 701 playerAI {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.campaignlevel == 2 && _root.campaignmode) {
firepower *= 0.6;
damagemulti = 1.3;
}
if (_root.campaignlevel == 3 && _root.campaignmode) {
firepower *= 0.8;
damagemulti = 1.2;
}
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
_root.diesound();
if (_name != 'double') {
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
}
lives -= 1;
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
if (this._name == 'double') {
this.swapDepths(1);
removeMovieClip(this);
}
delete this.onEnterFrame;
}
}
function respawn() {
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
if (_name != 'double') {
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
}
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
instagib.gotoAndStop(1);
_xscale = 80;
_yscale = 80;
minimulti = 1;
_root.hud.update();
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
AI = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
currentlevel = 0;
UPGRADE();
currentgun = 2;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
iszombie = false;
damagemulti = 1;
if (_root.campaignmode && _root.campaignlevel == 4) {
cheapshottimer = 120;
}
weight = 1;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamewin) {
vx = 0;
vy = 0;
}
if (doubletime >= 0 && _root.campaignlevel != 4) {
doubletime -= 1;
if (doubletime <= 30) {
SELFDESTRUCT();
}
alone = 0;
i = 0;
while (i < _root.activeplayers.length) {
if (!_root.activeplayers[i].AI) {
alone += 1;
}
++i;
}
if (alone == 1 && _root.activeplayers[i].length == 2) {
SELFDESTRUCT();
}
}
if (_root.campaignmode && _root.campaignlevel == 4) {
if (gothitby != 'none') {
SELFDESTRUCT();
}
_alpha = 20 + random(30);
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
++i;
}
i = 0;
while (i < _root.cratearray.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.cratearray[i]._x - _x, 2) + Math.pow(_root.cratearray[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.cratearray[i];
targetplayer = false;
}
if (this._name != 'double' && _root.cratearray[i].powerupnumber == 0 || _root.cratearray[i].powerupnumber == 3) {
target = _root.cratearray[i];
targetplayer = false;
break;
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x - 150 * dir;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
KEYSHOOT = true;
}
} else {
KEYSHOOT = true;
}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYUP && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYUP) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 1.5;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (body.jetpack._alpha != 0 && jetfuel <= 0) {
_root.CP('fx_droppack', _x - 20 * facing, _y - 40, facing * -1, 0);
body.jetpack._alpha = 0;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (dummy) {
KEYSHOOT = false;
}
if (waittime < rof) {
waittime += 1;
}
if (KEYSHOOT && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 3 && !_root.teamgame) {
if (_root.campaignmode && !_root.fx_teamwin) {
_root.teamgamewin = true;
_root.attachMovie('fx_campaignlose', 'fx_teamwin', _root.teamwindepth);
} else {
if (!_root.campaignmode) {
_root.hud.countdown.play();
}
}
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
instagib._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
instagib._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (this._name == 'double' && lives > 1) {
lives = 0;
}
if (this._name == 'double' && jetfuel != 0) {
jetfuel = 0;
}
if (this._name == 'double' && invisibletime != 0) {
invisibletime = 0;
}
if (this._name == 'double' && shieldtime != 0) {
shieldtime = 0;
}
if (this._name == 'double' && speedtime != 0) {
speedtime = 0;
playerspeed = _root.speed;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 702 playerAI_double {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.campaignlevel == 2 && _root.campaignmode) {
firepower *= 0.6;
damagemulti = 1.3;
}
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
_root.diesound();
if (_name != 'double') {
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
}
lives -= 1;
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
if (this._name == 'double') {
this.swapDepths(1);
removeMovieClip(this);
}
delete this.onEnterFrame;
}
}
function respawn() {
fadedoubletimer = -80;
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
if (_name != 'double') {
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
}
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
instagib.gotoAndStop(1);
_xscale = 80;
_yscale = 80;
minimulti = 1;
_root.hud.update();
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
AI = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
currentlevel = 0;
UPGRADE();
currentgun = 2;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
iszombie = false;
damagemulti = 1;
fakedoubletime = -80;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (!_root.double) {
fakedoubletime += 1;
if (fakedoubletime >= 35) {
fakedoubletime = -120;
spawnfriend();
}
}
if (_root.gamewin) {
vx = 0;
vy = 0;
}
if (doubletime >= 0) {
doubletime -= 1;
if (doubletime <= 30) {
SELFDESTRUCT();
}
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
++i;
}
i = 0;
while (i < _root.cratearray.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.cratearray[i]._x - _x, 2) + Math.pow(_root.cratearray[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.cratearray[i];
targetplayer = false;
}
if (this._name != 'double' && _root.cratearray[i].powerupnumber == 0 || _root.cratearray[i].powerupnumber == 3) {
target = _root.cratearray[i];
targetplayer = false;
break;
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x - 150 * dir;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
KEYSHOOT = true;
}
} else {
KEYSHOOT = true;
}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYUP && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYUP) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 1.5;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (body.jetpack._alpha != 0 && jetfuel <= 0) {
_root.CP('fx_droppack', _x - 20 * facing, _y - 40, facing * -1, 0);
body.jetpack._alpha = 0;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (dummy) {
KEYSHOOT = false;
}
if (waittime < rof) {
waittime += 1;
}
if (KEYSHOOT && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 3 && !_root.teamgame) {
if (_root.campaignmode && !_root.fx_teamwin) {
_root.teamgamewin = true;
_root.attachMovie('fx_campaignlose', 'fx_teamwin', _root.teamwindepth);
} else {
if (!_root.campaignmode) {
_root.hud.countdown.play();
}
}
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
instagib._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
instagib._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (this._name == 'double' && lives > 1) {
lives = 0;
}
if (this._name == 'double' && jetfuel != 0) {
jetfuel = 0;
}
if (this._name == 'double' && invisibletime != 0) {
invisibletime = 0;
}
if (this._name == 'double' && shieldtime != 0) {
shieldtime = 0;
}
if (this._name == 'double' && speedtime != 0) {
speedtime = 0;
playerspeed = _root.speed;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 703 playerAI3 {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.campaignlevel == 2 && _root.campaignmode) {
firepower *= 0.6;
damagemulti = 1.3;
}
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
if (_name != 'double') {
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
}
lives -= 1;
_root.diesound();
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
if (this._name == 'double') {
this.swapDepths(1);
removeMovieClip(this);
}
delete this.onEnterFrame;
}
}
function respawn() {
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
if (_name != 'double') {
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
}
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
shieldtime = 0;
invisibletime = 0;
jetfuel = 100;
speedtime = 0;
minitime = 0;
instagib.gotoAndStop(1);
_xscale = 80;
_yscale = 80;
minimulti = 1;
_root.hud.update();
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
AI = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
currentlevel = 0;
UPGRADE();
currentgun = 2;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
iszombie = false;
damagemulti = 1;
if (_root.campaignmode && _root.campaignlevel == 4) {
cheapshottimer = 120;
}
jetfuel = 100;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamewin) {
vx = 0;
vy = 0;
}
if (doubletime >= 0 && !_root.campaignmode && _root.campaignlevel != 4) {
doubletime -= 1;
if (doubletime <= 30) {
SELFDESTRUCT();
}
}
if (_root.campaignmode && _root.campaignlevel == 4) {
if (gothitby != 'none') {
SELFDESTRUCT();
}
_alpha = 20 + random(30);
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
++i;
}
i = 0;
while (i < _root.cratearray.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.cratearray[i]._x - _x, 2) + Math.pow(_root.cratearray[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.cratearray[i];
targetplayer = false;
}
if (this._name != 'double' && _root.cratearray[i].powerupnumber == 0 || _root.cratearray[i].powerupnumber == 3) {
target = _root.cratearray[i];
targetplayer = false;
break;
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x - 150 * dir;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
KEYSHOOT = true;
}
} else {
KEYSHOOT = true;
}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYUP && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYUP) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 8;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (dummy) {
KEYSHOOT = false;
}
if (waittime < rof) {
waittime += 1;
}
if (KEYSHOOT && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 3 && !_root.teamgame) {
if (_root.campaignmode && !_root.fx_teamwin) {
_root.teamgamewin = true;
_root.attachMovie('fx_campaignlose', 'fx_teamwin', _root.teamwindepth);
} else {
if (!_root.campaignmode) {
_root.hud.countdown.play();
}
}
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel < 100) {
jetfuel += 0.15;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
instagib._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
instagib._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (this._name == 'double' && lives > 1) {
lives = 0;
}
if (this._name == 'double' && jetfuel != 0) {
jetfuel = 0;
}
if (this._name == 'double' && invisibletime != 0) {
invisibletime = 0;
}
if (this._name == 'double' && shieldtime != 0) {
shieldtime = 0;
}
if (this._name == 'double' && speedtime != 0) {
speedtime = 0;
playerspeed = _root.speed;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 704 playerAI4 {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.campaignlevel == 2 && _root.campaignmode) {
firepower *= 0.6;
damagemulti = 1.3;
}
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
if (_name != 'double') {
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
}
_root.diesound();
lives -= 1;
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
if (this._name == 'double') {
this.swapDepths(1);
removeMovieClip(this);
}
delete this.onEnterFrame;
}
}
function respawn() {
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
if (_name != 'double') {
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
}
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
instagib.gotoAndStop(1);
_xscale = 80;
_yscale = 80;
minimulti = 1;
_root.hud.update();
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
AI = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
currentlevel = 0;
UPGRADE();
currentgun = 2;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
iszombie = false;
damagemulti = 1;
if (_root.campaignmode && _root.campaignlevel == 4) {
cheapshottimer = 120;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (gothitby == 'none') {
invisibletime = 10;
} else {
invisibletime = 0;
}
if (_root.gamewin) {
vx = 0;
vy = 0;
}
if (doubletime >= 0 && _root.campaignlevel != 4) {
doubletime -= 1;
if (doubletime <= 30) {
SELFDESTRUCT();
}
}
if (_root.campaignmode && _root.campaignlevel == 4) {
if (gothitby != 'none') {
SELFDESTRUCT();
}
_alpha = 20 + random(30);
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
++i;
}
i = 0;
while (i < _root.cratearray.length) {
distance = Math.round(Math.sqrt(Math.pow(_root.cratearray[i]._x - _x, 2) + Math.pow(_root.cratearray[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.cratearray[i];
targetplayer = false;
}
if (this._name != 'double' && _root.cratearray[i].powerupnumber == 0 || _root.cratearray[i].powerupnumber == 3) {
target = _root.cratearray[i];
targetplayer = false;
break;
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x - 150 * dir;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
KEYSHOOT = true;
}
} else {
KEYSHOOT = true;
}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYUP && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYUP) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 1.5;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (body.jetpack._alpha != 0 && jetfuel <= 0) {
_root.CP('fx_droppack', _x - 20 * facing, _y - 40, facing * -1, 0);
body.jetpack._alpha = 0;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (dummy) {
KEYSHOOT = false;
}
if (waittime < rof) {
waittime += 1;
}
if (KEYSHOOT && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 3 && !_root.teamgame) {
if (_root.campaignmode && !_root.fx_teamwin) {
_root.teamgamewin = true;
_root.attachMovie('fx_campaignlose', 'fx_teamwin', _root.teamwindepth);
} else {
if (!_root.campaignmode) {
_root.hud.countdown.play();
}
}
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
instagib._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
instagib._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (this._name == 'double' && lives > 1) {
lives = 0;
}
if (this._name == 'double' && jetfuel != 0) {
jetfuel = 0;
}
if (this._name == 'double' && invisibletime != 0) {
invisibletime = 0;
}
if (this._name == 'double' && shieldtime != 0) {
shieldtime = 0;
}
if (this._name == 'double' && speedtime != 0) {
speedtime = 0;
playerspeed = _root.speed;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 705 playerAIboss {
frame 1 {
function getgun(wepnum) {
hand1.gun.swapDepths(1);
removeMovieClip(hand1.gun);
wepnumber = wepnum;
switch (wepnum) {
case 1:
hand1.attachMovie('gun_m1911', 'gun', 1);
break;
case 2:
hand1.attachMovie('gun_deagle', 'gun', 1);
break;
case 3:
hand1.attachMovie('gun_glock', 'gun', 1);
break;
case 4:
hand1.attachMovie('gun_bull', 'gun', 1);
break;
case 5:
hand1.attachMovie('gun_49', 'gun', 1);
break;
case 6:
hand1.attachMovie('gun_python', 'gun', 1);
break;
case 8:
hand1.attachMovie('gun_m1911weak', 'gun', 1);
break;
case 9:
hand1.attachMovie('gun_instagib', 'gun', 1);
break;
case 10:
hand1.attachMovie('gun_ak47', 'gun', 1);
break;
case 11:
hand1.attachMovie('gun_hk', 'gun', 1);
break;
case 12:
hand1.attachMovie('gun_mp5k', 'gun', 1);
break;
case 13:
hand1.attachMovie('gun_ithaca', 'gun', 1);
break;
case 14:
hand1.attachMovie('gun_scar', 'gun', 1);
break;
case 15:
hand1.attachMovie('gun_usas', 'gun', 1);
break;
case 16:
hand1.attachMovie('gun_501', 'gun', 1);
break;
case 17:
hand1.attachMovie('gun_mini14', 'gun', 1);
break;
case 18:
hand1.attachMovie('gun_lever', 'gun', 1);
break;
case 19:
hand1.attachMovie('gun_p90', 'gun', 1);
break;
case 20:
hand1.attachMovie('gun_m17', 'gun', 1);
break;
case 21:
hand1.attachMovie('gun_bizon', 'gun', 1);
break;
case 22:
hand1.attachMovie('gun_tommy', 'gun', 1);
break;
case 23:
hand1.attachMovie('gun_ump', 'gun', 1);
break;
case 24:
hand1.attachMovie('gun_augsmg', 'gun', 1);
break;
case 25:
hand1.attachMovie('gun_mp5a3', 'gun', 1);
break;
case 26:
hand1.attachMovie('gun_lusa', 'gun', 1);
break;
case 27:
hand1.attachMovie('gun_m12', 'gun', 1);
break;
case 28:
hand1.attachMovie('gun_mas38', 'gun', 1);
break;
case 29:
hand1.attachMovie('gun_aksu', 'gun', 1);
break;
case 30:
hand1.attachMovie('gun_kriss', 'gun', 1);
break;
case 31:
hand1.attachMovie('gun_mp9', 'gun', 1);
break;
case 32:
hand1.attachMovie('gun_mas', 'gun', 1);
break;
case 33:
hand1.attachMovie('gun_awm', 'gun', 1);
break;
case 34:
hand1.attachMovie('gun_hecate', 'gun', 1);
break;
case 35:
hand1.attachMovie('gun_m95', 'gun', 1);
break;
case 36:
hand1.attachMovie('gun_dsr', 'gun', 1);
break;
case 37:
hand1.attachMovie('gun_ssg69', 'gun', 1);
break;
case 38:
hand1.attachMovie('gun_lrs2', 'gun', 1);
break;
case 39:
hand1.attachMovie('gun_galatz', 'gun', 1);
break;
case 40:
hand1.attachMovie('gun_vss', 'gun', 1);
break;
case 41:
hand1.attachMovie('gun_m76', 'gun', 1);
break;
case 42:
hand1.attachMovie('gun_sr25', 'gun', 1);
break;
case 43:
hand1.attachMovie('gun_leversniper', 'gun', 1);
break;
case 44:
hand1.attachMovie('gun_sawnoff', 'gun', 1);
break;
case 45:
hand1.attachMovie('gun_ksg', 'gun', 1);
break;
case 46:
hand1.attachMovie('gun_aa12', 'gun', 1);
break;
case 47:
hand1.attachMovie('gun_jackhammer', 'gun', 1);
break;
case 48:
hand1.attachMovie('gun_pm12', 'gun', 1);
break;
case 49:
hand1.attachMovie('gun_870', 'gun', 1);
break;
case 50:
hand1.attachMovie('gun_spas12', 'gun', 1);
break;
case 51:
hand1.attachMovie('gun_saiga12', 'gun', 1);
break;
case 52:
hand1.attachMovie('gun_saiga20', 'gun', 1);
break;
case 53:
hand1.attachMovie('gun_spas97', 'gun', 1);
break;
case 54:
hand1.attachMovie('gun_moss500', 'gun', 1);
break;
case 55:
hand1.attachMovie('gun_mini', 'gun', 1);
break;
case 56:
hand1.attachMovie('gun_g36c', 'gun', 1);
break;
case 57:
hand1.attachMovie('gun_rpk', 'gun', 1);
break;
case 58:
hand1.attachMovie('gun_sig552', 'gun', 1);
break;
case 59:
hand1.attachMovie('gun_galil', 'gun', 1);
break;
case 60:
hand1.attachMovie('gun_m4', 'gun', 1);
break;
case 61:
hand1.attachMovie('gun_hk33', 'gun', 1);
break;
case 62:
hand1.attachMovie('gun_f2000', 'gun', 1);
break;
case 63:
hand1.attachMovie('gun_scarh', 'gun', 1);
break;
case 64:
hand1.attachMovie('gun_stoner', 'gun', 1);
break;
case 65:
hand1.attachMovie('gun_m249', 'gun', 1);
break;
case 66:
hand1.attachMovie('gun_hbar', 'gun', 1);
}
if (wepnumber >= 9) {
greedykill = true;
}
waittime = 0;
hand1.hand.swapDepths(2);
hand1.hand._alpha = 100;
hand2.hand._alpha = 100;
}
function FIREBULLET() {
if (firepower > 3) {
if (wepnumber == 55) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 25 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 14 - 7;
if (facing == 1) {
_root.CP('bullet6', _x + 23 * minimulti, _y - 25 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet6', _x - 23 * minimulti, _y - 25 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (wepnumber == 9) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet3', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet3', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
} else {
if (hand1.gun.shotgun > 0) {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
i = 0;
while (i < hand1.gun.shotgun) {
_root.CP('bullet2', _x + 23 * minimulti * facing, _y - 38 * minimulti, -90 + 90 * facing - hand1.gun.shotgun / 1.9 + i * 2, firepower + PLAYERNUMBER * 1000, teamnumber);
++i;
}
} else {
if (firepower > 3) {
_root.CP('fx_flash', _x + hand1.gun.flashX * facing * minimulti, _y - 38 * minimulti, -90 + facing * 90, 0);
}
temp = Math.random() * 6 - 3;
if (facing == 1) {
_root.CP('bullet', _x + 23 * minimulti, _y - 38 * minimulti + temp, 0, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
} else {
_root.CP('bullet', _x - 23 * minimulti, _y - 38 * minimulti + temp, 180, firepower + random(8) - 4 + PLAYERNUMBER * 1000, teamnumber);
}
}
}
}
_root.gunsound(wepnumber);
}
}
function adjustrof() {
waittime = rof - 2;
if (wepnumber < 10) {
waittime = -10;
}
if (wepnumber >= 10 && _root.gamemode != 4) {
_root.CP('fx_cratename', _x, _y - 70, 0, PLAYERNUMBER);
}
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
if (_root.gamemode == 4) {
waittime = -10;
}
if (_root.campaignlevel == 2 && _root.campaignmode) {
firepower *= 0.6;
damagemulti = 1.3;
}
weight = 1;
bullets *= 4;
}
function adjustrof2() {
if (perknumber == 7) {
bullets += Math.ceil(bullets * 0.333);
}
}
function ejectshell() {
_root.CP('fx_shell', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell2() {
_root.CP('fx_shell2', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshell3() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function ejectshell4() {
_root.CP('fx_shell3', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot() {
_root.CP('fx_shot', _x + hand1.gun.shellX * minimulti * facing, _y - 38 * minimulti, 0, 0);
}
function ejectshot3() {
_root.CP('fx_shot3', _x + hand1.gun.shellX * minimulti * facing, _y - 27 * minimulti, 0, 0);
}
function gotkilled() {
if (_name != 'double') {
_root.pgsdata[PLAYERNUMBER - 1][2] += 1;
}
_root.diesound();
lives -= 1;
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
if (gothitby == _root.p1name) {
newmc.asdf = _root.player1;
_root.pgsdata[0][1] += 1;
if (_root.gamemode == 4) {
_root.player1.UPGRADE();
}
} else {
if (gothitby == _root.p2name) {
newmc.asdf = _root.player2;
_root.pgsdata[1][1] += 1;
if (_root.gamemode == 4) {
_root.player2.UPGRADE();
}
} else {
if (gothitby == _root.p3name) {
newmc.asdf = _root.player3;
_root.pgsdata[2][1] += 1;
if (_root.gamemode == 4) {
_root.player3.UPGRADE();
}
} else {
if (gothitby == _root.p4name) {
newmc.asdf = _root.player4;
_root.pgsdata[3][1] += 1;
if (_root.gamemode == 4) {
_root.player4.UPGRADE();
}
}
}
}
}
newmc.mod = 1;
if (cheapshottimer < 120) {
newmc.mod = 2;
} else {
if (greedykill) {
newmc.mod = 3;
} else {
if (hitbynade) {
newmc.mod = 4;
}
}
}
if (_root.gamemode == 4) {
newmc.mod = 5;
newmc.leveldisplay = newmc.asdf.currentlevel;
}
if (cheapshottimer < 120) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 2);
} else {
if (greedykill) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 4);
} else {
if (hitbynade) {
_root.hud.killupdate(nametag.nametext.text, gothitby, 3);
} else {
_root.hud.killupdate(nametag.nametext.text, gothitby, 1);
}
}
}
if (lives > 0) {
respawn();
} else {
_root.hud.update();
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i] == this) {
_root.activeplayers.splice(i, 1);
}
++i;
}
_x = 0;
_y = 1100;
_alpha = 0;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
if (this._name == 'double') {
this.swapDepths(1);
removeMovieClip(this);
}
delete this.onEnterFrame;
}
}
function respawn() {
cheapshottimer = 0;
gothitby = 'none';
hitbynade = false;
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(9);
}
if (_root.gamemode == 4) {
getgun(currentgun);
}
if (_name != 'double') {
_y = -1000;
_x = _root.ground._x + _root.ground.spawnarea._x + random(_root.ground.spawnarea._width);
}
vy = 0;
vx = 0;
jumpnum = 1;
offhandammo = 3;
shieldtime = 0;
invisibletime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
instagib.gotoAndStop(1);
_xscale = 80;
_yscale = 80;
minimulti = 1;
_root.hud.update();
if (perknumber == 9 && _root.gamemode != 4 && _root.gamemode != 2) {
randgun = random(57) + 10;
getgun(randgun);
}
}
function startwalk() {
if (leg1._currentframe == 1) {
leg1.gotoAndPlay(2);
leg2.gotoAndPlay(2);
}
}
function SELFDESTRUCT() {
_root.CP('fx_ex6', _x, _y - 20, 0);
i = 0;
while (i < 5) {
_root.CP('fx_ex5', _x, _y - 20, 0);
++i;
}
i = 0;
while (i < 5) {
_root.CP('fx_ex3', _x, _y - 20, 0);
++i;
}
j = 0;
while (j < 5) {
_root.CP('fx_blood', _x, _y, 0, 0);
++j;
}
_root.CP('fx_combo', _x, _y - 50, 0, -5);
_root.CP('fx_bloodstain', _x, _y, 0, 0);
gotkilled();
}
function spawnfriend() {
newmc = _root.attachMovie('playerAI', 'double', -5);
newmc._x = _x;
newmc._y = _y;
newmc.asdf = this.PLAYERNUMBER;
}
function lifebling() {
_root.pDepth += 1;
newmc = _root.attachMovie('fx_bling', 'trash' + _root.pDepth, _root.pDepth);
newmc.asdf = this;
newmc.mod = 6;
}
function UPGRADE() {
currentlevel += 1;
switch (currentlevel) {
case 1:
currentgun = 2;
break;
case 2:
currentgun = 29;
break;
case 3:
currentgun = 19;
break;
case 4:
currentgun = 46;
break;
case 5:
currentgun = 13;
break;
case 6:
currentgun = 51;
break;
case 7:
currentgun = 50;
break;
case 8:
currentgun = 11;
break;
case 9:
currentgun = 38;
break;
case 10:
currentgun = 33;
break;
case 11:
currentgun = 58;
break;
case 12:
currentgun = 62;
break;
case 13:
currentgun = 66;
break;
case 14:
currentgun = 65;
break;
case 15:
currentgun = 44;
}
if (currentlevel == 16) {
j = 0;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j]._name != this._name) {
_root.activeplayers[j].lives = 0;
_root.activeplayers[j].killself = true;
}
++j;
}
} else {
getgun(currentgun);
}
}
AI = true;
vy = 0;
vx = 0;
jumpnum = 0;
jumpkey = false;
nadekey = false;
downkey = false;
freepass = false;
facing = 1;
walkanim = 0;
lives = _root.totallives;
if (_root.gamemode == 4) {
lives = 99999;
}
offhandnumber = 1;
if (_root.gamemode == 4) {
offhandnumber = -1;
}
offhandammo = 3;
gothitby = 'none';
hitbynade = false;
greedykill = false;
cheapshottimer = 0;
destructkey = false;
waittime = 100;
idletime = 40;
idlemax = 40;
nadepower = 0;
wepnumber = 1;
rof = 12;
firepower = 25;
recoil = 0.8;
blowback = 30;
bullets = 9999;
idlerotate = 40;
pushback = 0;
disabled = false;
hitnumber = 0;
hittimer = 0;
_xscale = 80;
_yscale = 80;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
doubletime = -100;
switch (this._name) {
case 'player1':
PLAYERNUMBER = 1;
playernumber = _root.p1color;
KEYSPLODE = 75;
displayname = _root.p1name;
_root.attachMovie('player_arrow', 'arrow1', _root.arrow1depth);
defaultgun = _root.p1gun;
perknumber = _root.p1perk;
teamnumber = _root.p1team;
break;
case 'player2':
PLAYERNUMBER = 2;
playernumber = _root.p2color;
KEYSPLODE = 76;
displayname = _root.p2name;
_root.attachMovie('player_arrow', 'arrow2', _root.arrow2depth);
defaultgun = _root.p2gun;
perknumber = _root.p2perk;
teamnumber = _root.p2team;
break;
case 'player3':
PLAYERNUMBER = 3;
playernumber = _root.p3color;
KEYSPLODE = 186;
displayname = _root.p3name;
_root.attachMovie('player_arrow', 'arrow3', _root.arrow3depth);
defaultgun = _root.p3gun;
perknumber = _root.p3perk;
teamnumber = _root.p3team;
break;
case 'player4':
PLAYERNUMBER = 4;
playernumber = _root.p4color;
KEYSPLODE = 222;
displayname = _root.p4name;
_root.attachMovie('player_arrow', 'arrow4', _root.arrow4depth);
defaultgun = _root.p4gun;
perknumber = _root.p4perk;
teamnumber = _root.p4team;
}
if (this._name == 'double') {
doubletime = 600;
_root.activeplayers[_root.activeplayers.length] = this;
lives = 1;
PLAYERNUMBER = asdf;
switch (asdf) {
case 1:
playernumber = _root.p1color;
displayname = _root.p1name;
defaultgun = _root.p1gun;
teamnumber = _root.p1team;
break;
case 2:
playernumber = _root.p2color;
displayname = _root.p2name;
defaultgun = _root.p2gun;
teamnumber = _root.p2team;
break;
case 3:
playernumber = _root.p3color;
displayname = _root.p3name;
defaultgun = _root.p3gun;
teamnumber = _root.p3team;
break;
case 4:
playernumber = _root.p4color;
displayname = _root.p4name;
defaultgun = _root.p4gun;
teamnumber = _root.p4team;
}
}
if (_root.teamgame) {
nametag.gotoAndStop(teamnumber + 1);
nametag.nametext.text = displayname;
} else {
nametag.gotoAndStop(1);
nametag.nametext.text = displayname;
}
triplejump = false;
if (perknumber == 3) {
triplejump = true;
}
if (perknumber == 8) {
offhandammo += 2;
}
currentlevel = 0;
UPGRADE();
currentgun = 2;
defaultgun = 55;
respawn();
targettime = 0;
groundleft = _root.ground._x + _root.ground.platform._x;
groundright = _root.ground._x + _root.ground.platform._x + _root.ground.platform._width;
groundmiddle = (groundleft + groundright) / 2;
lockleft = 0;
lockright = 0;
lockup = 0;
cratearray = new Array();
targetplayer = false;
idletime2 = 0;
prevx = 0;
invisibletime = 0;
shieldtime = 0;
jetfuel = 0;
speedtime = 0;
minitime = 0;
minimulti = 1;
playerspeed = _root.speed;
dummy = false;
if (_root.gototest) {
dummy = true;
}
killself = false;
iszombie = false;
damagemulti = 0.8;
if (_root.campaignmode && _root.campaignlevel == 4) {
cheapshottimer = 120;
}
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamewin) {
vx = 0;
vy = 0;
}
if (doubletime >= 0 && _root.campaignlevel != 4) {
doubletime -= 1;
if (doubletime <= 30) {
SELFDESTRUCT();
}
}
if (_root.campaignmode && _root.campaignlevel == 4) {
if (gothitby != 'none') {
SELFDESTRUCT();
}
_alpha = 20 + random(30);
}
targettime += 1;
if (targettime >= 40) {
low = 5000;
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].teamnumber != teamnumber) {
if (_root.activeplayers[i].PLAYERNUMBER != this.PLAYERNUMBER) {
distance = Math.round(Math.sqrt(Math.pow(_root.activeplayers[i]._x - _x, 2) + Math.pow(_root.activeplayers[i]._y - 30 - _y, 2)));
if (distance < low) {
low = distance;
target = _root.activeplayers[i];
targetplayer = true;
}
}
}
++i;
}
targettime = 0;
}
_x = _x + vx;
_y = _y + vy;
if (!freepass) {
if (_root.ground.platform.hitTest(_x, _y, true) && vy > 0) {
if (Math.abs(vx) < 3) {
gothitby = 'none';
hitbynade = false;
greedykill = false;
}
jumpnum = 2;
if (perknumber == 3) {
triplejump = true;
}
_y = _y - vy * 1.01;
i = 1;
while (i <= 5) {
if (_root.ground.platform.hitTest(_x, _y + i * (vy / 5), true)) {
_y = _y + (vy / 5) * (i - 0.5);
break;
}
++i;
}
if (Math.abs(vy) > 3) {
eyes._y += 10;
hand1._y += 10;
hand2._y += 8;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
_root.dropsound();
}
vy = 0;
} else {
if (jumpnum == 2) {
jumpnum = 1;
}
}
}
if (!_root.ground.platform.hitTest(_x, _y - 8, true) && !_root.ground.platform.hitTest(_x, _y, true)) {
freepass = false;
}
if (_root.ground.platform.hitTest(_x, _y - 8, true) && !freepass) {
freepass = true;
}
if (_y > 1000 || _x < -600 || _x > 1500) {
gotkilled();
}
land1x = _x + land1._x * 0.8;
land1y = _y + land1._y * 0.8;
land2x = _x + land2._x * 0.8;
land2y = _y + land2._y * 0.8;
noland = _y + noland._y * 0.8;
if (prevx == Math.round(_x) && !dummy) {
idletime2 += 1;
if (idletime2 >= 4) {
idletime2 = 0;
if (jumpnum == 2) {
KEYUP = true;
}
if (target._x < _x) {
lockleft = 10;
}
if (target._x >= _x) {
lockright = 10;
}
}
} else {
idletime2 = 0;
}
prevx = Math.round(_x);
if (target._y <= _y + 10 && target._y >= _y - 80 && jumpnum == 2) {
if (targetplayer) {
if (target._x >= groundmiddle) {
dir = 1;
}
if (target._x < groundmiddle) {
dir = -1;
}
optimalx = target._x - 150 * dir;
} else {
optimalx = target._x;
}
if (_x > groundleft + 200) {
if (optimalx < _x - 40) {
KEYLEFT = true;
}
}
if (_x < groundright - 200) {
if (optimalx > _x + 40) {
KEYRIGHT = true;
}
}
if (_x > optimalx - 40 && _x < optimalx + 40) {
if (target._x > _x && facing == -1) {
KEYRIGHT = true;
}
if (target._x <= _x && facing == 1) {
KEYLEFT = true;
}
}
} else {
if (target._y > _y + 10) {
if (_x > groundleft + 50 && target.jumpnum == 2 || _x > groundleft - 10 && !targetplayer) {
if (target._x < _x - 30) {
KEYLEFT = true;
}
}
if (_x < groundright - 50 && target.jumpnum == 2 || _x < groundright + 10 && !targetplayer) {
if (target._x > _x + 30) {
KEYRIGHT = true;
}
}
if (_x > target._x - 30 && _x < target._x + 30 && Math.round(target.vy) == 1 && target.jumpnum == 2 || _x > target._x - 30 && _x < target._x + 30 && !targetplayer) {
KEYDOWN = true;
}
if (_root.ground.platform.hitTest(_x, _y + 95, true) && target.jumpnum == 2) {
KEYDOWN = true;
}
} else {
if (target._y < _y - 80) {
if (vy < 0 && jumpnum == 1 && _root.ground.platform.hitTest(_x, _y - 30, true) && Math.abs(vx) <= 5) {
KEYUP = true;
}
if (jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 75, true) && Math.abs(vx) <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x, _y - 120, true) && Math.abs(vx) <= 5) {
KEYUP = true;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 80, true) && lockleft == 0 && vx >= -5 || jumpnum == 2 && _root.ground.platform.hitTest(_x - 100, _y - 120, true) && lockleft == 0 && vx >= -5) {
KEYUP = true;
lockleft = 20;
} else {
if (jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 80, true) && lockright == 0 && vx <= 5 || jumpnum == 2 && _root.ground.platform.hitTest(_x + 100, _y - 120, true) && lockright == 0 && vx <= 5) {
KEYUP = true;
lockright = 20;
} else {
if (jumpnum == 2) {
if (target._x < _x && lockright == 0) {
lockleft = 10;
} else {
if (target._x > _x && lockleft == 0) {
lockright = 10;
}
}
}
}
}
}
}
}
}
if (_x < groundleft + 100 || _x > groundright - 100) {
if (groundmiddle < _x - 40) {
KEYLEFT = true;
}
if (groundmiddle > _x + 40) {
KEYRIGHT = true;
}
}
if (Math.abs(vx) > 30) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (vx > 15 || vx < -15) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && vx > 10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && vx < -10) {
if (jumpnum == 2) {
KEYUP = true;
}
}
if (_x > groundright - 100 && targetplayer || _x > groundright && !targetplayer) {
if (jetfuel > 0 && _x > groundright && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx < -1 && jumpnum == 1 && _x < groundright + 100 || vy > 0 && vx < -1 && jumpnum == 11 && _x < groundright + 100) {
KEYUP = true;
}
if (_x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x > groundright && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (_x < groundleft + 100 && targetplayer || _x < groundleft && !targetplayer) {
if (jetfuel > 0 && _x < groundleft && vy > -1) {
lockup = 10;
}
if (jumpnum == 2) {
KEYUP = true;
}
if (vy > 0 && vx > 1 && jumpnum == 1 && _x > groundleft - 100 || vy > 0 && vx > 1 && jumpnum == 11 && _x > groundleft - 100) {
KEYUP = true;
}
if (_x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && jumpnum == 1 && _y > _root.ground._y + _root.ground.lowest._y - 100 || jumpnum == 11 && _x < groundleft && !_root.ground.platform.hitTest(_x, noland, true) && _y > _root.ground._y + _root.ground.lowest._y - 100) {
KEYUP = true;
}
}
if (!_root.ground.platform.hitTest(land2x, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
}
if (!_root.ground.platform.hitTest(land1x, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
}
if (!_root.ground.platform.hitTest(land2x - 15, land2y, true) && jumpnum == 2) {
KEYRIGHT = false;
KEYLEFT = true;
}
if (!_root.ground.platform.hitTest(land1x + 15, land1y, true) && jumpnum == 2) {
KEYLEFT = false;
KEYRIGHT = true;
}
if (lockright >= lockleft) {
lockleft = 0;
}
if (lockleft > lockright) {
lockright = 0;
}
if (lockright > 0) {
KEYRIGHT = true;
lockright -= 1;
}
if (lockleft > 0) {
KEYLEFT = true;
lockleft -= 1;
}
if (lockup > 0) {
KEYUP = true;
lockup -= 1;
}
if (targetplayer && target._y < _y + 20 && target._y > _y - 80) {
if (target._x > _x && facing == 1 || target._x < _x && facing == -1) {
if (hand1.gun.shotgun > 0) {
if (Math.abs(target._x - _x) > 15 && Math.abs(target._x - _x) < 150) {
KEYSHOOT = true;
}
} else {
KEYSHOOT = true;
}
}
}
if (!disabled && !_root.gamewin) {
if (KEYDOWN && jumpnum == 2 && !freepass && !downkey) {
if (_y < _root.ground._y + _root.ground.lowest._y) {
freepass = true;
vy += 1;
_y = _y + 5;
jumpnum = 1;
downkey = true;
}
} else {
if (!KEYDOWN && downkey) {
downkey = false;
}
}
if (KEYUP && !jumpkey && jumpnum > 0) {
jumpkey = true;
jumpnum -= 1;
if (jumpnum == 1) {
vy = -_root.power * 1;
i = 0;
while (i < 10) {
_root.CP('fx_jumpland', _x, _y, 0);
++i;
}
} else {
if (jumpnum == 0) {
vy = -_root.power * 0.83;
_root.CP('fx_double', _x, _y);
if (triplejump && jumpnum == 0) {
jumpnum = 11;
triplejump = false;
}
}
}
if (jumpnum == 10) {
jumpnum = 0;
if (vy < -4) {
vy -= _root.power * 0.2;
} else {
vy = -_root.power * 0.65;
}
_root.CP('fx_double', _x, _y);
}
_y = _y - 1;
}
if (!KEYUP) {
jumpkey = false;
}
if (KEYUP && jumpnum <= 0 && jetfuel > 0 && !jumpkey) {
if (body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYUP) {
vy += (-15 - vy) / 4;
_root.CP('fx_jetpack', _x - 22 * facing, _y - 18, 0);
jetfuel -= 1.5;
}
}
if (body.jetpack._alpha >= 100) {
body.jetpack.fuel._yscale = jetfuel;
}
if (body.jetpack._alpha != 0 && jetfuel <= 0) {
_root.CP('fx_droppack', _x - 20 * facing, _y - 40, facing * -1, 0);
body.jetpack._alpha = 0;
}
if (jetfuel > 0 && body.jetpack._alpha != 100) {
body.jetpack._alpha = 100;
}
if (KEYLEFT) {
startwalk();
if (jumpnum == 2) {
vx -= playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx -= playerspeed / 1.4;
} else {
vx -= (playerspeed / 1.1) * weight;
}
}
if (facing == 1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = -1;
}
if (KEYRIGHT) {
startwalk();
if (jumpnum == 2) {
vx += playerspeed * weight;
} else {
if (_root.ground.lowfriction) {
vx += playerspeed / 1.4;
} else {
vx += (playerspeed / 1.1) * weight;
}
}
if (facing == -1) {
leg1._rotation *= -1;
leg2._rotation *= -1;
}
facing = 1;
}
}
if (_root.gamewin && perknumber == 1) {
if (Key.isDown(32)) {
body._rotation += (-15 * facing - body._rotation) / 2;
hand1._x += (-10 * facing - hand1._x) / 2;
hand2._x += (-10 * facing - hand2._x) / 2;
} else {
body._rotation += -body._rotation / 3;
hand1._x += -hand1._x / 3;
hand2._x += -hand2._x / 3;
}
}
if (!_root.gamewin && _root.gamemode != 2) {
if (offhandnumber == 1 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
hand2.gotoAndPlay(2);
nadepower = 1;
} else {
if (!KEYNADE && nadekey) {
nadekey = false;
_root.CP('wep_grenade', _x + 30 * facing, _y - 35, facing, nadepower + PLAYERNUMBER * 1000);
offhandammo -= 1;
hand2.gotoAndPlay(6);
}
}
if (KEYNADE) {
if (nadepower < 14) {
nadepower += 0.5;
}
}
} else {
if (offhandnumber == 2 && offhandammo > 0) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(20);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
} else {
if (offhandnumber == 3) {
if (KEYNADE && !nadekey) {
nadekey = true;
if (hand2._currentframe == 1) {
hand2.gotoAndPlay(40);
}
} else {
if (KEYNADE && nadekey) {
nadekey = false;
}
}
}
}
}
}
if (dummy) {
KEYSHOOT = false;
}
if (waittime < rof) {
waittime += 1;
}
if (KEYSHOOT && waittime >= rof && !_root.gamewin && hand1.gun._currentframe == 2 && bullets > 0) {
waittime = 0;
idletime = 0;
vx -= recoil * facing;
if (firepower == 0) {
_root.CP('bullet5_grenade', _x + 30 * facing, _y - 20, facing, 20 + PLAYERNUMBER * 1000);
}
hand2.hand._y = hand1.gun.handy;
hand1.gun._rotation = -blowback;
hand1.hand._x = hand1.gun.shootx;
hand1.hand._y = hand1.gun.shooty;
hand2.hand._x = hand1.gun.handx;
hand2.hand._y = hand1.gun.handy;
hand1.gun._x = hand1.gun.shootx;
hand1.gun._y = hand1.gun.shooty;
hand1.hand._x -= pushback;
hand2.hand._x -= pushback;
if (blowback >= 20 && hand1.gun.handx > 40) {
hand2.hand._y = -blowback;
}
hand1.gun.play();
FIREBULLET();
_root.pgsdata[PLAYERNUMBER - 1][3] += 1;
bullets -= 1;
if (bullets <= 0) {
if (wepnumber >= 9) {
_root.CP('fx_dropgun', _x + 20 * facing, _y - 40, facing, wepnumber);
if (_root.gamemode == 1) {
getgun(defaultgun);
}
if (_root.gamemode == 2) {
getgun(8);
}
if (_root.gamemode == 4) {
currentlevel -= 2;
UPGRADE();
getgun(currentgun);
}
} else {
hand1.gun.gotoAndPlay(10);
}
}
}
if (idletime <= idlemax) {
idletime += 1;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
hand1.gun._x += (-5.5 - hand1.gun._x) / 3;
hand1.gun._y += (10.85 - hand1.gun._y) / 3;
hand1.gun._rotation += (idlerotate - hand1.gun._rotation) / 3;
} else {
hand1.hand._x += (hand1.gun.shootx - hand1.hand._x) / 3;
hand1.hand._y += (hand1.gun.shooty - hand1.hand._y) / 3;
hand2.hand._x += (hand1.gun.handx - hand2.hand._x) / 3;
hand2.hand._y += (hand1.gun.handy - hand2.hand._y) / 3;
hand1.gun._x += (hand1.gun.shootx - hand1.gun._x) / 3;
hand1.gun._y += (hand1.gun.shooty - hand1.gun._y) / 3;
hand1.gun._rotation += -hand1.gun._rotation / 3;
}
if (hittimer <= 40) {
hittimer += 1;
}
if (hittimer > 40) {
hitnumber = 0;
}
if (cheapshottimer < 120) {
cheapshottimer += 1;
}
if (_root.activeplayers.length == 1 && _root.activeplayers[0] == this && _root.gamemode != 3 && !_root.teamgame) {
if (_root.campaignmode && !_root.fx_teamwin) {
_root.teamgamewin = true;
_root.attachMovie('fx_campaignlose', 'fx_teamwin', _root.teamwindepth);
} else {
if (!_root.campaignmode) {
_root.hud.countdown.play();
}
}
}
if (_root.gamewin && !player_winner) {
this.attachMovie('player_winner', 'player_winner', this.getNextHighestDepth());
}
vx *= _root.friction;
if (vy < 24) {
vy += _root.gravity;
}
if (Math.abs(vx) <= 0.1) {
vx = 0;
}
if (perknumber == 2 && weight != 1) {
weight = 1;
}
if (perknumber == 5 && recoil != 0) {
recoil = 0;
}
if (jetfuel > 0) {
jetfuel -= 0.12;
}
if (idletime >= idlemax && wepnumber != 55 && hand1.gun._currentframe < 40) {
if (walkanim == 1) {
hand1.hand._x += -hand1.hand._x / 3;
hand2.hand._x += (15 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
if (walkanim == 2) {
hand1.hand._x += (-10 - hand1.hand._x) / 3;
hand2.hand._x += (25 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
} else {
hand1.hand._x += (-5 - hand1.hand._x) / 3;
hand2.hand._x += (20 - hand2.hand._x) / 3;
hand1.hand._y += (10.5 - hand1.hand._y) / 3;
hand2.hand._y += (-3.75 - hand2.hand._y) / 3;
}
}
}
hand1.gun._x = hand1.hand._x;
if (wepnumber == 6) {
hand1.gun.glove2._x = (hand1.gun._x * 2 - 5) * -1;
}
if (Math.abs(vx) > 3) {
leg1.play();
leg2.play();
} else {
if (leg1._currentframe == 1) {
walkanim = 0;
}
}
if (jumpnum != 2) {
leg1.gotoAndStop(1);
leg2.gotoAndStop(1);
walkanim = 0;
}
if (vy <= -2) {
leg1._rotation += (80 * facing - leg1._rotation) / 3;
leg2._rotation += (80 * facing - leg2._rotation) / 3;
body._y += (-70 - body._y) / 5;
} else {
if (vy >= 2) {
leg1._rotation += (-10 * facing - leg1._rotation) / 3;
leg2._rotation += (-10 * facing - leg2._rotation) / 3;
body._y += (-55 - body._y) / 5;
} else {
leg1._rotation += -leg1._rotation / 1.5;
leg2._rotation += -leg2._rotation / 1.5;
body._y += (-60 - body._y) / 2;
}
}
leg1._x = -12 * facing;
leg2._x = 9 * facing;
if (Math.abs(-46 + body.head.head._y - eyes._y) >= 1) {
eyes._y += (-46 - eyes._y) / 5;
hand1._y += (-35 - hand1._y) / 5;
hand2._y += (-25 - hand2._y) / 5;
} else {
eyes._y = -46 + body.head.head._y;
eyes._y = Math.round(eyes._y);
}
if (facing == 1) {
body._xscale = 100;
eyes._xscale = 100;
hand1._xscale = 100;
hand2._xscale = 100;
leg1._xscale = 100;
leg2._xscale = 100;
instagib._xscale = 100;
player_hat._xscale = 100;
player_hat._x = 9.550000000000001 * facing;
} else {
body._xscale = -100;
eyes._xscale = -100;
hand1._xscale = -100;
hand2._xscale = -100;
leg1._xscale = -100;
leg2._xscale = -100;
instagib._xscale = -100;
player_hat._xscale = -100;
player_hat._x = 9.550000000000001 * facing;
}
player_hat._y = -75 + body.head.head._y + (body._y + 60);
if (nametag.nametext.text == 'Sinusoidal Sam' && eyes._currentframe != 31) {
eyes.gotoAndStop(31);
}
if (nametag.nametext.text == 'Homer' && eyes._currentframe != 32) {
player_hat.gotoAndStop(32);
eyes.gotoAndStop(32);
}
if (invisibletime > 0) {
invisibletime -= 1;
if (_alpha > 0) {
_alpha = _alpha - 10;
} else {
_alpha = 0;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
if (shieldtime > 0) {
shieldtime -= 1;
if (shield._alpha < 100) {
shield._alpha += 100;
}
if (shield._currentframe == 1) {
shield.play();
}
} else {
if (shield._alpha > 0) {
shield._alpha -= 10;
}
if (shield._alpha <= 1 && shield._currentframe != 1) {
shield.gotoAndPlay(1);
}
}
if (speedtime >= 0) {
speedtime -= 1;
if (playerspeed != _root.speed * 2) {
playerspeed = _root.speed * 2;
}
if (speedtime % 2 == 0) {
if (minitime <= 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER, facing);
}
if (minitime > 0) {
_root.CP2('fx_playertrail', _x, _y, PLAYERNUMBER * -1, facing);
}
}
} else {
if (playerspeed != _root.speed) {
playerspeed = _root.speed;
}
}
if (minitime >= 0) {
minitime -= 1;
if (minitime > 260) {
minimulti += (0.6 - minimulti) / 6;
_xscale = _xscale + (50 - _xscale) / 3;
_yscale = _xscale;
}
if (minitime == 260) {
if (minimulti != 0.6) {
minimulti = 0.6;
}
_xscale = 50;
_yscale = 50;
}
if (minitime <= 40) {
minimulti += (1 - minimulti) / 6;
_xscale = _xscale + (80 - _xscale) / 3;
_yscale = _xscale;
}
} else {
if (minimulti != 1) {
minimulti = 1;
}
if (_xscale != 80) {
_xscale = 80;
_yscale = 80;
}
}
instagib._y = body._y + 60 - 2.65;
KEYUP = false;
KEYDOWN = false;
KEYLEFT = false;
KEYRIGHT = false;
KEYSHOOT = false;
KEYNADE = false;
if (this._name == 'double' && lives > 1) {
lives = 0;
}
if (this._name == 'double' && jetfuel != 0) {
jetfuel = 0;
}
if (this._name == 'double' && invisibletime != 0) {
invisibletime = 0;
}
if (this._name == 'double' && shieldtime != 0) {
shieldtime = 0;
}
if (this._name == 'double' && speedtime != 0) {
speedtime = 0;
playerspeed = _root.speed;
}
if (killself) {
SELFDESTRUCT();
}
}
};
}
}
movieClip 707 {
}
movieClip 709 {
}
movieClip 710 {
frame 31 {
_parent.play();
}
frame 72 {
stop();
}
}
movieClip 712 {
}
movieClip 713 {
}
movieClip 715 {
}
movieClip 724 {
}
movieClip 726 {
}
movieClip 728 {
}
movieClip 729 {
}
movieClip 730 {
frame 1 {
this.gotoAndStop(_parent.powerupnumber + 1);
}
}
movieClip 733 {
}
movieClip 734 powerup {
frame 1 {
stop();
pickedup = false;
powerupnumber = random(7);
if (powerupnumber == 4 && _root.double || powerupnumber == 4 && _root.campaignmode) {
powerupnumber = 2;
}
_root.cratearray[_root.cratearray.length] = this;
this.onEnterFrame = function () {
if (_currentframe >= 20 && !pickedup) {
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].iszombie) {
break;
}
if (_root.activeplayers[i].frame.hitTest(frame)) {
j = 0;
while (j < 10) {
_root.CP('fx_pickup', _x, _y + 40, 0);
++j;
}
_root.CP('fx_powerupname', _x, _y, 0, powerupnumber + 1);
pickedup = true;
_root.playsound('emp.wav');
_root.pgsdata[_root.activeplayers[i].PLAYERNUMBER - 1][6] += 1;
if (_root.activeplayers[i]._name != 'double') {
switch (powerupnumber) {
case 0:
_root.activeplayers[i].lives = parseInt(_root.activeplayers[i].lives) + 1;
_root.activeplayers[i].lifebling();
break;
case 1:
_root.activeplayers[i].invisibletime = 200;
break;
case 2:
_root.activeplayers[i].shieldtime = 300;
break;
case 3:
_root.activeplayers[i].jetfuel = 100;
break;
case 4:
_root.activeplayers[i].spawnfriend();
break;
case 5:
_root.activeplayers[i].speedtime = 300;
break;
case 6:
_root.activeplayers[i].minitime = 400;
}
break;
}
}
++i;
}
}
if (pickedup && stuff._alpha != 0) {
stuff._alpha = 0;
aura._alpha = 0;
}
if (pickedup && flashystuff._currentframe == flashystuff._totalframes) {
j = 0;
while (j < _root.cratearray.length) {
if (_root.cratearray[j] == this) {
_root.cratearray.splice(j, 1);
}
++j;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_root.deleteeverything || _root.gamewin) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 98 {
gotoAndPlay(20);
}
}
movieClip 788 {
frame 1 {
stop();
}
frame 2 {
trace('OH SNAP sounds are playing');
stop();
}
}
movieClip 789 {
frame 1 {
stop();
_alpha = 0;
}
frame 2 {
stop();
}
frame 5 {
trace('do not output this message');
}
frame 6 {
trace('oh no you should not be reading this message');
}
}
frame 4 {
stop();
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
gamewin = false;
}
movieClip 792 {
}
movieClip 800 {
frame 1 {
defstate = _currentframe;
gotoAndStop(defstate);
this.onRollOver = function () {
if (defstate == 2) {
gotoAndStop(3);
}
};
this.onRollOut = function () {
gotoAndStop(defstate);
};
this.onRelease = function () {
if (_name == 'teamA') {
_parent.team = 1;
}
if (_name == 'teamB') {
_parent.team = 2;
}
_parent.teamA.defstate = 2;
_parent.teamB.defstate = 2;
_parent.teamA.gotoAndStop(2);
_parent.teamB.gotoAndStop(2);
this.defstate = 4;
gotoAndStop(4);
};
}
}
movieClip 804 {
frame 1 {
stop();
if (_parent._parent.modedisplay._currentframe == 4) {
gotoAndStop(2);
}
}
frame 2 {
if (team == 1) {
teamA.gotoAndStop(4);
teamA.defstate = 4;
} else {
if (team == 2) {
teamB.gotoAndStop(4);
teamB.defstate = 4;
}
}
}
}
movieClip 806 {
frame 1 {
gotoAndStop(2);
this.onRollOver = function () {
gotoAndStop(3);
};
this.onRollOut = function () {
gotoAndStop(2);
};
}
}
movieClip 811 {
frame 1 {
if (_x < 140) {
xx = 3;
}
if (_x < 80) {
xx = 2;
}
if (_x < 15) {
xx = 1;
}
if (_y < 660) {
yy = 4;
}
if (_y < 600) {
yy = 3;
}
if (_y < 540) {
yy = 2;
}
if (_y < 480) {
yy = 1;
}
if (_y < 420) {
yy = 0;
}
NUMBER = yy * 3 + xx;
shirt.gotoAndStop(NUMBER);
asdf = _parent._parent;
this.onRelease = function () {
asdf.player.shirt.gotoAndStop(NUMBER);
updatetime = 1;
asdf.slideback();
asdf.slide = 1;
};
this.onRollOver = function () {
asdf.displaytext.text = shirt.id;
};
}
}
movieClip 813 {
frame 1 {
if (_x < 140) {
xx = 3;
}
if (_x < 80) {
xx = 2;
}
if (_x < 15) {
xx = 1;
}
if (_y < 660) {
yy = 4;
}
if (_y < 600) {
yy = 3;
}
if (_y < 540) {
yy = 2;
}
if (_y < 480) {
yy = 1;
}
if (_y < 420) {
yy = 0;
}
NUMBER = yy * 3 + xx;
hat.gotoAndStop(NUMBER);
asdf = _parent._parent;
this.onRelease = function () {
asdf.player.hat.gotoAndStop(NUMBER);
asdf.player.eyes.gotoAndStop(NUMBER);
updatetime = 1;
asdf.slideback();
asdf.slide = 1;
};
this.onRollOver = function () {
asdf.displaytext.text = hat.id;
};
}
}
movieClip 816 {
frame 1 {
stop();
id = 'COOL PISTOL';
}
frame 2 {
id = 'SAND HAWK';
}
frame 3 {
id = 'SINE PISTOL';
}
frame 4 {
id = 'ANGRY COW';
}
frame 5 {
id = 'FIFTY EIGHT';
}
frame 6 {
id = 'SNAKE';
}
}
movieClip 817 {
frame 1 {
if (_x < 140) {
xx = 3;
}
if (_x < 80) {
xx = 2;
}
if (_x < 15) {
xx = 1;
}
if (_y < 660) {
yy = 3;
}
if (_y < 600) {
yy = 2;
}
if (_y < 540) {
yy = 1;
}
if (_y < 480) {
yy = 0;
}
NUMBER = yy * 3 + xx;
gundisplay.gotoAndStop(NUMBER);
asdf = _parent._parent;
this.onRelease = function () {
asdf.player.gundisplay.gotoAndStop(NUMBER);
updatetime = 1;
asdf.slideback();
asdf.slide = 1;
};
this.onRollOver = function () {
asdf.displaytext.text = gundisplay.id;
};
}
}
movieClip 830 {
frame 1 {
stop();
id = 'I Don\'t Need Perks';
}
frame 2 {
id = 'Weightless Guns';
}
frame 3 {
id = 'Triple Jump';
}
frame 4 {
id = 'Minigun Maniac';
}
frame 5 {
id = 'No Recoil';
}
frame 6 {
id = 'Cancel Explosive Force';
}
frame 7 {
id = '+33% More Ammo';
}
frame 8 {
id = '+2 Extra Nades';
}
frame 9 {
id = 'Random Gun at Spawn';
}
frame 10 {
id = 'LOCKED';
}
}
movieClip 831 {
frame 1 {
if (_x < 140) {
xx = 3;
}
if (_x < 80) {
xx = 2;
}
if (_x < 15) {
xx = 1;
}
if (_y < 660) {
yy = 3;
}
if (_y < 600) {
yy = 2;
}
if (_y < 540) {
yy = 1;
}
if (_y < 480) {
yy = 0;
}
NUMBER = yy * 3 + xx;
if (NUMBER == 3 && _root.savedata3.data.levelarray[1] != 2) {
NUMBER = 10;
}
if (NUMBER == 6 && _root.savedata3.data.levelarray[4] != 2) {
NUMBER = 10;
}
if (NUMBER == 9 && _root.savedata3.data.levelarray[5] != 2) {
NUMBER = 10;
}
if (NUMBER == 10) {
this.useHandCursor = false;
}
perkdisplay.gotoAndStop(NUMBER);
asdf = _parent._parent;
this.onRelease = function () {
if (NUMBER != 10) {
asdf.perkdisplay.gotoAndStop(NUMBER);
updatetime = 1;
asdf.slideback();
asdf.slide = 1;
}
};
this.onRollOver = function () {
asdf.displaytext.text = perkdisplay.id;
};
}
}
movieClip 833 {
frame 1 {
if (_x < 140) {
xx = 3;
}
if (_x < 80) {
xx = 2;
}
if (_x < 15) {
xx = 1;
}
if (_y < 660) {
yy = 4;
}
if (_y < 600) {
yy = 3;
}
if (_y < 540) {
yy = 2;
}
if (_y < 480) {
yy = 1;
}
if (_y < 420) {
yy = 0;
}
NUMBER = yy * 3 + xx;
NUMBER += 12;
hat.gotoAndStop(NUMBER);
asdf = _parent._parent;
this.onRelease = function () {
asdf.player.hat.gotoAndStop(NUMBER);
asdf.player.eyes.gotoAndStop(NUMBER);
updatetime = 1;
asdf.slideback();
asdf.slide = 1;
};
this.onRollOver = function () {
asdf.displaytext.text = hat.id;
};
}
}
movieClip 835 {
frame 1 {
stop();
}
frame 2 {
btn_page1.onRelease = function () {
gotoAndStop(5);
};
}
frame 5 {
btn_page2.onRelease = function () {
gotoAndStop(2);
};
}
}
movieClip 846 {
}
movieClip 847 {
frame 1 {
gotoAndStop(_parent.playernumber + 1);
}
}
movieClip 848 {
frame 1 {
this.gotoAndStop(_parent.playernumber + 1);
}
}
movieClip 849 {
frame 1 {
gotoAndStop(_parent.playernumber + 1);
}
}
movieClip 851 {
frame 1 {
playernumber = 1;
stop();
}
}
movieClip 855 {
}
movieClip 856 {
frame 1 {
this.onRelease = function () {
number = 0;
number += Math.floor(_xmouse / 25);
number *= 5;
number += Math.floor(_ymouse / 25) + 1;
_parent.colornumber = number;
_parent.update();
};
mouseover = false;
this.onEnterFrame = function () {
if (mouseover) {
if (masking._alpha > 0) {
masking._alpha -= 20;
}
} else {
if (masking._alpha < 100) {
masking._alpha += 10;
}
}
};
this.onRollOver = function () {
mouseover = true;
};
this.onRollOut = function () {
mouseover = false;
};
}
}
movieClip 857 {
frame 1 {
stop();
}
frame 2 {
function slideback() {
if (_parent.menu1.slide == 2) {
_parent.menu1.slide = 1;
}
if (_parent.menu2.slide == 2) {
_parent.menu2.slide = 1;
}
if (_parent.menu3.slide == 2) {
_parent.menu3.slide = 1;
}
if (_parent.menu4.slide == 2) {
_parent.menu4.slide = 1;
}
}
function update() {
player.head.gotoAndStop(colornumber + 1);
player.body.gotoAndStop(colornumber + 1);
player.leg1.leg.gotoAndStop(colornumber + 1);
player.leg2.leg.gotoAndStop(colornumber + 1);
player.hand2.hand.gotoAndStop(colornumber + 1);
player.gundisplayhand.gotoAndStop(colornumber + 1);
}
stop();
switch (_name) {
case 'menu1':
colornumber = _root.savedata3.data.p1color;
inputname.text = _root.savedata3.data.p1name;
player.shirt.gotoAndStop(_root.savedata3.data.p1shirt);
player.hat.gotoAndStop(_root.savedata3.data.p1hat);
player.eyes.gotoAndStop(_root.savedata3.data.p1hat);
player.gundisplay.gotoAndStop(_root.savedata3.data.p1gun);
perkdisplay.gotoAndStop(_root.savedata3.data.p1perk);
playertype = _root.savedata3.data.p1ptype;
teamselect.team = _root.savedata3.data.p1team;
btn_clear._alpha = 0;
btn_clear._x = -200;
clearslotthing._alpha = 0;
clearslotthing._x = -200;
break;
case 'menu2':
colornumber = _root.savedata3.data.p2color;
inputname.text = _root.savedata3.data.p2name;
player.shirt.gotoAndStop(_root.savedata3.data.p2shirt);
player.hat.gotoAndStop(_root.savedata3.data.p2hat);
player.eyes.gotoAndStop(_root.savedata3.data.p2hat);
player.gundisplay.gotoAndStop(_root.savedata3.data.p2gun);
perkdisplay.gotoAndStop(_root.savedata3.data.p2perk);
playertype = _root.savedata3.data.p2ptype;
teamselect.team = _root.savedata3.data.p2team;
}
updated = false;
updatetime = 1;
originy = 100;
ai_notice._alpha = 0;
if (playertype == 0) {
slide = 0;
_y = 400;
} else {
if (playertype == 1) {
slide = 1;
_y = 0;
} else {
if (playertype == 2) {
slide = 1;
_y = 0;
ai_notice._alpha = 100;
}
}
}
this.onEnterFrame = function () {
if (!updated) {
update();
updated = true;
}
if (updatetime != 0) {
updatetime += 1;
}
if (updatetime == 2) {
updatetime = 0;
}
if (slide == 0) {
_y = _y + (originy + 400 - _y) / 2;
} else {
if (slide == 1) {
_y = _y + (originy - _y) / 2;
} else {
if (slide == 2) {
_y = _y + (originy - 400 - _y) / 2;
}
}
}
if (_y % 1 != 0) {
_y = Math.round(_y);
}
if (player.hat.getDepth() < player.eyes.getDepth() && player.eyes._currentframe != 8) {
player.hat.swapDepths(player.eyes);
}
};
btn_edit1.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(1);
displaytext.text = '';
};
btn_edit2.onRelease = function () {
slideback();
slide = 2;
if (player.hat._currentframe > 12) {
selectionpanel.gotoAndStop(5);
} else {
selectionpanel.gotoAndStop(2);
}
displaytext.text = '';
};
btn_edit3.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(3);
displaytext.text = '';
};
btn_edit4.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(4);
displaytext.text = '';
};
btn_back.onRelease = function () {
slideback();
slide = 1;
};
btn_clear.onRelease = function () {
slide = 0;
playertype = 0;
};
btn_player_human.onRelease = function () {
slide = 1;
playertype = 1;
ai_notice._alpha = 0;
};
}
}
movieClip 900 {
frame 1 {
stop();
}
}
movieClip 902 {
}
movieClip 904 {
frame 1 {
stop();
}
frame 2 {
stop();
info.gotoAndStop(number);
btn_start.onRelease = function () {
if (!_root.fadeaway) {
btn_start.useHandCursor = false;
_parent.startmission();
}
_root.playsound('menu.wav');
};
}
}
movieClip 906 {
}
movieClip 907 {
frame 1 {
stop();
}
}
movieClip 911 {
frame 1 {
_alpha = 0;
}
}
movieClip 913 {
frame 1 {
gunnumber = Math.round(_rotation);
dropgun.gotoAndStop(gunnumber);
_rotation = -20;
if (_root.showunlocks != 0) {
this.useHandCursor = false;
}
stop();
if (_root.savedata3.data.gunarray[gunnumber - 10] == false) {
gotoAndStop(2);
this.useHandCursor = false;
}
this.onRelease = function () {
if (_currentframe == 1) {
_parent.guncard.statdisplay.gotoAndStop(gunnumber);
_parent.guncard.dropgun.gotoAndStop(gunnumber);
}
};
}
}
movieClip 947 {
frame 1 {
stop();
}
frame 1 {
btn_continue.onRelease = function () {
_root.showunlocks = 0;
_parent.slider.enableall();
_parent.show_unlock.swapDepths(1);
removeMovieClip(_parent.show_unlock);
_root.playsound('menu.wav');
};
_parent.slider.disableall();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
}
movieClip 948 {
frame 1 {
function startmission() {
if (menu1._currentframe == menu1._totalframes) {
WRITE_DATA();
_root.p1name = menu1.inputname.text;
_root.p1color = menu1.colornumber;
_root.p1shirt = menu1.player.shirt._currentframe;
_root.p1hat = menu1.player.hat._currentframe;
_root.p1gun = menu1.player.gundisplay._currentframe;
_root.p1perk = menu1.perkdisplay._currentframe;
_root.p1ptype = menu1.playertype;
_root.p1team = menu1.teamselect.team;
_root.p2name = menu2.inputname.text;
_root.p2color = menu2.colornumber;
_root.p2shirt = menu2.player.shirt._currentframe;
_root.p2hat = menu2.player.hat._currentframe;
_root.p2gun = menu2.player.gundisplay._currentframe;
_root.p2perk = menu2.perkdisplay._currentframe;
_root.p2ptype = menu2.playertype;
_root.p2team = menu2.teamselect.team;
totalplayers = 0;
if (_root.p1ptype > 0) {
totalplayers += 1;
}
if (_root.p2ptype > 0) {
totalplayers += 1;
}
if (totalplayers >= 1) {
_root.totallives = 10;
_root.mapnumber = 5;
_root.campaignmode = true;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gototest = false;
} else {
warning.play();
}
}
}
function WRITE_DATA() {
_root.savedata3.data.p1name = menu1.inputname.text;
_root.savedata3.data.p1color = menu1.colornumber;
_root.savedata3.data.p1shirt = menu1.player.shirt._currentframe;
_root.savedata3.data.p1hat = menu1.player.hat._currentframe;
_root.savedata3.data.p1gun = menu1.player.gundisplay._currentframe;
_root.savedata3.data.p1perk = menu1.perkdisplay._currentframe;
_root.savedata3.data.p1ptype = menu1.playertype;
_root.savedata3.data.p1team = menu1.teamselect.team;
_root.savedata3.data.p2name = menu2.inputname.text;
_root.savedata3.data.p2color = menu2.colornumber;
_root.savedata3.data.p2shirt = menu2.player.shirt._currentframe;
_root.savedata3.data.p2hat = menu2.player.hat._currentframe;
_root.savedata3.data.p2gun = menu2.player.gundisplay._currentframe;
_root.savedata3.data.p2perk = menu2.perkdisplay._currentframe;
_root.savedata3.data.p2ptype = menu2.playertype;
_root.savedata3.data.p2team = menu2.teamselect.team;
}
function gotolevel(input) {
phase = 2;
infopanel.number = input;
_root.campaignlevel = input;
}
btn_back.onRelease = function () {
if (!_root.fadeaway) {
if (phase == 1) {
btn_back.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gotomenu = true;
} else {
if (phase == 3) {
phase = 4;
}
}
_root.playsound('menu.wav');
}
};
phase = 1;
menu1._alpha = 0;
menu2._alpha = 0;
infopanel._alpha = 0;
slider._x = _root.slideprevx;
vx = 0;
if (_root.savedata3.data.levelarray[1] == 2 && _root.savedata3.data.levelarray[2] == 0) {
_root.savedata3.data.levelarray[2] = 1;
}
if (_root.savedata3.data.levelarray[2] == 2 && _root.savedata3.data.levelarray[3] == 0) {
_root.savedata3.data.levelarray[3] = 1;
}
if (_root.savedata3.data.levelarray[3] == 2 && _root.savedata3.data.levelarray[4] == 0) {
_root.savedata3.data.levelarray[4] = 1;
}
if (_root.savedata3.data.levelarray[4] == 2 && _root.savedata3.data.levelarray[5] == 0) {
_root.savedata3.data.levelarray[5] = 1;
}
if (_root.savedata3.data.levelarray[5] == 2 && _root.savedata3.data.levelarray[6] == 0) {
_root.savedata3.data.levelarray[6] = 1;
}
if (_root.savedata3.data.levelarray[6] == 2 && _root.savedata3.data.levelarray[7] == 0) {
_root.savedata3.data.levelarray[7] = 1;
}
if (_root.savedata3.data.levelarray[7] == 2 && _root.savedata3.data.levelarray[8] == 0) {
_root.savedata3.data.levelarray[8] = 1;
}
if (_root.savedata3.data.levelarray[8] == 2 && _root.savedata3.data.levelarray[9] == 0) {
_root.savedata3.data.levelarray[9] = 1;
}
if (_root.showunlocks != 0) {
show_unlock.gotoAndStop(_root.showunlocks);
show_unlock._alpha = 100;
} else {
show_unlock._alpha = 0;
show_unlock.swapDepths(1);
removeMovieClip(show_unlock);
}
this.onEnterFrame = function () {
if (phase == 1) {
if (_ymouse > 100 && _ymouse < 510 && _root.showunlocks == 0) {
if (_xmouse < 150 && slider._x < 0) {
vx += (150 - _xmouse) / 8;
}
if (_xmouse > 750 && slider._x > -857) {
vx -= (_xmouse - 750) / 8;
}
}
vx *= 0.8;
slider._x += vx;
if (slider._x > 0) {
slider._x = 0;
vx = 0;
}
if (slider._x < -857) {
vx = 0;
slider._x = -857;
}
slider._x = Math.round(slider._x);
_root.slideprevx = slider._x;
} else {
if (phase == 2) {
if (slider && slider._alpha > 1) {
slider._alpha -= 20;
}
if (slider && slider._alpha <= 1) {
slider.swapDepths(1);
removeMovieClip(slider);
delete slider.onEnterFrame;
}
if (menu1._currentframe == 1) {
menu1.gotoAndStop(menu1._totalframes);
menu2.gotoAndStop(menu2._totalframes);
infopanel.gotoAndStop(2);
}
if (menu1._alpha < 100) {
menu1._alpha += 20;
menu2._alpha = menu1._alpha;
infopanel._alpha = menu1._alpha;
if (menu1._alpha >= 100) {
phase = 3;
}
}
} else {
if (phase == 4) {
if (!slider) {
asdf = this.attachMovie('menuc_slider', 'slider', 2);
asdf._alpha = 0;
asdf._x = _root.slideprevx;
}
if (menu1._alpha > 1) {
menu1._alpha -= 20;
menu2._alpha = menu1._alpha;
infopanel._alpha = menu1._alpha;
asdf._alpha += 20;
} else {
menu1._alpha = 0;
menu2._alpha = 0;
infopanel._alpha = 0;
asdf._alpha = 100;
menu1.gotoAndStop(1);
menu2.gotoAndStop(1);
infopanel.gotoAndStop(1);
phase = 1;
}
}
}
}
};
}
}
frame 5 {
stop();
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
gamewin = false;
}
movieClip 955 {
frame 1 {
stop();
}
}
movieClip 959 {
frame 1 {
stop();
}
}
movieClip 965 {
frame 1 {
function lockup() {
islock = true;
this.useHandCursor = false;
frame.gotoAndStop(1);
}
function lockup2() {
islock = false;
this.useHandCursor = true;
frame.gotoAndStop(1);
}
function taketheinput() {
_root.savedata2.data.controlarray[_parent.number][number] = _parent._parent.getinput;
_parent.refreshkeys();
}
_parent._parent.btnarray[_parent._parent.btnarray.length] = this;
islock = false;
if (keytext.text == 'Up Arrow') {
gotoAndStop(3);
}
if (keytext.text == 'Left Arrow') {
gotoAndStop(4);
}
if (keytext.text == 'Down Arrow') {
gotoAndStop(5);
}
if (keytext.text == 'Right Arrow') {
gotoAndStop(6);
}
switch (this._name) {
case 'key1':
number = 0;
break;
case 'key2':
number = 1;
break;
case 'key3':
number = 2;
break;
case 'key4':
number = 3;
break;
case 'key5':
number = 4;
break;
case 'key6':
number = 5;
}
this.onRollOver = function () {
if (!islock) {
frame.gotoAndStop(2);
}
};
this.onRollOut = function () {
if (!islock) {
frame.gotoAndStop(1);
}
};
this.onPress = function () {
if (!islock) {
_parent._parent.targetkey = this;
frame.gotoAndStop(3);
_parent._parent.disableall();
_parent._parent.lockup._alpha = 100;
}
};
}
frame 2 {
stop();
}
}
movieClip 972 {
frame 1 {
function refreshkeys() {
key1.gotoAndPlay(1);
key2.gotoAndPlay(1);
key3.gotoAndPlay(1);
key4.gotoAndPlay(1);
key5.gotoAndPlay(1);
key6.gotoAndPlay(1);
key1.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][0]);
key2.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][1]);
key3.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][2]);
key4.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][3]);
key5.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][4]);
key6.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][5]);
}
function codeToChar(input) {
returnvalue = ' ';
switch (input) {
case 8:
returnvalue = 'BS';
break;
case 13:
returnvalue = 'Entr';
break;
case 16:
returnvalue = 'Shft';
break;
case 17:
returnvalue = 'Ctrl';
break;
case 20:
returnvalue = 'Cpsl';
break;
case 33:
returnvalue = 'PgU';
break;
case 34:
returnvalue = 'PgD';
break;
case 35:
returnvalue = 'End';
break;
case 36:
returnvalue = 'Hom';
break;
case 37:
returnvalue = 'Left Arrow';
break;
case 38:
returnvalue = 'Up Arrow';
break;
case 39:
returnvalue = 'Right Arrow';
break;
case 40:
returnvalue = 'Down Arrow';
break;
case 45:
returnvalue = 'Ins';
break;
case 46:
returnvalue = 'Del';
break;
case 145:
returnvalue = 'Scrl';
break;
case 96:
returnvalue = 'np0';
break;
case 97:
returnvalue = 'np1';
break;
case 98:
returnvalue = 'np2';
break;
case 99:
returnvalue = 'np3';
break;
case 100:
returnvalue = 'np4';
break;
case 101:
returnvalue = 'np5';
break;
case 102:
returnvalue = 'np6';
break;
case 103:
returnvalue = 'np7';
break;
case 104:
returnvalue = 'np8';
break;
case 105:
returnvalue = 'np9';
break;
case 106:
returnvalue = 'np*';
break;
case 107:
returnvalue = 'np+';
break;
case 109:
returnvalue = 'np-';
break;
case 110:
returnvalue = 'np.';
break;
case 111:
returnvalue = 'np/';
break;
case 113:
returnvalue = 'F2';
break;
case 115:
returnvalue = 'F4';
break;
case 118:
returnvalue = 'F7';
break;
case 119:
returnvalue = 'F8';
break;
case 120:
returnvalue = 'F9';
break;
case 121:
returnvalue = 'F10';
break;
case 123:
returnvalue = 'F12';
break;
case 186:
returnvalue = ';';
break;
case 187:
returnvalue = '=';
break;
case 188:
returnvalue = ',';
break;
case 189:
returnvalue = '-';
break;
case 190:
returnvalue = '.';
break;
case 191:
returnvalue = '/';
break;
case 192:
returnvalue = '`';
break;
case 219:
returnvalue = '[';
break;
case 220:
returnvalue = '\\';
break;
case 221:
returnvalue = ']';
break;
case 222:
returnvalue = '\'';
}
if (input >= 65 && input <= 90 || input >= 48 && input <= 57) {
returnvalue = String.fromCharCode(input);
}
return returnvalue;
}
stop();
switch (_name) {
case 'p1':
number = 0;
break;
case 'p2':
number = 1;
break;
case 'p3':
number = 2;
break;
case 'p4':
number = 3;
}
pnumber.gotoAndStop(number + 1);
refreshkeys();
}
}
movieClip 982 {
frame 1 {
stop();
this.onRollOver = function () {
if (_currentframe == 1) {
gotoAndStop(2);
}
};
this.onRollOut = function () {
if (_currentframe == 2) {
gotoAndStop(1);
}
};
this.useHandCursor = true;
}
frame 3 {
this.useHandCursor = false;
}
}
movieClip 990 {
}
movieClip 991 {
frame 1 {
function disableall() {
i = 0;
while (i < btnarray.length) {
btnarray[i].lockup();
++i;
}
btn_back.useHandCursor = false;
islocked = true;
lockup._alpha = 100;
}
function enableall() {
i = 0;
while (i < btnarray.length) {
btnarray[i].lockup2();
++i;
}
btn_back.useHandCursor = true;
islocked = false;
lockup._alpha = 0;
}
function checkifvalid(input) {
returnvalue = false;
switch (input) {
case 8:
returnvalue = true;
break;
case 13:
returnvalue = true;
break;
case 16:
returnvalue = true;
break;
case 17:
returnvalue = true;
break;
case 20:
returnvalue = true;
break;
case 33:
returnvalue = true;
break;
case 34:
returnvalue = true;
break;
case 35:
returnvalue = true;
break;
case 36:
returnvalue = true;
break;
case 37:
returnvalue = true;
break;
case 38:
returnvalue = true;
break;
case 39:
returnvalue = true;
break;
case 40:
returnvalue = true;
break;
case 45:
returnvalue = true;
break;
case 46:
returnvalue = true;
break;
case 145:
returnvalue = true;
break;
case 96:
returnvalue = true;
break;
case 97:
returnvalue = true;
break;
case 98:
returnvalue = true;
break;
case 99:
returnvalue = true;
break;
case 100:
returnvalue = true;
break;
case 101:
returnvalue = true;
break;
case 102:
returnvalue = true;
break;
case 103:
returnvalue = true;
break;
case 104:
returnvalue = true;
break;
case 105:
returnvalue = true;
break;
case 106:
returnvalue = true;
break;
case 107:
returnvalue = true;
break;
case 109:
returnvalue = true;
break;
case 110:
returnvalue = true;
break;
case 111:
returnvalue = true;
break;
case 113:
returnvalue = true;
break;
case 115:
returnvalue = true;
break;
case 118:
returnvalue = true;
break;
case 119:
returnvalue = true;
break;
case 120:
returnvalue = true;
break;
case 121:
returnvalue = true;
break;
case 123:
returnvalue = true;
break;
case 186:
returnvalue = true;
break;
case 187:
returnvalue = true;
break;
case 188:
returnvalue = true;
break;
case 189:
returnvalue = true;
break;
case 190:
returnvalue = true;
break;
case 191:
returnvalue = true;
break;
case 192:
returnvalue = true;
break;
case 219:
returnvalue = true;
break;
case 220:
returnvalue = true;
break;
case 221:
returnvalue = true;
break;
case 222:
returnvalue = true;
}
if (input >= 65 && input <= 90 || input >= 48 && input <= 57) {
returnvalue = true;
}
return returnvalue;
}
btn_back.onRelease = function () {
if (!_root.fadeaway && !islocked) {
btn_back.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gotomenu = true;
_root.playsound('menu.wav');
}
};
lockup._alpha = 0;
btnarray = new Array();
islocked = false;
getinput = -1;
keyListener = new Object();
keyListener.onKeyDown = function () {
if (islocked && checkifvalid(Key.getCode())) {
islocked = false;
getinput = Key.getCode();
enableall();
targetkey.taketheinput();
}
};
Key.addListener(keyListener);
if (_root.savedata2.data.musicON) {
music1.gotoAndStop(3);
}
if (!_root.savedata2.data.musicON) {
music2.gotoAndStop(3);
}
music1.onRelease = function () {
if (music1._currentframe != 3) {
_root.savedata2.data.musicON = true;
music1.gotoAndStop(3);
music2.gotoAndStop(1);
}
};
music2.onRelease = function () {
if (music2._currentframe != 3) {
_root.savedata2.data.musicON = false;
music2.gotoAndStop(3);
music1.gotoAndStop(1);
_root.stopallmusic();
}
};
if (_root.savedata2.data.soundON) {
sound1.gotoAndStop(3);
}
if (!_root.savedata2.data.soundON) {
sound2.gotoAndStop(3);
}
sound1.onRelease = function () {
if (sound1._currentframe != 3) {
_root.savedata2.data.soundON = true;
sound1.gotoAndStop(3);
sound2.gotoAndStop(1);
}
};
sound2.onRelease = function () {
if (sound2._currentframe != 3) {
_root.savedata2.data.soundON = false;
sound2.gotoAndStop(3);
sound1.gotoAndStop(1);
}
};
if (_root.savedata2.data.def_quality == 1) {
quality1.gotoAndStop(3);
}
if (_root.savedata2.data.def_quality == 2) {
quality2.gotoAndStop(3);
}
if (_root.savedata2.data.def_quality == 3) {
quality3.gotoAndStop(3);
}
quality1.onRelease = function () {
if (quality1._currentframe != 3) {
_root.savedata2.data.def_quality = 1;
quality1.gotoAndStop(3);
quality2.gotoAndStop(1);
quality3.gotoAndStop(1);
}
};
quality2.onRelease = function () {
if (quality2._currentframe != 3) {
_root.savedata2.data.def_quality = 2;
quality2.gotoAndStop(3);
quality1.gotoAndStop(1);
quality3.gotoAndStop(1);
}
};
quality3.onRelease = function () {
if (quality3._currentframe != 3) {
_root.savedata2.data.def_quality = 3;
quality3.gotoAndStop(3);
quality1.gotoAndStop(1);
quality2.gotoAndStop(1);
}
};
}
}
frame 6 {
stop();
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
gamewin = false;
}
// unknown tag 88 length 146
movieClip 1016 {
frame 1 {
stop();
switch (_name) {
case 'p1':
number = 0;
break;
case 'p2':
number = 1;
break;
case 'p3':
number = 2;
break;
case 'p4':
number = 3;
}
if (_root.pgsdata[number][1] == -1) {
gotoAndStop(2);
} else {
text0.text = _root.pgsdata[number][0];
text1.text = _root.pgsdata[number][1];
if (parseInt(text1.text) > _parent.win1.maxx) {
_parent.win1.maxx = parseInt(text1.text);
_parent.win1._x = _x;
} else {
if (parseInt(text1.text) == _parent.win1.maxx) {
_parent.win1.maxx = parseInt(text1.text);
_parent.win1._x = -200;
}
}
text2.text = _root.pgsdata[number][2];
text3.text = Math.round((parseInt(text1.text) / parseInt(text2.text)) * 100) / 100;
if (parseInt(text1.text) / parseInt(text2.text) > 100000) {
text3.text = text1.text;
}
if (isNaN(parseInt(text1.text) / parseInt(text2.text))) {
text3.text = 0;
}
if (parseInt(text3.text) > _parent.win2.maxx) {
_parent.win2.maxx = parseInt(text3.text);
_parent.win2._x = _x;
} else {
if (parseInt(text3.text) == _parent.win2.maxx) {
_parent.win2.maxx = parseInt(text3.text);
_parent.win2._x = -200;
}
}
text4.text = _root.pgsdata[number][3];
text5.text = _root.pgsdata[number][4];
percentage = Math.round((parseInt(text5.text) / parseInt(text4.text)) * 100);
text6.text = percentage + '%';
if (percentage > _parent.win3.maxx) {
_parent.win3.maxx = percentage;
_parent.win3._x = _x;
} else {
if (percentage == _parent.win3.maxx) {
_parent.win3.maxx = percentage;
_parent.win3._x = -200;
}
}
text7.text = _root.pgsdata[number][5];
text8.text = _root.pgsdata[number][6];
text9.text = _root.pgsdata[number][7] * percentage / 100;
if (parseInt(text9.text) > _parent.win4.maxx) {
_parent.win4.maxx = parseInt(text9.text);
_parent.win4._x = _x;
} else {
if (parseInt(text9.text) == _parent.win4.maxx) {
_parent.win4.maxx = parseInt(text9.text);
_parent.win4._x = -200;
}
}
if (isNaN(parseInt(text5.text) / parseInt(text4.text))) {
text6.text = '0%';
text9.text = 0;
}
}
}
}
movieClip 1018 {
}
movieClip 1019 {
frame 1 {
btn_back.onRelease = function () {
if (!_root.fadeaway) {
btn_back.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 9;
_root.gotomenu = false;
_root.playsound('menu.wav');
}
};
win1.maxx = 0;
win2.maxx = 0;
win3.maxx = 0;
win4.maxx = 0;
win1._x = -200;
win2._x = -200;
win3._x = -200;
win4._x = -200;
}
}
frame 7 {
stop();
}
// unknown tag 88 length 74
// unknown tag 88 length 67
movieClip 1046 {
frame 1 {
btn_back.onRelease = function () {
if (!_root.fadeaway) {
btn_back.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gotomenu = true;
_root.playsound('menu.wav');
}
};
btn_credits.onPress = function () {
getURL('http://www.thekevingu.com', _blank);
};
btn_music.onPress = function () {
getURL('http://www.incompetech.com', _blank);
};
}
}
frame 8 {
stop();
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
gamewin = false;
_root.showunlocks = 0;
}
movieClip 1048 {
}
movieClip 1052 {
}
movieClip 1061 {
}
movieClip 1190 {
frame 1 {
stop();
}
}
movieClip 1197 {
frame 1 {
statdisplay.gotoAndStop(7);
dropgun.gotoAndStop(7);
testbtn.onRelease = function () {
if (statdisplay._currentframe != 7) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.campaignmode = false;
_root.mapnumber = 13;
_root.gototest = true;
_root.gototestnumber = dropgun._currentframe;
}
};
}
}
movieClip 1198 {
frame 1 {
btn_back.onRelease = function () {
if (!_root.fadeaway) {
btn_back.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gotomenu = true;
_root.playsound('menu.wav');
}
};
}
}
frame 9 {
stop();
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
gamewin = false;
crateON = true;
powerON = true;
this.onEnterFrame = function () {
_x = 0;
_y = 0;
_xscale = 100;
_yscale = 100;
_quality = 'HIGH';
delete this.onEnterFrame;
};
}
movieClip 1199 {
}
movieClip 1200 {
frame 1 {
stop();
this.onRollOver = function () {
gotoAndPlay(2);
_parent.allplay();
};
this.onRollOut = function () {
gotoAndPlay(9);
};
this.onRelease = function () {
_parent.alldisable();
chosen._alpha = 100;
switch (_name) {
case 'mapbtn0':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 0);
_root.mapnumber = 0;
break;
case 'mapbtn1':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 1);
_root.mapnumber = _parent.mapdisplay._totalframes - 1;
break;
case 'mapbtn2':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 2);
_root.mapnumber = _parent.mapdisplay._totalframes - 2;
break;
case 'mapbtn3':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 3);
_root.mapnumber = _parent.mapdisplay._totalframes - 3;
break;
case 'mapbtn4':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 4);
_root.mapnumber = _parent.mapdisplay._totalframes - 4;
break;
case 'mapbtn5':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 5);
_root.mapnumber = _parent.mapdisplay._totalframes - 5;
break;
case 'mapbtn6':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 6);
_root.mapnumber = _parent.mapdisplay._totalframes - 6;
break;
case 'mapbtn7':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 7);
_root.mapnumber = _parent.mapdisplay._totalframes - 7;
break;
case 'mapbtn8':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 8);
_root.mapnumber = _parent.mapdisplay._totalframes - 8;
break;
case 'mapbtn9':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 9);
_root.mapnumber = _parent.mapdisplay._totalframes - 9;
break;
case 'mapbtn10':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 10);
_root.mapnumber = _parent.mapdisplay._totalframes - 10;
break;
case 'mapbtn11':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 11);
_root.mapnumber = _parent.mapdisplay._totalframes - 11;
break;
case 'mapbtn12':
_parent.mapdisplay.gotoAndStop(_parent.mapdisplay._totalframes - 12);
_root.mapnumber = _parent.mapdisplay._totalframes - 12;
}
};
}
frame 8 {
stop();
}
frame 14 {
gotoAndPlay(1);
}
}
movieClip 1230 {
}
// unknown tag 88 length 68
movieClip 1265 {
frame 1 {
stop();
}
}
movieClip 1273 {
frame 4 {
if (!_root.crateON) {
check1.gotoAndStop(2);
}
if (!_root.powerON) {
check2.gotoAndStop(2);
}
check1.onRelease = function () {
if (_root.crateON) {
_root.crateON = false;
check1.gotoAndStop(2);
} else {
if (!_root.crateON) {
_root.crateON = true;
check1.gotoAndStop(1);
}
}
};
check2.onRelease = function () {
if (_root.powerON) {
_root.powerON = false;
check2.gotoAndStop(2);
} else {
if (!_root.powerON) {
_root.powerON = true;
check2.gotoAndStop(1);
}
}
};
}
frame 5 {
if (!_root.crateON) {
check1.gotoAndStop(2);
}
check1.onRelease = function () {
if (_root.crateON) {
_root.crateON = false;
check1.gotoAndStop(2);
} else {
if (!_root.crateON) {
_root.crateON = true;
check1.gotoAndStop(1);
}
}
};
}
frame 6 {
if (!_root.crateON) {
check1.gotoAndStop(2);
}
if (!_root.powerON) {
check2.gotoAndStop(2);
}
check1.onRelease = function () {
if (_root.crateON) {
_root.crateON = false;
check1.gotoAndStop(2);
} else {
if (!_root.crateON) {
_root.crateON = true;
check1.gotoAndStop(1);
}
}
};
check2.onRelease = function () {
if (_root.powerON) {
_root.powerON = false;
check2.gotoAndStop(2);
} else {
if (!_root.powerON) {
_root.powerON = true;
check2.gotoAndStop(1);
}
}
};
}
}
movieClip 1282 {
frame 1 {
stop();
this.onRollOver = function () {
gotoAndPlay(2);
_parent.modeallplay();
};
this.onRollOut = function () {
gotoAndPlay(9);
};
this.onRelease = function () {
_parent.modealldisable();
chosen._alpha = 100;
switch (_name) {
case 'modebtn1':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 0);
_root.gamemode = 1;
break;
case 'modebtn2':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 1);
_root.gamemode = 2;
break;
case 'modebtn3':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 2);
_root.gamemode = 3;
break;
case 'modebtn4':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 3);
_root.gamemode = 4;
break;
case 'modebtn5':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 4);
_root.gamemode = 5;
break;
case 'modebtn6':
_parent.modedisplay.gotoAndStop(_parent.modedisplay._totalframes - 5);
_root.gamemode = 6;
}
};
}
frame 8 {
stop();
}
frame 14 {
gotoAndPlay(1);
}
}
movieClip 1300 {
}
movieClip 1301 {
}
movieClip 1302 {
frame 1 {
stop();
}
frame 2 {
stop();
this.onEnterFrame = function () {
if (_parent._x < 5) {
delete this.onEnterFrame;
play();
}
};
}
frame 3 {
function slideback() {
if (_parent.menu1.slide == 2) {
_parent.menu1.slide = 1;
}
if (_parent.menu2.slide == 2) {
_parent.menu2.slide = 1;
}
if (_parent.menu3.slide == 2) {
_parent.menu3.slide = 1;
}
if (_parent.menu4.slide == 2) {
_parent.menu4.slide = 1;
}
}
function update() {
player.head.gotoAndStop(colornumber + 1);
player.body.gotoAndStop(colornumber + 1);
player.leg1.leg.gotoAndStop(colornumber + 1);
player.leg2.leg.gotoAndStop(colornumber + 1);
player.hand2.hand.gotoAndStop(colornumber + 1);
player.gundisplayhand.gotoAndStop(colornumber + 1);
}
switch (_name) {
case 'menu1':
colornumber = _parent.savedata.data.p1color;
inputname.text = _parent.savedata.data.p1name;
player.shirt.gotoAndStop(_parent.savedata.data.p1shirt);
player.hat.gotoAndStop(_parent.savedata.data.p1hat);
player.eyes.gotoAndStop(_parent.savedata.data.p1hat);
player.gundisplay.gotoAndStop(_parent.savedata.data.p1gun);
perkdisplay.gotoAndStop(_parent.savedata.data.p1perk);
playertype = _parent.savedata.data.p1ptype;
teamselect.team = _parent.savedata.data.p1team;
break;
case 'menu2':
colornumber = _parent.savedata.data.p2color;
inputname.text = _parent.savedata.data.p2name;
player.shirt.gotoAndStop(_parent.savedata.data.p2shirt);
player.hat.gotoAndStop(_parent.savedata.data.p2hat);
player.eyes.gotoAndStop(_parent.savedata.data.p2hat);
player.gundisplay.gotoAndStop(_parent.savedata.data.p2gun);
perkdisplay.gotoAndStop(_parent.savedata.data.p2perk);
playertype = _parent.savedata.data.p2ptype;
teamselect.team = _parent.savedata.data.p2team;
break;
case 'menu3':
colornumber = _parent.savedata.data.p3color;
inputname.text = _parent.savedata.data.p3name;
player.shirt.gotoAndStop(_parent.savedata.data.p3shirt);
player.hat.gotoAndStop(_parent.savedata.data.p3hat);
player.eyes.gotoAndStop(_parent.savedata.data.p3hat);
player.gundisplay.gotoAndStop(_parent.savedata.data.p3gun);
perkdisplay.gotoAndStop(_parent.savedata.data.p3perk);
playertype = _parent.savedata.data.p3ptype;
teamselect.team = _parent.savedata.data.p3team;
break;
case 'menu4':
colornumber = _parent.savedata.data.p4color;
inputname.text = _parent.savedata.data.p4name;
player.shirt.gotoAndStop(_parent.savedata.data.p4shirt);
player.hat.gotoAndStop(_parent.savedata.data.p4hat);
player.eyes.gotoAndStop(_parent.savedata.data.p4hat);
player.gundisplay.gotoAndStop(_parent.savedata.data.p4gun);
perkdisplay.gotoAndStop(_parent.savedata.data.p4perk);
playertype = _parent.savedata.data.p4ptype;
teamselect.team = _parent.savedata.data.p4team;
}
updated = false;
updatetime = 1;
originy = 100;
ai_notice._alpha = 0;
if (playertype == 0) {
slide = 0;
_y = 400;
} else {
if (playertype == 1) {
slide = 1;
_y = 0;
} else {
if (playertype == 2) {
slide = 1;
_y = 0;
ai_notice._alpha = 100;
}
}
}
this.onEnterFrame = function () {
if (!updated) {
update();
updated = true;
}
if (updatetime != 0) {
updatetime += 1;
}
if (updatetime == 2) {
updatetime = 0;
}
if (slide == 0) {
_y = _y + (originy + 400 - _y) / 2;
} else {
if (slide == 1) {
_y = _y + (originy - _y) / 2;
} else {
if (slide == 2) {
_y = _y + (originy - 400 - _y) / 2;
}
}
}
if (_y % 1 != 0) {
_y = Math.round(_y);
}
if (player.hat.getDepth() < player.eyes.getDepth() && player.eyes._currentframe != 8) {
player.hat.swapDepths(player.eyes);
}
};
btn_edit1.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(1);
displaytext.text = '';
};
btn_edit2.onRelease = function () {
slideback();
slide = 2;
if (player.hat._currentframe > 12) {
selectionpanel.gotoAndStop(5);
} else {
selectionpanel.gotoAndStop(2);
}
displaytext.text = '';
};
btn_edit3.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(3);
displaytext.text = '';
};
btn_edit4.onRelease = function () {
slideback();
slide = 2;
selectionpanel.gotoAndStop(4);
displaytext.text = '';
};
btn_back.onRelease = function () {
slideback();
slide = 1;
};
btn_clear.onRelease = function () {
slide = 0;
playertype = 0;
};
btn_player_human.onRelease = function () {
slide = 1;
playertype = 1;
ai_notice._alpha = 0;
};
btn_player_ai.onRelease = function () {
slide = 1;
playertype = 2;
ai_notice._alpha = 100;
};
}
frame 12 {
stop();
}
}
movieClip 1304 {
}
movieClip 1305 {
frame 1 {
stop();
}
}
movieClip 1307 {
}
movieClip 1308 {
frame 1 {
stop();
}
}
movieClip 1309 {
frame 1 {
function modeallplay() {
if (modebtn1._currentframe != 1) {
modebtn1.play();
}
if (modebtn2._currentframe != 1) {
modebtn2.play();
}
if (modebtn3._currentframe != 1) {
modebtn3.play();
}
if (modebtn4._currentframe != 1) {
modebtn4.play();
}
if (modebtn5._currentframe != 1) {
modebtn5.play();
}
if (modebtn6._currentframe != 1) {
modebtn6.play();
}
}
function modealldisable() {
modebtn1.chosen._alpha = 0;
modebtn2.chosen._alpha = 0;
modebtn3.chosen._alpha = 0;
modebtn4.chosen._alpha = 0;
modebtn5.chosen._alpha = 0;
modebtn6.chosen._alpha = 0;
}
function allplay() {
if (mapbtn0._currentframe != 1) {
mapbtn0.play();
}
if (mapbtn1._currentframe != 1) {
mapbtn1.play();
}
if (mapbtn2._currentframe != 1) {
mapbtn2.play();
}
if (mapbtn3._currentframe != 1) {
mapbtn3.play();
}
if (mapbtn4._currentframe != 1) {
mapbtn4.play();
}
if (mapbtn5._currentframe != 1) {
mapbtn5.play();
}
if (mapbtn6._currentframe != 1) {
mapbtn6.play();
}
if (mapbtn7._currentframe != 1) {
mapbtn7.play();
}
if (mapbtn8._currentframe != 1) {
mapbtn8.play();
}
if (mapbtn9._currentframe != 1) {
mapbtn9.play();
}
if (mapbtn10._currentframe != 1) {
mapbtn10.play();
}
if (mapbtn11._currentframe != 1) {
mapbtn11.play();
}
if (mapbtn12._currentframe != 1) {
mapbtn12.play();
}
}
function alldisable() {
mapbtn0.chosen._alpha = 0;
mapbtn1.chosen._alpha = 0;
mapbtn2.chosen._alpha = 0;
mapbtn3.chosen._alpha = 0;
mapbtn4.chosen._alpha = 0;
mapbtn5.chosen._alpha = 0;
mapbtn6.chosen._alpha = 0;
mapbtn7.chosen._alpha = 0;
mapbtn8.chosen._alpha = 0;
mapbtn9.chosen._alpha = 0;
mapbtn10.chosen._alpha = 0;
mapbtn11.chosen._alpha = 0;
mapbtn12.chosen._alpha = 0;
}
function WRITE_DATA() {
savedata.data.mapnumber = mapdisplay._currentframe;
savedata.data.gamemode = modedisplay._currentframe;
savedata.data.p1name = menu1.inputname.text;
savedata.data.p1color = menu1.colornumber;
savedata.data.p1shirt = menu1.player.shirt._currentframe;
savedata.data.p1hat = menu1.player.hat._currentframe;
savedata.data.p1gun = menu1.player.gundisplay._currentframe;
savedata.data.p1perk = menu1.perkdisplay._currentframe;
savedata.data.p1ptype = menu1.playertype;
savedata.data.p1team = menu1.teamselect.team;
savedata.data.p2name = menu2.inputname.text;
savedata.data.p2color = menu2.colornumber;
savedata.data.p2shirt = menu2.player.shirt._currentframe;
savedata.data.p2hat = menu2.player.hat._currentframe;
savedata.data.p2gun = menu2.player.gundisplay._currentframe;
savedata.data.p2perk = menu2.perkdisplay._currentframe;
savedata.data.p2ptype = menu2.playertype;
savedata.data.p2team = menu2.teamselect.team;
savedata.data.p3name = menu3.inputname.text;
savedata.data.p3color = menu3.colornumber;
savedata.data.p3shirt = menu3.player.shirt._currentframe;
savedata.data.p3hat = menu3.player.hat._currentframe;
savedata.data.p3gun = menu3.player.gundisplay._currentframe;
savedata.data.p3perk = menu3.perkdisplay._currentframe;
savedata.data.p3ptype = menu3.playertype;
savedata.data.p3team = menu3.teamselect.team;
savedata.data.p4name = menu4.inputname.text;
savedata.data.p4color = menu4.colornumber;
savedata.data.p4shirt = menu4.player.shirt._currentframe;
savedata.data.p4hat = menu4.player.hat._currentframe;
savedata.data.p4gun = menu4.player.gundisplay._currentframe;
savedata.data.p4perk = menu4.perkdisplay._currentframe;
savedata.data.p4ptype = menu4.playertype;
savedata.data.p4team = menu4.teamselect.team;
}
savedata = SharedObject.getLocal('arenagamedata');
if (!savedata.data.filled) {
savedata.data.filled = true;
savedata.data.mapnumber = mapdisplay._totalframes;
savedata.data.gamemode = modedisplay._totalframes;
savedata.data.p1name = 'Player 1';
savedata.data.p1color = 2;
savedata.data.p1shirt = 1;
savedata.data.p1hat = 1;
savedata.data.p1gun = 1;
savedata.data.p1perk = 7;
savedata.data.p1ptype = 1;
savedata.data.p2name = 'Player 2';
savedata.data.p2color = 5;
savedata.data.p2shirt = 1;
savedata.data.p2hat = 1;
savedata.data.p2gun = 1;
savedata.data.p2perk = 7;
savedata.data.p2ptype = 1;
savedata.data.p3name = 'Player 3';
savedata.data.p3color = 8;
savedata.data.p3shirt = 1;
savedata.data.p3hat = 1;
savedata.data.p3gun = 1;
savedata.data.p3perk = 7;
savedata.data.p3ptype = 0;
savedata.data.p4name = 'Player 4';
savedata.data.p4color = 10;
savedata.data.p4shirt = 1;
savedata.data.p4hat = 1;
savedata.data.p4gun = 1;
savedata.data.p4perk = 7;
savedata.data.p4ptype = 0;
savedata.data.p1team = 1;
savedata.data.p2team = 2;
savedata.data.p3team = 1;
savedata.data.p4team = 2;
}
_x = 1800;
frame = 3;
_root.mapnumber = 0;
mapdisplay.gotoAndStop(_root.mapnumber);
if (_root.mapnumber == 0) {
mapdisplay.gotoAndStop(mapdisplay._totalframes);
}
_root.gamemode = 1;
modedisplay.gotoAndStop(modedisplay._totalframes);
alldisable();
modealldisable();
mapdisplay.gotoAndStop(savedata.data.mapnumber);
_root.mapnumber = mapdisplay._currentframe;
if (mapdisplay._currentframe == mapdisplay._totalframes) {
_root.mapnumber = 0;
}
modedisplay.gotoAndStop(savedata.data.gamemode);
_root.gamemode = modedisplay._totalframes - savedata.data.gamemode + 1;
switch (mapdisplay._totalframes - savedata.data.mapnumber + 1) {
case 1:
mapbtn0.chosen._alpha = 100;
break;
case 2:
mapbtn1.chosen._alpha = 100;
break;
case 3:
mapbtn2.chosen._alpha = 100;
break;
case 4:
mapbtn3.chosen._alpha = 100;
break;
case 5:
mapbtn4.chosen._alpha = 100;
break;
case 6:
mapbtn5.chosen._alpha = 100;
break;
case 7:
mapbtn6.chosen._alpha = 100;
break;
case 8:
mapbtn7.chosen._alpha = 100;
break;
case 9:
mapbtn8.chosen._alpha = 100;
break;
case 10:
mapbtn9.chosen._alpha = 100;
break;
case 11:
mapbtn10.chosen._alpha = 100;
break;
case 12:
mapbtn11.chosen._alpha = 100;
break;
case 13:
mapbtn12.chosen._alpha = 100;
}
switch (modedisplay._currentframe) {
case 1:
modebtn6.chosen._alpha = 100;
break;
case 2:
modebtn5.chosen._alpha = 100;
break;
case 3:
modebtn4.chosen._alpha = 100;
break;
case 4:
modebtn3.chosen._alpha = 100;
break;
case 5:
modebtn2.chosen._alpha = 100;
break;
case 6:
modebtn1.chosen._alpha = 100;
}
this.onEnterFrame = function () {
if (frame == 1) {
_x = _x + -_x / 3;
} else {
if (frame == 2) {
_x = _x + (900 - _x) / 3;
} else {
if (frame == 3) {
_x = _x + (1800 - _x) / 3;
}
}
}
if (_x % 1 != 0) {
_x = Math.round(_x);
}
};
btn_continue.onRelease = function () {
_root.playsound('menu.wav');
frame = 1;
menu1.play();
menu2.play();
menu3.play();
menu4.play();
};
btn_continue2.onRelease = function () {
_root.playsound('menu.wav');
if (modedisplay._currentframe < 4) {
frame = 2;
} else {
if (parseInt(modedisplay.inputlives.text) > 0) {
frame = 2;
} else {
warning1.play();
}
}
};
btn_back.onRelease = function () {
_root.playsound('menu.wav');
WRITE_DATA();
frame = 2;
menu1.gotoAndStop(1);
menu2.gotoAndStop(1);
menu3.gotoAndStop(1);
menu4.gotoAndStop(1);
};
btn_back2.onRelease = function () {
_root.playsound('menu.wav');
frame = 3;
};
btn_back3.onRelease = function () {
if (!_root.fadeaway) {
_root.playsound('menu.wav');
btn_back3.useHandCursor = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gotomenu = true;
}
};
btn_start.onRelease = function () {
if (!_root.fadeaway && menu1._currentframe == menu1._totalframes) {
if (_root.mapnumber == 0) {
_root.mapnumber = random(mapdisplay._totalframes - 1) + 1;
}
WRITE_DATA();
_root.p1name = menu1.inputname.text;
_root.p1color = menu1.colornumber;
_root.p1shirt = menu1.player.shirt._currentframe;
_root.p1hat = menu1.player.hat._currentframe;
_root.p1gun = menu1.player.gundisplay._currentframe;
_root.p1perk = menu1.perkdisplay._currentframe;
_root.p1ptype = menu1.playertype;
_root.p1team = menu1.teamselect.team;
_root.p2name = menu2.inputname.text;
_root.p2color = menu2.colornumber;
_root.p2shirt = menu2.player.shirt._currentframe;
_root.p2hat = menu2.player.hat._currentframe;
_root.p2gun = menu2.player.gundisplay._currentframe;
_root.p2perk = menu2.perkdisplay._currentframe;
_root.p2ptype = menu2.playertype;
_root.p2team = menu2.teamselect.team;
_root.p3name = menu3.inputname.text;
_root.p3color = menu3.colornumber;
_root.p3shirt = menu3.player.shirt._currentframe;
_root.p3hat = menu3.player.hat._currentframe;
_root.p3gun = menu3.player.gundisplay._currentframe;
_root.p3perk = menu3.perkdisplay._currentframe;
_root.p3ptype = menu3.playertype;
_root.p3team = menu3.teamselect.team;
_root.p4name = menu4.inputname.text;
_root.p4color = menu4.colornumber;
_root.p4shirt = menu4.player.shirt._currentframe;
_root.p4hat = menu4.player.hat._currentframe;
_root.p4gun = menu4.player.gundisplay._currentframe;
_root.p4perk = menu4.perkdisplay._currentframe;
_root.p4ptype = menu4.playertype;
_root.p4team = menu4.teamselect.team;
_root.campaignmode = false;
totalplayers = 0;
if (_root.p1ptype > 0) {
totalplayers += 1;
}
if (_root.p2ptype > 0) {
totalplayers += 1;
}
if (_root.p3ptype > 0) {
totalplayers += 1;
}
if (_root.p4ptype > 0) {
totalplayers += 1;
}
if (totalplayers >= 2) {
_root.totallives = modedisplay.inputlives.text;
btn_start.useHandCursor = false;
_root.campaignmode = false;
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 10;
_root.gototest = false;
} else {
warning2.play();
}
}
};
}
}
instance menup of movieClip 1309 {
}
frame 10 {
function endgame() {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
if (!campaignmode) {
newmc.targetframe = 6;
} else {
newmc.targetframe = 4;
}
newmc._x = -_root._x;
newmc._y = -_root._y;
}
function zombielevelup() {
zombiewave += 1;
zombiekilled = zombiewave * 5;
zombiekilledgoal = zombiewave * 5;
_root.attachMovie('fx_zombiewaveup', 'fx_teamwin', _root.teamwindepth);
}
function returntomenu() {
if (campaignmode) {
playerwin = true;
i = 0;
while (i < activeplayers.length) {
if (activeplayers[i].AI) {
playerwin = false;
break;
}
++i;
}
if (playerwin) {
_root.savedata3.data.levelarray[campaignlevel - 1] = 2;
_root.showunlocks = campaignlevel;
switch (campaignlevel) {
case 1:
_root.savedata3.data.gunarray[18] = true;
_root.savedata3.data.gunarray[29] = true;
break;
case 2:
_root.savedata3.data.gunarray[40] = true;
_root.savedata3.data.gunarray[52] = true;
break;
case 3:
_root.savedata3.data.gunarray[19] = true;
_root.savedata3.data.gunarray[30] = true;
break;
case 4:
_root.savedata3.data.gunarray[41] = true;
_root.savedata3.data.gunarray[53] = true;
break;
case 5:
_root.savedata3.data.gunarray[20] = true;
_root.savedata3.data.gunarray[31] = true;
break;
case 6:
_root.savedata3.data.gunarray[42] = true;
_root.savedata3.data.gunarray[54] = true;
break;
case 7:
_root.savedata3.data.gunarray[21] = true;
_root.savedata3.data.gunarray[32] = true;
break;
case 8:
_root.savedata3.data.gunarray[43] = true;
_root.savedata3.data.gunarray[55] = true;
break;
case 9:
_root.savedata3.data.gunarray[22] = true;
_root.savedata3.data.gunarray[33] = true;
break;
case 10:
_root.savedata3.data.gunarray[44] = true;
_root.savedata3.data.gunarray[56] = true;
}
}
}
deleteeverything = true;
deletemc(player1);
deletemc(player2);
deletemc(player3);
deletemc(player4);
deletemc(ground);
deletemc(mapscene);
if (hud) {
deletemc(hud);
}
if (arrow1) {
deletemc(arrow1);
}
if (arrow2) {
deletemc(arrow2);
}
if (arrow3) {
deletemc(arrow3);
}
if (arrow4) {
deletemc(arrow4);
}
if (mapfx) {
deletemc(mapfx);
}
if (game_pause) {
deletemc(game_pause);
}
if (mainmenu) {
gotomenu = false;
removeMovieClip(mainmenu);
delete mainmenu.onEnterFrame;
}
_quality = 'HIGH';
}
function deletemc(mc) {
mc.swapDepths(1);
removeMovieClip(mc);
delete mc.onEnterFrame;
}
stop();
_quality = 'HIGH';
switch (savedata2.data.def_quality) {
case 1:
_quality = 'LOW';
break;
case 2:
_quality = 'MEDIUM';
break;
case 3:
_quality = 'HIGH';
}
tournament = false;
GAMEPAUSED = false;
_root.stopallmusic();
if (_root.savedata2.data.musicON) {
switch (random(3)) {
case 0:
_root.music333.start(0.1, 100);
break;
case 1:
_root.music444.start(0.1, 100);
break;
case 2:
_root.music555.start(0.1, 100);
}
}
if (campaignmode) {
p3ptype = 0;
p4ptype = 0;
gototest = false;
}
if (gotomenu) {
attachMovie('mainmenu', 'mainmenu', mainmenudepth);
crateON = true;
powerupON = false;
gototest = false;
hud._alpha = 0;
temp = _root.ground._totalframes;
do {
_root.mapnumber = random(ground._totalframes) + 1;
} while (mapnumber == temp - 6 || mapnumber == temp - 7 || mapnumber == temp - 8 || mapnumber == 13);
_root.p1name = 'Bot 1';
_root.p1color = random(10) + 1;
_root.p1shirt = random(15) + 1;
_root.p1hat = random(24) + 1;
_root.p1gun = random(5) + 1;
_root.p1perk = 0;
_root.p1ptype = 2;
_root.p2name = 'Bot 2';
do {
_root.p2color = random(10) + 1;
} while (_root.p2color == _root.p1color);
_root.p2shirt = random(15) + 1;
_root.p2hat = random(24) + 1;
_root.p2gun = random(5) + 1;
_root.p2perk = 0;
_root.p2ptype = 2;
_root.totallives = 1000;
_root.gamemode = 1;
_root.p3ptype = 0;
_root.p4ptype = 0;
_root.totallives = 10000;
_root.gamemode = 1;
_root.campaignmode = false;
_root.stopallmusic();
if (_root.savedata2.data.musicON) {
_root.music111.start(0.1, 100);
}
}
if (gototest) {
crateON = false;
powerON = false;
hud._alpha = 0;
_root.gamemode = 1;
_root.totallives = 1000;
_root.p1name = 'Player';
_root.p1color = 2;
_root.p1shirt = 1;
_root.p1hat = 1;
_root.p1gun = 2;
if (gototestnumber <= 6) {
_root.p1gun = gototestnumber;
}
_root.p1perk = 0;
_root.p1ptype = 1;
_root.p2name = 'Dummy';
_root.p2color = 8;
_root.p2shirt = 24;
_root.p2hat = 1;
_root.p2gun = 2;
_root.p2perk = 0;
_root.p2ptype = 2;
_root.campaignmode = false;
}
gravity = 0.88;
friction = 0.9300000000000001;
airfriction = 0.88;
speed = 0.7;
power = 13.5;
teamgame = false;
if (!teamgame) {
p1team = 1;
p2team = 2;
p3team = 3;
p4team = 4;
}
if (gamemode == 5) {
_root.totallives = 10;
crateON = true;
powerON = false;
p1team = 0;
p2team = 0;
p3team = 0;
p4team = 0;
}
_root.showunlocks = 0;
if (campaignmode) {
powerON = true;
switch (campaignlevel) {
case 1:
crateON = false;
powerON = false;
_root.totallives = 3;
_root.mapnumber = 13;
gamemode = 1;
_root.p4name = 'Dummy';
_root.p4color = 8;
_root.p4shirt = 24;
_root.p4hat = 1;
_root.p4gun = 0;
_root.p4perk = 0;
_root.p4ptype = 2;
break;
case 2:
crateON = true;
powerON = true;
_root.totallives = 7;
_root.mapnumber = 12;
gamemode = 1;
_root.p4name = 'Caveman Johnson';
_root.p4color = 8;
_root.p4shirt = 10;
_root.p4hat = 7;
_root.p4gun = 1;
_root.p4perk = 0;
_root.p4ptype = 2;
break;
case 3:
_root.totallives = 7;
_root.mapnumber = 10;
gamemode = 4;
_root.p4name = 'Santa';
_root.p4color = 1;
_root.p4shirt = 11;
_root.p4hat = 3;
_root.p4gun = 2;
_root.p4perk = 7;
_root.p4ptype = 2;
break;
case 4:
crateON = true;
_root.totallives = 7;
_root.mapnumber = 8;
gamemode = 1;
powerON = false;
_root.p4name = 'Pylon Man';
_root.p4color = 9;
_root.p4shirt = 1;
_root.p4hat = 9;
_root.p4gun = 1;
_root.p4perk = 0;
_root.p4ptype = 3;
break;
case 5:
crateON = true;
powerON = true;
_root.totallives = 7;
_root.mapnumber = 5;
gamemode = 1;
_root.p4name = 'Gun Fu Master';
_root.p4color = 7;
_root.p4shirt = 9;
_root.p4hat = 10;
_root.p4gun = 3;
_root.p4perk = 6;
_root.p4ptype = 2;
break;
case 6:
teamgame = true;
gamemode = 3;
p1team = 1;
p2team = 1;
p3team = 2;
p4team = 2;
_root.totallives = 5;
_root.mapnumber = 11;
crateON = true;
powerON = true;
_root.p3name = 'Mafia Guy';
_root.p3color = 2;
_root.p3shirt = 3;
_root.p3hat = 5;
_root.p3gun = 2;
_root.p3perk = 0;
_root.p3ptype = 2;
_root.p4name = 'Mafia Dude';
_root.p4color = 2;
_root.p4shirt = 4;
_root.p4hat = 5;
_root.p4gun = 3;
_root.p4perk = 0;
_root.p4ptype = 2;
break;
case 7:
crateON = true;
powerON = true;
_root.totallives = 7;
_root.mapnumber = 2;
gamemode = 1;
_root.p4name = 'Jet Pack Bunny';
_root.p4color = 4;
_root.p4shirt = 30;
_root.p4hat = 17;
_root.p4gun = 4;
_root.p4perk = 5;
_root.p4ptype = 4;
break;
case 8:
_root.totallives = 7;
_root.mapnumber = 3;
gamemode = 2;
_root.p4name = 'Pirate';
_root.p4color = 10;
_root.p4shirt = 8;
_root.p4hat = 15;
_root.p4gun = 1;
_root.p4perk = 5;
_root.p4ptype = 2;
break;
case 9:
_root.totallives = 7;
_root.mapnumber = 1;
gamemode = 1;
crateON = true;
powerON = true;
_root.p4name = 'Sinusoidal Sam';
_root.p4color = 5;
_root.p4shirt = 5;
_root.p4hat = 1;
_root.p4gun = 6;
_root.p4perk = 2;
_root.p4ptype = 5;
break;
case 10:
_root.totallives = 5;
_root.mapnumber = 7;
gamemode = 1;
crateON = true;
powerON = false;
_root.p4name = 'The Boss';
_root.p4color = 6;
_root.p4shirt = 14;
_root.p4hat = 13;
_root.p4gun = 6;
_root.p4perk = 6;
_root.p4ptype = 6;
}
if (gamemode == 1 || gamemode == 2) {
if (p2ptype == 1) {
teamgame = true;
}
}
p1team = 1;
p2team = 1;
}
if (gamemode == 3) {
teamgame = true;
}
if (p1ptype == 1) {
attachMovie('player', 'player1', -1);
}
if (p2ptype == 1) {
attachMovie('player', 'player2', -2);
}
if (p3ptype == 1) {
attachMovie('player', 'player3', -3);
}
if (p4ptype == 1) {
attachMovie('player', 'player4', -4);
}
if (p1ptype == 2) {
attachMovie('playerAI', 'player1', -1);
}
if (p2ptype == 2) {
attachMovie('playerAI', 'player2', -2);
}
if (p3ptype == 2) {
attachMovie('playerAI', 'player3', -3);
}
if (p4ptype == 2) {
attachMovie('playerAI', 'player4', -4);
}
if (p4ptype == 3) {
attachMovie('playerAI_double', 'player4', -4);
}
if (p4ptype == 4) {
attachMovie('playerAI3', 'player4', -4);
}
if (p4ptype == 5) {
attachMovie('playerAI4', 'player4', -4);
}
if (p4ptype == 6) {
attachMovie('playerAIboss', 'player4', -4);
}
activeplayers = new Array();
if (player1) {
activeplayers[activeplayers.length] = player1;
}
if (player2) {
activeplayers[activeplayers.length] = player2;
}
if (player3) {
activeplayers[activeplayers.length] = player3;
}
if (player4) {
activeplayers[activeplayers.length] = player4;
}
cratearray = new Array();
pgsdata = new Array();
i = 0;
while (i < 4) {
pgsdata[i] = new Array();
j = 0;
while (j < 10) {
pgsdata[i][j] = 0;
if (i == 0 && !player1) {
pgsdata[i][j] = -1;
}
if (i == 1 && !player2) {
pgsdata[i][j] = -1;
}
if (i == 2 && !player3) {
pgsdata[i][j] = -1;
}
if (i == 3 && !player4) {
pgsdata[i][j] = -1;
}
++j;
}
++i;
}
pgsdata[0][0] = p1name;
pgsdata[1][0] = p2name;
pgsdata[2][0] = p3name;
pgsdata[3][0] = p4name;
cratetime = 200;
poweruptime = 0;
zombietime = 0;
zombiewave = 0;
zombiekilled = 0;
zombiekilledtotal = 0;
zombiekilledgoal = 0;
if (gamemode == 5) {
zombielevelup();
}
deleteeverything = false;
gamewin = false;
teamgamewin = false;
gamewincountdown = 0;
if (!campaignmode) {
campaignlevel = -1;
}
dynamitetime = 0;
this.onEnterFrame = function () {
if (!GAMEPAUSED) {
cratetime += 1;
if (cratetime >= 400 && !gototest && !tournament && crateON) {
if (gamemode != 4) {
_root.CP('crate', _root.ground._x + _root.ground.cratearea._x + random(_root.ground.cratearea._width), -300, 0, 0);
}
cratetime = 0;
}
if (!gotomenu && gamemode != 4 && gamemode != 5 && !gototest && !tournament && powerON) {
poweruptime += 1;
if (poweruptime >= 600) {
do {
powerupx = ground._x + ground.platform._x + 20 + random(ground.platform._width - 40);
powerupy = ground._y + ground.platform._y + random(ground.platform._height);
} while (!_root.ground.platform.hitTest(powerupx, powerupy, true));
i = 1;
while (i < i + 1) {
if (!_root.ground.platform.hitTest(powerupx, powerupy - i * 2, true)) {
powerupy -= i * 2;
break;
}
++i;
}
_root.CP('powerup', powerupx, powerupy - 40, 0, 0);
poweruptime = 0;
}
}
if (!gamewin) {
maxleft = activeplayers[0]._x;
i = 1;
while (i < activeplayers.length) {
if (activeplayers[i].iszombie) {
break;
}
if (activeplayers[i]._x < maxleft) {
maxleft = activeplayers[i]._x;
}
if (i == 3) {
break;
}
++i;
}
maxright = activeplayers[0]._x;
i = 1;
while (i < activeplayers.length) {
if (activeplayers[i].iszombie) {
break;
}
if (activeplayers[i]._x > maxright) {
maxright = activeplayers[i]._x;
}
if (i == 3) {
break;
}
++i;
}
if (maxleft < -100) {
maxleft = -100;
}
if (maxright > 1000) {
maxright = 1000;
}
_root._x += ((maxleft + maxright) / -2 + 450 - _root._x) / 8;
_root._x = Math.round(_root._x);
maxhigh = activeplayers[0]._y;
i = 1;
while (i < activeplayers.length) {
if (activeplayers[i].iszombie) {
break;
}
if (activeplayers[i]._y < maxhigh) {
maxhigh = activeplayers[i]._y;
}
if (i == 3) {
break;
}
++i;
}
maxlow = activeplayers[0]._y;
i = 1;
while (i < activeplayers.length) {
if (activeplayers[i].iszombie) {
break;
}
if (activeplayers[i]._y > maxlow) {
maxlow = activeplayers[i]._y;
}
if (i == 3) {
break;
}
++i;
}
if (maxhigh < 50) {
maxhigh = 50;
}
if (maxlow < 50) {
maxlow = 50;
}
if (maxlow > 500) {
maxlow = 500;
}
if (maxhigh > 500) {
maxhigh = 500;
}
_root._y += ((maxhigh + maxlow) / -2 + 280 - _root._y) / 8;
_root._y = Math.round(_root._y);
_root.hud._x = -_root._x;
_root.hud._y = -_root._y;
_root.mapscene.scene1.update();
_root.mapscene.scene2.update();
_root.mainmenu._x = -_root._x;
_root.mainmenu._y = -_root._y;
} else {
if (gamewin) {
_root._x = -activeplayers[0]._x * (_xscale / 100) + 450;
_root._y = -activeplayers[0]._y * (_xscale / 100) + 400;
_root._xscale = 200;
_root._yscale = 200;
if (hud) {
deletemc(hud);
}
if (arrow1) {
deletemc(arrow1);
}
if (arrow2) {
deletemc(arrow2);
}
if (arrow3) {
deletemc(arrow3);
}
if (arrow4) {
deletemc(arrow4);
}
}
}
if (gamemode == 5) {
zombietime += 1;
if (zombietime >= 60 - zombiewave * 2 && zombiekilledgoal > 0) {
if (gamemode == 5 && activeplayers.length < 5 + zombiewave) {
zombiekilledgoal -= 1;
_root.CP('player_zombie', _root.ground._x + _root.ground.cratearea._x + random(_root.ground.cratearea._width), -300, 0, 0);
activeplayers[activeplayers.length] = newMC;
}
zombietime = 0;
} else {
if (zombietime >= 60 - zombiewave * 2 && zombiekilled <= 0) {
zombielevelup();
}
}
}
if (teamgame && !teamgamewin) {
teamwin = _root.activeplayers[0].teamnumber;
j = 1;
while (j < _root.activeplayers.length) {
if (_root.activeplayers[j].teamnumber != teamwin) {
teamwin = -1;
break;
}
++j;
}
if (teamwin != -1) {
teamgamewin = true;
newmc = _root.attachMovie('fx_teamwin', 'fx_teamwin', _root.teamwindepth);
newmc.asdf = teamwin;
}
}
if (gamewin || teamgamewin) {
gamewincountdown += 1;
if (gamewincountdown >= 100) {
gamewincountdown = -9999;
endgame();
}
}
if (Key.isDown(27) && !fadeaway && !gotomenu && !gamewin || Key.isDown(32) && !fadeaway && !gotomenu && !gamewin) {
if (gototest) {
newmc = _root.attachMovie('fadeaway', 'fadeaway', _root.fadedepth);
newmc.targetframe = 8;
newmc._x = -_root._x;
newmc._y = -_root._y;
} else {
this.attachMovie('game_pause', 'game_pause', pausedepth);
}
}
if (Key.isDown(45) && !tournament) {
tournament = true;
}
if (campaignlevel == 5) {
dynamitetime += 1;
if (dynamitetime >= 80) {
dynamitetime = 0;
_root.CP('wep_grenade', _root.ground._x + _root.ground.cratearea._x + random(_root.ground.cratearea._width), -200, 0, -1000);
}
}
}
};
}
movieClip 1315 {
}
movieClip 1318 {
}
movieClip 1320 {
}
movieClip 1321 {
}
movieClip 1322 {
}
movieClip 1323 {
}
movieClip 1326 {
}
movieClip 1328 {
}
movieClip 1331 {
}
movieClip 1333 {
}
movieClip 1335 {
}
movieClip 1337 {
}
movieClip 1345 {
}
movieClip 1346 {
}
movieClip 1350 {
}
movieClip 1352 {
frame 1 {
function update() {
_x = -_root._x * 0.9;
_y = -_root._y * 0.9;
}
gotoAndStop(_root.mapnumber);
}
}
movieClip 1365 {
}
movieClip 1372 {
frame 1 {
function lockup() {
islock = true;
this.useHandCursor = false;
frame.gotoAndStop(1);
}
function lockup2() {
islock = false;
this.useHandCursor = true;
frame.gotoAndStop(1);
}
function taketheinput() {
_root.savedata2.data.controlarray[_parent.number][number] = _parent._parent.getinput;
_parent.refreshkeys();
}
_parent._parent.btnarray[_parent._parent.btnarray.length] = this;
islock = true;
this.useHandCursor = false;
if (keytext.text == 'Up Arrow') {
gotoAndStop(3);
}
if (keytext.text == 'Left Arrow') {
gotoAndStop(4);
}
if (keytext.text == 'Down Arrow') {
gotoAndStop(5);
}
if (keytext.text == 'Right Arrow') {
gotoAndStop(6);
}
switch (this._name) {
case 'key1':
number = 0;
break;
case 'key2':
number = 1;
break;
case 'key3':
number = 2;
break;
case 'key4':
number = 3;
break;
case 'key5':
number = 4;
break;
case 'key6':
number = 5;
}
this.onRollOver = function () {
if (!islock) {
frame.gotoAndStop(2);
}
};
this.onRollOut = function () {
if (!islock) {
frame.gotoAndStop(1);
}
};
this.onPress = function () {
if (!islock) {
_parent._parent.targetkey = this;
frame.gotoAndStop(3);
_parent._parent.disableall();
_parent._parent.lockup._alpha = 100;
}
};
}
frame 2 {
stop();
}
}
movieClip 1373 {
frame 1 {
function refreshkeys() {
key1.gotoAndPlay(1);
key2.gotoAndPlay(1);
key3.gotoAndPlay(1);
key4.gotoAndPlay(1);
key5.gotoAndPlay(1);
key6.gotoAndPlay(1);
key1.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][0]);
key2.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][1]);
key3.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][2]);
key4.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][3]);
key5.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][4]);
key6.keytext.text = codeToChar(_root.savedata2.data.controlarray[number][5]);
}
function codeToChar(input) {
returnvalue = ' ';
switch (input) {
case 8:
returnvalue = 'BS';
break;
case 13:
returnvalue = 'Entr';
break;
case 16:
returnvalue = 'Shft';
break;
case 17:
returnvalue = 'Ctrl';
break;
case 20:
returnvalue = 'Cpsl';
break;
case 32:
returnvalue = 'SPC';
break;
case 33:
returnvalue = 'PgU';
break;
case 34:
returnvalue = 'PgD';
break;
case 35:
returnvalue = 'End';
break;
case 36:
returnvalue = 'Hom';
break;
case 37:
returnvalue = 'Left Arrow';
break;
case 38:
returnvalue = 'Up Arrow';
break;
case 39:
returnvalue = 'Right Arrow';
break;
case 40:
returnvalue = 'Down Arrow';
break;
case 45:
returnvalue = 'Ins';
break;
case 46:
returnvalue = 'Del';
break;
case 145:
returnvalue = 'Scrl';
break;
case 96:
returnvalue = 'np0';
break;
case 97:
returnvalue = 'np1';
break;
case 98:
returnvalue = 'np2';
break;
case 99:
returnvalue = 'np3';
break;
case 100:
returnvalue = 'np4';
break;
case 101:
returnvalue = 'np5';
break;
case 102:
returnvalue = 'np6';
break;
case 103:
returnvalue = 'np7';
break;
case 104:
returnvalue = 'np8';
break;
case 105:
returnvalue = 'np9';
break;
case 106:
returnvalue = 'np*';
break;
case 107:
returnvalue = 'np+';
break;
case 109:
returnvalue = 'np-';
break;
case 110:
returnvalue = 'np.';
break;
case 111:
returnvalue = 'np/';
break;
case 113:
returnvalue = 'F2';
break;
case 115:
returnvalue = 'F4';
break;
case 118:
returnvalue = 'F7';
break;
case 119:
returnvalue = 'F8';
break;
case 120:
returnvalue = 'F9';
break;
case 121:
returnvalue = 'F10';
break;
case 123:
returnvalue = 'F12';
break;
case 186:
returnvalue = ';';
break;
case 187:
returnvalue = '=';
break;
case 188:
returnvalue = ',';
break;
case 189:
returnvalue = '-';
break;
case 190:
returnvalue = '.';
break;
case 191:
returnvalue = '/';
break;
case 192:
returnvalue = '`';
break;
case 219:
returnvalue = '[';
break;
case 220:
returnvalue = '\\';
break;
case 221:
returnvalue = ']';
break;
case 222:
returnvalue = '\'';
}
if (input >= 65 && input <= 90 || input >= 48 && input <= 57) {
returnvalue = String.fromCharCode(input);
}
return returnvalue;
}
stop();
switch (_name) {
case 'p1':
number = 0;
break;
case 'p2':
number = 1;
break;
case 'p3':
number = 2;
break;
case 'p4':
number = 3;
}
pnumber.gotoAndStop(number + 1);
refreshkeys();
}
}
movieClip 1375 {
}
movieClip 1376 {
frame 1 {
function update() {
_x = -_root._x * 0.5;
_y = -_root._y * 0.5;
}
gotoAndStop(_root.mapnumber);
}
frame 13 {
if (!_root.campaignmode) {
objective._alpha = 0;
}
}
}
movieClip 1390 {
frame 1 {
gotoAndStop(_root.mapnumber);
}
}
movieClip 1391 {
}
instance mapscene of movieClip 1391 {
}
movieClip 1393 {
}
movieClip 1395 {
frame 1 {
_width = 1;
_x = -1000;
}
}
movieClip 1397 {
frame 1 {
_alpha = 0;
}
}
movieClip 1399 {
frame 1 {
_alpha = 0;
}
}
movieClip 1407 {
}
movieClip 1409 {
}
movieClip 1410 {
frame 1 {
this.onEnterFrame = function () {
_parent.swaptime += 1;
if (_parent.swaptime >= _parent.swaptotal) {
if (_parent.swaptotal >= 10) {
_parent.randgun = dropgun._currentframe;
delete this.onEnterFrame;
} else {
dropgun.gotoAndStop(random(57) + 10);
_parent.randgun = dropgun._currentframe * -1;
}
_parent.swaptime = 0;
_parent.swaptotal *= 1.25;
}
};
}
}
movieClip 1414 {
frame 1 {
if (_root.gamemode != 5) {
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
swaptime = 0;
swaptotal = 2;
}
frame 2 {
stop();
swaptime = 0;
swaptotal = 0.3;
}
frame 186 {
gotoAndPlay(2);
}
}
movieClip 1416 {
}
movieClip 1419 {
}
movieClip 1420 {
frame 1 {
timer = 0;
disabled = false;
randgun = Math.round(this._rotation);
_rotation = 0;
originx = _x;
originy = _y;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
if (_root.gamemode == 2 || _root.gamemode == 4 || _root.gamemode == 5 || _root.tournament || !_root.powerON) {
_x = -300;
_y = 0;
_alpha = 0;
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
if (!disabled) {
if (_alpha < 100) {
_alpha = _alpha + 5;
}
i = 0;
while (i < _root.activeplayers.length) {
if (_root.activeplayers[i].iszombie) {
break;
}
if (this.hitTest(_root.activeplayers[i].frame)) {
_root.activeplayers[i].getgun(randgun);
j = 0;
while (j < 10) {
_root.CP('fx_pickup', _x + _parent._x, _y + _parent._y + 20, 0);
++j;
}
_root.playsound2('bolt2.wav');
disabled = true;
_x = -300;
_y = 0;
_alpha = 0;
break;
}
++i;
}
} else {
timer += 1;
if (timer >= 400) {
gotoAndPlay(random(40) + 10);
timer = 0;
disabled = false;
_x = originx;
_y = originy;
}
}
}
};
}
frame 2 {
if (dropgun._currentframe != randgun) {
dropgun.gotoAndStop(randgun);
}
}
frame 61 {
gotoAndPlay(2);
}
}
movieClip 1422 {
}
movieClip 1424 {
}
movieClip 1426 {
}
movieClip 1428 {
}
movieClip 1430 {
}
movieClip 1432 {
}
movieClip 1434 {
}
movieClip 1436 {
}
movieClip 1438 {
}
movieClip 1440 {
}
movieClip 1442 {
}
movieClip 1443 {
frame 1 {
timer = 0;
disabled = false;
_rotation = _root.gototestnumber;
randgun = Math.round(this._rotation);
_rotation = 0;
originx = _x;
originy = _y;
if (_root.gototestnumber <= 6) {
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
this.onEnterFrame = function () {
if (_root.gamemode == 2 || _root.gamemode == 4) {
_x = -300;
_y = 0;
_alpha = 0;
this.swapDepths(1);
delete this.onEnterFrame;
}
if (!disabled) {
if (_alpha < 100) {
_alpha = _alpha + 5;
}
if (this.hitTest(_root.activeplayers[0].frame)) {
_root.activeplayers[0].getgun(randgun);
j = 0;
while (j < 10) {
_root.CP('fx_pickup', _x + _parent._x, _y + _parent._y + 20, 0);
++j;
}
disabled = true;
_x = -300;
_y = 0;
_alpha = 0;
}
} else {
timer += 1;
if (timer >= 100) {
gotoAndPlay(random(40) + 10);
timer = 0;
disabled = false;
_x = originx;
_y = originy;
}
}
};
}
frame 2 {
if (dropgun._currentframe != randgun) {
dropgun.gotoAndStop(randgun);
}
}
frame 61 {
gotoAndPlay(2);
}
}
movieClip 1444 {
frame 1 {
gotoAndStop(_root.mapnumber);
lowfriction = false;
_alpha = 100;
platform._alpha = 0;
}
frame 4 {
_root.gravity = 0.6;
}
frame 5 {
_root.attachMovie('mapfx_wall', 'mapfx', _root.mapfxdepth);
}
frame 10 {
_root.attachMovie('mapfx_snow', 'mapfx', _root.mapfxdepth);
}
}
movieClip 1446 {
frame 1 {
_alpha = 0;
}
}
movieClip 1448 {
frame 1 {
fps = 40;
starttime = new Date();
lasttime = starttime.getMilliseconds();
counter = 0;
this.onEnterFrame = function () {
counter += 1;
if (counter >= 10) {
counter = 0;
time = new Date();
timepassed = time.getMilliseconds() - lasttime >= 0 ? time.getMilliseconds() - lasttime : 1000 + (time.getMilliseconds() - lasttime);
fps = Math.round(10000 / timepassed);
lasttime = time.getMilliseconds();
}
};
}
}
movieClip 1451 {
}
movieClip 1453 {
}
movieClip 1455 {
}
movieClip 1456 {
frame 1 {
stop();
}
frame 90 {
stop();
}
frame 180 {
stop();
}
frame 270 {
stop();
}
}
movieClip 1459 {
frame 1 {
stop();
}
}
movieClip 1461 {
}
movieClip 1471 {
frame 1 {
stop();
}
}
movieClip 1476 {
frame 1 {
stop();
}
}
movieClip 1480 {
frame 1 {
function update() {
lastlife.gotoAndStop(1);
updated = true;
player.head.gotoAndStop(colornumber + 1);
player.body.gotoAndStop(colornumber + 1);
player.leg1.leg.gotoAndStop(colornumber + 1);
player.leg2.leg.gotoAndStop(colornumber + 1);
player.hand1.hand.gotoAndStop(colornumber + 1);
player.hand2.hand.gotoAndStop(colornumber + 1);
if (_root.gamemode == 4) {
displayheader.gotoAndStop(2);
flawless._alpha = 0;
} else {
if (_root.gamemode == 5) {
displayheader.gotoAndStop(3);
flawless._alpha = 0;
}
}
}
switch (_name) {
case 'card1':
colornumber = _root.p1color;
inputname.text = _root.p1name;
player.shirt.gotoAndStop(_root.p1shirt);
player.hat.gotoAndStop(_root.p1hat);
player.eyes.gotoAndStop(_root.p1hat);
bg.gotoAndStop(_root.p1color + 1);
target = _root.player1;
break;
case 'card2':
colornumber = _root.p2color;
inputname.text = _root.p2name;
player.shirt.gotoAndStop(_root.p2shirt);
player.hat.gotoAndStop(_root.p2hat);
player.eyes.gotoAndStop(_root.p2hat);
bg.gotoAndStop(_root.p2color + 1);
target = _root.player2;
break;
case 'card3':
colornumber = _root.p3color;
inputname.text = _root.p3name;
player.shirt.gotoAndStop(_root.p3shirt);
player.hat.gotoAndStop(_root.p3hat);
player.eyes.gotoAndStop(_root.p3hat);
bg.gotoAndStop(_root.p3color + 1);
target = _root.player3;
break;
case 'card4':
colornumber = _root.p4color;
inputname.text = _root.p4name;
player.shirt.gotoAndStop(_root.p4shirt);
player.hat.gotoAndStop(_root.p4hat);
player.eyes.gotoAndStop(_root.p4hat);
bg.gotoAndStop(_root.p4color + 1);
target = _root.player4;
}
updated = false;
lastlevel = target.currentlevel;
this.onEnterFrame = function () {
if (_root.gamemode != 4 && _root.gamemode != 5) {
if (livedisplay.text == _root.totallives && flawless._currentframe != 1) {
flawless.gotoAndStop(1);
} else {
if (livedisplay.text == _root.totallives - 1 && flawless._currentframe != 2) {
flawless.gotoAndStop(2);
} else {
if (parseInt(livedisplay.text) > _root.totallives && flawless._currentframe != 4) {
flawless.gotoAndStop(4);
} else {
if (parseInt(livedisplay.text) < _root.totallives - 1 && flawless._currentframe != 3) {
flawless.gotoAndStop(3);
}
}
}
}
if (livedisplay.text == '0' && player._currentframe == 1) {
player.gotoAndStop(2);
ammodisplay.text = '';
gunname.text = '';
}
if (livedisplay.text == '1' && lastlife._currentframe == 1) {
lastlife.play();
}
if (livedisplay.text == '0' && lastlife._currentframe == 90) {
lastlife.play();
}
} else {
if (lastlevel < target.currentlevel) {
lastlife.gotoAndPlay(181);
}
lastlevel = target.currentlevel;
}
if (!updated) {
update();
}
};
}
}
movieClip 1482 {
}
movieClip 1484 {
}
movieClip 1486 {
}
movieClip 1487 {
frame 1 {
_alpha = 0;
stop();
_x = -50;
_y = -50;
}
frame 2 {
_alpha = 100;
_x = 450;
_y = 280;
if (_root.campaignmode) {
gotoAndPlay(51);
}
}
frame 51 {
stop();
_root.gamewin = true;
}
}
movieClip 1489 {
frame 1 {
function killupdate(mcname, mckiller, mod) {
if (_root.gamemode != 5 && _root.campaignlevel != 1) {
newmc = this.attachMovie('hud_killfeed', 'mc' + this.getNextHighestDepth(), this.getNextHighestDepth());
newmc.mckiller = mckiller;
newmc.mcname = mcname;
if (mckiller != 'none') {
if (mod == 2) {
newmc.gotoAndStop(3);
}
if (mod == 3) {
newmc.gotoAndStop(4);
}
if (mod == 4) {
newmc.gotoAndStop(5);
}
} else {
newmc.gotoAndStop(2);
}
newmc._x = 0;
feednumber += 1;
newmc._y = (feednumber - 1) * 30;
newmc.feednumber = feednumber;
if (countdown._currentframe != 1) {
countdown.gotoAndStop(1);
_root._x = 0;
_root._y = 0;
}
}
}
function update() {
if (_root.gamemode != 4 && _root.gamemode != 5) {
card1.livedisplay.text = _root.player1.lives;
card2.livedisplay.text = _root.player2.lives;
card3.livedisplay.text = _root.player3.lives;
card4.livedisplay.text = _root.player4.lives;
} else {
if (_root.gamemode == 4) {
card1.livedisplay.text = _root.player1.currentlevel;
card2.livedisplay.text = _root.player2.currentlevel;
card3.livedisplay.text = _root.player3.currentlevel;
card4.livedisplay.text = _root.player4.currentlevel;
} else {
if (_root.gamemode == 5) {
card1.livedisplay.text = _root.player1.lives;
card2.livedisplay.text = _root.player2.lives;
card3.livedisplay.text = _root.player3.lives;
card4.livedisplay.text = _root.player4.lives;
if (_root.player1.lives == 0) {
card1.player.gotoAndStop(2);
}
if (_root.player2.lives == 0) {
card2.player.gotoAndStop(2);
}
if (_root.player3.lives == 0) {
card3.player.gotoAndStop(2);
}
if (_root.player4.lives == 0) {
card4.player.gotoAndStop(2);
}
}
}
}
if (card1.livedisplay.text != '0') {
card1.ammodisplay.text = _root.player1.bullets;
}
if (card2.livedisplay.text != '0') {
card2.ammodisplay.text = _root.player2.bullets;
}
if (card3.livedisplay.text != '0') {
card3.ammodisplay.text = _root.player3.bullets;
}
if (card4.livedisplay.text != '0') {
card4.ammodisplay.text = _root.player4.bullets;
}
if (card1.livedisplay.text != '0') {
if (_root.player1.bullets > 1000) {
card1.ammodisplay.text = '∞';
}
}
if (card2.livedisplay.text != '0') {
if (_root.player2.bullets > 1000) {
card2.ammodisplay.text = '∞';
}
}
if (card3.livedisplay.text != '0') {
if (_root.player3.bullets > 1000) {
card3.ammodisplay.text = '∞';
}
}
if (card4.livedisplay.text != '0') {
if (_root.player4.bullets > 1000) {
card4.ammodisplay.text = '∞';
}
}
if (card1.livedisplay.text != '0') {
if (card1.gunname.text != _root.player1.hand1.gun.Name) {
card1.gunname.text = _root.player1.hand1.gun.Name;
}
}
if (card2.livedisplay.text != '0') {
if (card2.gunname.text != _root.player2.hand1.gun.Name) {
card2.gunname.text = _root.player2.hand1.gun.Name;
}
}
if (card3.livedisplay.text != '0') {
if (card3.gunname.text != _root.player3.hand1.gun.Name) {
card3.gunname.text = _root.player3.hand1.gun.Name;
}
}
if (card4.livedisplay.text != '0') {
if (card4.gunname.text != _root.player4.hand1.gun.Name) {
card4.gunname.text = _root.player4.hand1.gun.Name;
}
}
if (!_root.player1) {
card1._alpha = 0;
}
if (!_root.player2) {
card2._alpha = 0;
}
if (!_root.player3) {
card3._alpha = 0;
}
if (!_root.player4) {
card4._alpha = 0;
}
}
this.swapDepths(_root.huddepth);
scrollup = false;
time = 0;
qwerqwer._x = 20;
qwerqwer._y = 20;
this.onEnterFrame = function () {
if (!_root.GAMEPAUSED) {
_x = -_root._x;
_y = -_root._y;
update();
if (scrollup) {
time += 1;
if (time >= 2) {
scrollup = false;
time = 0;
}
}
if (_root.gamemode == 5) {
if (wavedisplay.wavedisplay.text != _root.zombiewave) {
wavedisplay.wavedisplay.text = _root.zombiewave;
}
if (wavedisplay.killeddisplay.text != _root.zombiekilled) {
wavedisplay.killeddisplay.text = _root.zombiekilled;
}
if (wavedisplay.killedtotaldisplay.text != _root.zombiekilledtotal) {
wavedisplay.killedtotaldisplay.text = _root.zombiekilledtotal;
}
}
}
};
feednumber = 0;
if (_root.gamemode == 5) {
this.attachMovie('hud_wavedisplay', 'wavedisplay', 2);
}
}
}