Frame 1
function doSomething() {
getURL ("http://www.eggysgames.com/", "_blank");
}
function doSomething2() {
getURL ("http://www.armorgames.com/", "blank");
}
_root.gamecomplete = false;
_root.dodgetimerhold = 0;
_root.survivaltimerhold = 0;
_root.checkpoint = 11;
this.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local5 = this.getBytesTotal();
var _local3 = (_local4 / _local5) * 100;
_root.thingo.bloodriver._y = (-_local3) * 1.63;
lol = _local3;
if (_local4 >= _local5) {
_root.mainmenu.playerer.gotoAndStop(2);
_root.mainmenu.gotoAndStop(2);
delete this.onEnterFrame;
}
if (_local3 >= 100) {
_root.play();
}
};
stop();
MENU.customItems.push(Functioned2);
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem("Made by Eggy and Drew", doSomething);
Functioned2 = new ContextMenuItem("Sponsored by Armorgames", doSomething2);
MENU.customItems.push(Functioned);
MENU.customItems.push(Functioned2);
MENU.customItems.push(Functioned3);
MENU.builtInItems.quality = true;
_root.menu = MENU;
Frame 2
someSound = new Sound();
someSound.attachSound("intromusic", this);
someSound.start(0, 99999);
stop();
Frame 3
stop();
_root.fade.gotoAndPlay(1);
Mouse.show();
Instance of Symbol 132 MovieClip "fade" in Frame 3
onClipEvent (load) {
bob = 10000;
this.swapDepths(bob);
}
Frame 4
function deleteall() {
for (i in _root) {
_root[i].swapDepths(99999);
removeMovieClip(_root[i]);
}
}
function deleteallbacktomenu() {
for (i in _root) {
_root[i].swapDepths(99999);
removeMovieClip(_root[i]);
}
_root.gotoAndPlay(4);
}
function deleteallanddie() {
for (i in _root) {
_root[i].swapDepths(99999);
removeMovieClip(_root[i]);
}
_root.gotoAndPlay(3);
}
function deleteallsurvival() {
for (i in _root) {
_root[i].swapDepths(99999);
removeMovieClip(_root[i]);
}
_root.prevFrame();
}
function deleteallsurvival2() {
for (i in _root) {
_root[i].swapDepths(99999);
removeMovieClip(_root[i]);
}
_root.gotoAndStop(8);
}
function deleteall2() {
for (i in _root) {
if ((((((((((((_root[i]._name != "melee") and (_root[i]._name != "range")) and (_root[i]._name != "ebullet")) and (_root[i]._name != "bullet")) and (_root[i]._name != "cursor")) and (_root[i]._name != "selectweapon")) and (_root[i]._name != "menuitems")) and (_root[i]._name != "menubg")) and (_root[i]._name != "menutext")) and (_root[i]._name != "fade")) and (_root[i]._name != "mainhealth")) and (_root[i]._name != "mainhpbar")) {
_root[i].swapDepths(999999);
removeMovieClip(_root[i]);
}
}
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
_root.sound = true;
_root.beencheckpoint = false;
_root.controlled = false;
_root.reloadsoundonce = false;
_root.soundtimer = 0;
_root.beencheckpoint = false;
Mouse.show();
if (_root.checkpoint == 11) {
_root.cbutton._alpha = 30;
} else {
_root.cbutton._alpha = 100;
}
startlevel = function () {
if (_root.beencheckpoint == true) {
_root.range.gotoAndStop(_root.checkpointrange);
_root.melee.gotoAndStop(_root.checkpointmelee);
_root.range.pistolammo = _root.checkpointammo;
_root.range.uziammo = _root.checkpointammo;
_root.range.shotgunammo = _root.checkpointammo;
_root.range.stargategunammo = _root.checkpointammo;
_root.range.rocketammo = _root.checkpointammo;
_root.range.energyammo = _root.checkpointammo;
_root.range.sniperammo = _root.checkpointammo;
_root.range.grenadeammo = _root.checkpointammo;
_root.beencheckpoint = falsess;
}
stop();
_root.totalammo = 0;
_root.fade.gotoAndPlay(1);
_root.overlaydepthcounter = 5000;
_root.enemydepthcounter = 1000;
_root.objectdepthcounter = 300;
_root.i = 500;
_root.e = 550;
_root.shotguncounter = 0;
_root.enemyshotguncounter = 0;
_root.changeweaponfunction();
};
startlevel();
onMouseDown = function () {
shooting = true;
};
onMouseUp = function () {
shooting = false;
};
onEnterFrame = function () {
if (_root.enemydepthcounter > 1999) {
_root.enemydepthcounter = 1000;
}
if (_root.objectdepthcounter > 400) {
_root.objectdepthcounter = 300;
}
_root.failsafe();
if ((_root._currentframe == 10) and (_root.menubg._visible == false)) {
_root.spawnenemies++;
if (_root.survivaltimer < 10) {
if (_root.spawnenemies >= 40) {
_root.spawnenemies = 0;
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if ((_root.survivaltimer >= 10) and (_root.survivaltimer < 20)) {
if (_root.spawnenemies > 100) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 20) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 70) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if ((_root.survivaltimer >= 20) and (_root.survivaltimer <= 40)) {
if (_root.spawnenemies > 300) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 10) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 250) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 70) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 150) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if ((_root.survivaltimer >= 41) and (_root.survivaltimer <= 80)) {
if (_root.spawnenemies > 300) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 90) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 190) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 230) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if ((_root.survivaltimer >= 81) and (_root.survivaltimer <= 120)) {
if (_root.spawnenemies > 200) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 10) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 150) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 80) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 190) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if ((_root.survivaltimer >= 121) and (_root.survivaltimer <= 170)) {
if (_root.spawnenemies > 170) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 90) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 150) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 145) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 140) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 110) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
if (_root.survivaltimer >= 172) {
if (_root.spawnenemies > 150) {
_root.spawnenemies = 0;
}
if (_root.spawnenemies == 10) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 90) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 145) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 145) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 25) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 30) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 120) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 140) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (_root.spawnenemies == 110) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
}
}
if (Key.isDown(2)) {
Mouse.show();
}
if (_root.menubg._visible == false) {
if (Key.isDown(1)) {
Mouse.hide();
}
}
if (_root.reloadsoundonce == true) {
soundtimer++;
if (soundtimer > 10) {
soundtimer = 0;
_root.reloadsoundonce = false;
}
}
if ((((shooting == true) and (_root.char.gun.anim._currentframe == 1)) and (_root.menubg._visible == false)) and (_root.fade._currentframe == 20)) {
i = i + 1;
if (i > 519) {
i = 500;
}
if (_root.char.gun._currentframe == 1) {
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("swordsound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 2) and (_root.range.pistolammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.pistolammo = _root.range.pistolammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
pistol = new Sound();
pistol.attachSound("pistolsound", this);
pistol.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 3) and (_root.range.uziammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.uziammo = _root.range.uziammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("uzisound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 4) and (_root.range.shotgunammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
i = i + 1;
duplicateMovieClip ("bullet", "newbullet" + i, i);
i = i + 1;
duplicateMovieClip ("bullet", "newbullet" + i, i);
i = i + 1;
_root.range.shotgunammo = _root.range.shotgunammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("shotgunsound", this);
someSound.start(0, 1);
}
}
if (_root.char.gun._currentframe == 5) {
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("lightsabresound", this);
someSound.start(0, 1);
}
}
if (_root.char.gun._currentframe == 6) {
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("broadswordsound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 7) and (_root.range.stargategunammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.stargategunammo = _root.range.stargategunammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("stargategunsound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 8) and (_root.range.rocketammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.rocketammo = _root.range.rocketammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rocketsound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 9) and (_root.range.energyammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.energyammo = _root.range.energyammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("energysound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 10) and (_root.range.sniperammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.sniperammo = _root.range.sniperammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("snipersound", this);
someSound.start(0, 1);
}
}
if ((_root.char.gun._currentframe == 11) and (_root.range.grenadeammo > 0)) {
duplicateMovieClip ("bullet", "newbullet" + i, i);
_root.range.grenadeammo = _root.range.grenadeammo - 1;
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("grenadesound", this);
someSound.start(0, 1);
}
}
if (_root.char.gun._currentframe == 12) {
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("tasersound", this);
someSound.start(0, 1);
}
}
if (_root.char.gun._currentframe == 13) {
_root.char.gun.anim.gotoAndPlay(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("chainsawsound", this);
someSound.start(0, 1);
}
}
if (_root.char.gun._currentframe == 14) {
_root.char.gun.anim.gotoAndPlay(2);
}
if (((_root.sound == true) and (_root.reloadsoundonce == false)) and (_root.selectweapon._currentframe == 1)) {
if (((((((((_root.range._currentframe == 1) and (_root.range.pistolammo == 0)) or ((_root.range._currentframe == 2) and (_root.range.uziammo == 0))) or ((_root.range._currentframe == 3) and (_root.range.shotgunammo == 0))) or ((_root.range._currentframe == 4) and (_root.range.stargategunammo == 0))) or ((_root.range._currentframe == 5) and (_root.range.rocketammo == 0))) or ((_root.range._currentframe == 6) and (_root.range.energyammo == 0))) or ((_root.range._currentframe == 7) and (_root.range.sniperammo == 0))) or ((_root.range._currentframe == 8) and (_root.range.grenadeammo == 0))) {
someSound = new Sound();
someSound.attachSound("outofammo", this);
someSound.start(0, 1);
_root.reloadsoundonce = true;
}
}
}
if ((((controlled == true) and (_root.turret._currentframe == 1)) and (shooting == true)) and (_root.menubg._visible == false)) {
_root.turret.gotoAndPlay(2);
i = i + 1;
duplicateMovieClip ("bullet", "newbullet" + i, i);
if (i > 519) {
i = 500;
}
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("turretsound", this);
someSound.start(0, 1);
}
}
};
endlevel = function () {
for (i in _root) {
if ((((((((((((_root[i]._name != "melee") and (_root[i]._name != "range")) and (_root[i]._name != "ebullet")) and (_root[i]._name != "bullet")) and (_root[i]._name != "cursor")) and (_root[i]._name != "selectweapon")) and (_root[i]._name != "menuitems")) and (_root[i]._name != "menubg")) and (_root[i]._name != "menutext")) and (_root[i]._name != "fade")) and (_root[i]._name != "mainhealth")) and (_root[i]._name != "mainhpbar")) {
_root[i].swapDepths(999999);
removeMovieClip(_root[i]);
}
}
_root.nextFrame();
};
endgame = function () {
for (i in _root) {
_root[i].swapDepths(999999);
removeMovieClip(_root[i]);
}
_root.nextFrame();
};
_root.safernextscreen = 0;
failsafe = function () {
_root.safernextscreen = 0;
for (lol in _root) {
temp = _root[lol].getDepth();
actualtemp = _root[lol];
if (((temp >= 999) and (temp < 2001)) and (actualtemp._currentframe != 4)) {
_root.safernextscreen = _root.safernextscreen + 1;
}
}
};
enemyhitbyweapons = function (mc) {
if (_root.menubg._visible == false) {
mc.i = 500;
while (mc.i < 520) {
if (_root["newbullet" + mc.i].inside.bang.hit.hitTest(mc.hit) and (_root["newbullet" + mc.i].inside._currentframe == 2)) {
tempname = _root["newbullet" + mc.i];
if (tempname._currentframe == 5) {
mc.health = mc.health - 10;
}
}
if (_root["newbullet" + mc.i].inside.bang.hit.hitTest(mc.hit) and (_root["newbullet" + mc.i].inside._currentframe == 2)) {
tempname = _root["newbullet" + mc.i];
if (tempname._currentframe == 8) {
if (tempname._x > mc._x) {
mc.dontchange = true;
mc._xscale = mc.scale;
mc.health = mc.health - 10;
}
if (tempname._x < mc._x) {
mc.dontchange = true;
mc._xscale = -mc.scale;
mc.health = mc.health - 10;
}
}
}
if (_root["newbullet" + mc.i].hitTest(mc.hit) and (_root["newbullet" + mc.i].inside._currentframe == 1)) {
tempname = _root["newbullet" + mc.i];
if (tempname._currentframe == 3) {
mc.health = mc.health - 2;
}
if (tempname._currentframe == 5) {
mc.health = mc.health - 10;
}
if (tempname._currentframe == 8) {
mc.health = mc.health - 10;
}
if (tempname._currentframe == 6) {
mc.health = mc.health - 3;
}
if (tempname._currentframe == 7) {
mc.health = mc.health - 10;
}
if (tempname._currentframe == 20) {
mc.health = mc.health - 20;
} else {
mc.health = mc.health - 1;
}
if ((tempname._currentframe != 6) and (mc._currentframe != 4)) {
tempname.inside.gotoAndStop(3);
break;
}
}
mc.i++;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 1)) and (_root.char.gun.anim._currentframe != 1)) {
mc.health = mc.health - 1;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 5)) and (_root.char.gun.anim._currentframe != 1)) {
mc.health = mc.health - 30;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 6)) and (_root.char.gun.anim._currentframe != 1)) {
mc.health = mc.health - 2;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 12)) and (_root.char.gun.anim._currentframe != 1)) {
mc.health = mc.health - 4;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 13)) and (_root.char.gun.anim._currentframe != 1)) {
mc.health = mc.health - 1;
}
if ((_root.char.gun.hitTest(mc.hit) and (_root.char.gun._currentframe == 14)) and (_root.char.gun.anim._currentframe != 1)) {
if ((_root.char.gun.anim._currentframe < 6) or (_root.char.gun.anim._currentframe > 16)) {
mc.health = mc.health - 2;
}
}
}
};
changeweaponfunction = function () {
if (_root.selectweapon._currentframe == 1) {
if (_root.range._currentframe == 1) {
_root.char.gun.gotoAndStop("pistolframe");
}
if (_root.range._currentframe == 2) {
_root.char.gun.gotoAndStop("uziframe");
}
if (_root.range._currentframe == 3) {
_root.char.gun.gotoAndStop("shotgunframe");
}
if (_root.range._currentframe == 4) {
_root.char.gun.gotoAndStop("stargategunframe");
}
if (_root.range._currentframe == 5) {
_root.char.gun.gotoAndStop("rocketframe");
}
if (_root.range._currentframe == 6) {
_root.char.gun.gotoAndStop("energyframe");
}
if (_root.range._currentframe == 7) {
_root.char.gun.gotoAndStop("sniperframe");
}
if (_root.range._currentframe == 8) {
_root.char.gun.gotoAndStop("grenadeframe");
}
}
if (_root.selectweapon._currentframe == 2) {
if (_root.melee._currentframe == 1) {
_root.char.gun.gotoAndStop("swordframe");
}
if (_root.melee._currentframe == 2) {
_root.char.gun.gotoAndStop("lightsabreframe");
}
if (_root.melee._currentframe == 3) {
_root.char.gun.gotoAndStop("broadswordframe");
}
if (_root.melee._currentframe == 4) {
_root.char.gun.gotoAndStop("taserframe");
}
if (_root.melee._currentframe == 5) {
_root.char.gun.gotoAndStop("chainsawframe");
}
if (_root.melee._currentframe == 6) {
_root.char.gun.gotoAndStop("hammerframe");
}
}
};
enemyshootingweapons = function (mc2) {
if (((_root.char._x - _x) > -250) or (mc2.health != 5)) {
if (mc2.gun.anim._currentframe == 1) {
mc2.gun.anim.gotoAndPlay(2);
if (_root.e >= 569) {
_root.e = 550;
}
_root.e = _root.e + 1;
duplicateMovieClip (_root.ebullet, "newebullet" + _root.e, _root.e);
tempname = _root["newebullet" + _root.e];
if (mc2.scale == mc2._xscale) {
tempname._x = mc2._x - mc2.gun._x;
} else if (mc2.scale != mc2._xscale) {
tempname._x = mc2._x + mc2.gun._x;
}
tempname._y = mc2._y + mc2.gun._y;
tempname.gotoAndStop(3);
if (mc2.gun._currentframe == 1) {
tempname.gotoAndStop(1);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pistolsound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 2) {
tempname.gotoAndStop(2);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("uzisound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 3) {
_root.e = _root.e + 1;
duplicateMovieClip (_root.ebullet, "newebullet" + _root.e, _root.e);
tempname = _root["newebullet" + _root.e];
if (mc2.scale == mc2._xscale) {
tempname._x = mc2._x - mc2.gun._x;
} else if (mc2.scale != mc2._xscale) {
tempname._x = mc2._x + mc2.gun._x;
}
tempname._y = mc2._y + mc2.gun._y;
tempname.gotoAndStop(3);
_root.e = _root.e + 1;
duplicateMovieClip (_root.ebullet, "newebullet" + _root.e, _root.e);
tempname = _root["newebullet" + _root.e];
if (mc2.scale == mc2._xscale) {
tempname._x = mc2._x - mc2.gun._x;
} else if (mc2.scale != mc2._xscale) {
tempname._x = mc2._x + mc2.gun._x;
}
tempname._y = mc2._y + mc2.gun._y;
tempname.gotoAndStop(3);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("shotgunsound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 4) {
tempname.gotoAndStop(4);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("stargategunsound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 5) {
tempname.gotoAndStop(5);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rocketsound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 6) {
tempname.gotoAndStop(6);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("energysound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 7) {
tempname.gotoAndStop(7);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("snipersound", this);
someSound.start(0, 1);
}
}
if (mc2.gun._currentframe == 8) {
tempname.gotoAndStop(8);
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("grenadesound", this);
someSound.start(0, 1);
}
}
}
}
};
charhitbyweapons = function (mc3) {
q = 550;
while (q < 569) {
if (_root["newebullet" + q].hitTest(mc3.hit) and (_root["newebullet" + q].inside._currentframe == 1)) {
if (mc3._name == "char") {
if (tempname._currentframe == 5) {
_root.mainhpbar.health = _root.mainhpbar.health + 10;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 1;
}
} else {
mc3.health = mc3.health - 1;
}
_root["newebullet" + q].inside.gotoAndStop(3);
}
q++;
}
};
__com_mochibot__("9efad896", this, 10301, true);
Instance of Symbol 132 MovieClip "fade" in Frame 4
onClipEvent (load) {
dontdissapear = 2355;
bob = 10001;
this.swapDepths(bob);
}
Frame 5
stop();
_root.fade.gotoAndPlay(1);
Frame 6
stop();
_root.fade.gotoAndPlay(1);
Frame 7
stop();
_root.fade.gotoAndPlay(1);
Frame 8
stop();
Mouse.show();
_root.fade.gotoAndPlay(1);
Instance of Symbol 322 MovieClip in Frame 8
onClipEvent (load) {
if ((_root.survivaltimer > _root.survivaltimerhold) and (_root.playsurvival == true)) {
_root.survivaltimerhold = _root.survivaltimer;
}
if ((_root.survivaltimer > _root.dodgetimerhold) and (_root.playsurvival == false)) {
_root.dodgetimerhold = _root.survivaltimer;
}
if (_root.playsurvival == true) {
_root.highscoretimer = _root.survivaltimerhold;
} else if (_root.playsurvival == false) {
_root.highscoretimer = _root.dodgetimerhold;
}
}
Frame 9
stop();
startlevel();
_root.playsurvival = false;
_root.range.pistolammo = 1;
_root.spawnenemies = 0;
_root.survivaltimer = 0;
Mouse.hide();
stopAllSounds();
someSound = new Sound();
someSound.attachSound("bossmusic", this);
someSound.start(0, 999999999);
Instance of Symbol 336 MovieClip "ground" in Frame 9
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 695 MovieClip "char" in Frame 9
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 28;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if (_x > 540) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 791 MovieClip "headcrab" in Frame 9
onClipEvent (load) {
if (_name != "headcrab") {
roll = random(2);
if (roll == 0) {
_x = 565;
_y = 345;
} else if (roll == 1) {
_x = -15;
_y = 345;
}
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 1;
attacked = false;
timerchange = 0;
dietimer = 0;
deathtimer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_currentframe == 4) {
dietimer++;
if (dietimer > 60) {
removeMovieClip(this);
}
}
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 2 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 2 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 2 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < -15) {
_x = -15;
moving = true;
}
if (_x > 565) {
_x = 565;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
}
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 793 MovieClip in Frame 9
onClipEvent (load) {
timer = 0;
amount = 0;
}
onClipEvent (enterFrame) {
timer++;
if ((timer > 40) and (amount < 4)) {
_root.enemydepthcounter++;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
timer = 0;
amount = amount + 1;
}
if (_root.mainhpbar.health == 100) {
_root.char.gotoAndStop(7);
}
if (_root.menubg._visible == true) {
stop();
} else {
play();
}
}
Instance of Symbol 822 MovieClip "range" in Frame 9
onClipEvent (load) {
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
}
Instance of Symbol 824 MovieClip "cursor" in Frame 9
onClipEvent (load) {
keepup = 0;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
bob = 12000;
this.swapDepths(bob);
}
Instance of Symbol 82 MovieClip [bullet] "ebullet" in Frame 9
onClipEvent (load) {
if (_name != "ebullet") {
speed = 15;
gravity = 0;
_visible = false;
X = _root.char._x - _x;
if (_currentframe == 8) {
Y = (_root.char._y - _y) - 500;
}
if (_currentframe != 8) {
Y = (_root.char._y - _y) - 30;
}
angle = Math.atan2(Y, X);
_rotation = (((angle * 180) / Math.PI) - 180);
timer = 0;
((_currentframe == 1) ? ((speed = 15)) : null);
((_currentframe == 2) ? ((speed = 15)) : null);
((_currentframe == 3) ? ((speed = 15)) : null);
((_currentframe == 4) ? ((speed = 15)) : null);
((_currentframe == 5) ? ((speed = 15)) : null);
((_currentframe == 6) ? ((speed = 10)) : null);
((_currentframe == 7) ? ((speed = 25)) : null);
((_currentframe == 8) ? ((speed = 15)) : null);
if (_currentframe == 3) {
if (_root.enemyshotguncounter == 0) {
_rotation = (_rotation + 7);
_root.enemyshotguncounter = _root.enemyshotguncounter + 1;
} else if (_root.enemyshotguncounter == 1) {
_root.enemyshotguncounter = _root.enemyshotguncounter + 1;
} else if (_root.enemyshotguncounter == 2) {
_rotation = (_rotation - 7);
_root.enemyshotguncounter = 0;
}
}
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "ebullet") {
if (_root.ground.hitTest(_x, _y, true) and (inside._currentframe == 1)) {
bob = random(2) + 1;
if (bob == 1) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("ric1", this);
someSound.start(0, 1);
}
}
if (bob == 2) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("ric2", this);
someSound.start(0, 1);
}
}
inside.gotoAndStop(2);
bob = 9;
}
if ((((_x > 570) or (_x < -20)) or (_y > 420)) or (_y < -20)) {
removeMovieClip(this);
}
timer++;
if (timer >= 2) {
_visible = true;
}
if (inside._currentframe == 1) {
if (_currentframe == 5) {
speed = speed + 0.5;
}
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * speed));
}
if ((_currentframe == 8) and (inside._currentframe == 1)) {
gravity = gravity + 0.8;
_y = (_y + gravity);
}
}
}
}
Instance of Symbol 826 MovieClip "menutext" in Frame 9
onClipEvent (load) {
key = false;
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(77) and (key == false)) {
if (_root.menubg._visible == false) {
_root.turret.stop();
for (i in _root) {
if (_root[i]._currentframe != 4) {
_root[i].walk.stop();
_root[i].stand.stop();
_root[i].death.stop();
_root[i].walk2.stop();
}
_root[i].gun.anim.stop();
}
_root.menubg._visible = true;
_root.menuitems._visible = true;
Mouse.show();
_root.cursor._visible = false;
} else if (_root.menubg._visible == true) {
_root.turret.play();
for (i in _root) {
if (_root[i]._currentframe != 4) {
_root[i].walk.play()();
_root[i].stand.play();
_root[i].death.play();
_root[i].walk2.play();
}
if (_root[i].gun.anim._currentframe != 1) {
_root[i].gun.anim.play();
}
}
_root.menubg._visible = false;
_root.menuitems._visible = false;
Mouse.hide();
_root.cursor._visible = true;
}
key = true;
}
if (!Key.isDown(77)) {
key = false;
}
}
Instance of Symbol 837 MovieClip "melee" in Frame 9
onClipEvent (load) {
if (_root._currentframe == 9) {
_visible = false;
}
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
}
Instance of Symbol 840 MovieClip "selectweapon" in Frame 9
onClipEvent (load) {
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root._currentframe != 9) {
if (Key.isDown(81) and (key == false)) {
if (_currentframe == 1) {
gotoAndStop (2);
} else if (_currentframe == 2) {
gotoAndStop (1);
}
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("changeweaponsound", this);
someSound.start(0, 1);
}
_root.changeweaponfunction();
key = true;
}
if (!Key.isDown(81)) {
key = false;
}
}
}
Instance of Symbol 82 MovieClip [bullet] "bullet" in Frame 9
onClipEvent (load) {
if (_name != "bullet") {
if (_root.controlled == false) {
gravity = 0;
rottimer = 0;
if (_root.char.scale == _root.char._xscale) {
_x = (_root.char._x + _root.char.gun._x);
} else if (_root.char.scale != _root.char._xscale) {
_x = (_root.char._x - _root.char.gun._x);
}
_y = (_root.char._y + _root.char.gun._y);
HC = _root.range._currentframe;
gotoAndStop(HC);
X = _root._xmouse - _x;
Y = _root._ymouse - _y;
angle = Math.atan2(Y, X);
_rotation = (((angle * 180) / Math.PI) - 180);
((_currentframe == 1) ? ((speed = 15)) : null);
((_currentframe == 2) ? ((speed = 15)) : null);
((_currentframe == 3) ? ((speed = 15)) : null);
((_currentframe == 4) ? ((speed = 15)) : null);
((_currentframe == 5) ? ((speed = 15)) : null);
((_currentframe == 6) ? ((speed = 10)) : null);
((_currentframe == 7) ? ((speed = 25)) : null);
((_currentframe == 8) ? ((speed = 15)) : null);
if (_currentframe == 3) {
if (_root.shotguncounter == 0) {
_rotation = (_rotation + 7);
_root.shotguncounter = _root.shotguncounter + 1;
} else if (_root.shotguncounter == 1) {
_root.shotguncounter = _root.shotguncounter + 1;
} else if (_root.shotguncounter == 2) {
_rotation = (_rotation - 7);
_root.shotguncounter = 0;
}
}
} else {
_x = _root.turret._x;
_y = _root.turret._y;
gotoAndStop ("turretbullet");
X = _root._xmouse - _x;
Y = _root._ymouse - _y;
angle = Math.atan2(Y, X);
changer = int(((angle * 360) / (Math.PI*2)) + 180);
if (changer < 0) {
changer = changer + 180;
}
if (changer > 360) {
changer = changer - 360;
}
if (changer < 120) {
changer = 120;
}
if (changer > 210) {
changer = 210;
}
_rotation = changer;
speed = 25;
}
_visible = false;
timer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bullet") {
if (_root.ground.hitTest(_x, _y, true) and (inside._currentframe == 1)) {
bob = random(2) + 1;
if ((_currentframe == 5) or (_currentframe == 8)) {
}
if ((_currentframe != 5) or (_currentframe != 8)) {
if (bob == 1) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("ric1", this);
someSound.start(0, 1);
}
}
if (bob == 2) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("ric2", this);
someSound.start(0, 1);
}
}
}
inside.gotoAndStop(2);
bob = 9;
}
if ((((_x > 560) or (_x < -10)) or (_y > 410)) or (_y < -10)) {
removeMovieClip(this);
}
timer++;
if (timer >= 2) {
_visible = true;
}
if (inside._currentframe == 1) {
if (_currentframe == 5) {
speed = speed + 0.5;
}
spinholder = Math.cos((_rotation * Math.PI) / 180) * speed;
_x = (_x - (Math.cos((_rotation * Math.PI) / 180) * speed));
_y = (_y - (Math.sin((_rotation * Math.PI) / 180) * speed));
if (_currentframe == 8) {
gravity = gravity + 0.8;
_y = (_y + gravity);
}
}
}
}
}
Instance of Symbol 842 MovieClip "mainhealth" in Frame 9
onClipEvent (load) {
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
}
Instance of Symbol 845 MovieClip "mainhpbar" in Frame 9
onClipEvent (load) {
bob = _root.overlaydepthcounter;
this.swapDepths(bob);
_root.overlaydepthcounter = _root.overlaydepthcounter + 1;
percent = 0;
maxhealth = 0;
health = maxhealth;
if (_root._currentframe == 9) {
_root.mainhpbar.health = 98;
}
}
onClipEvent (enterFrame) {
if (health > 100) {
health = 100;
}
if (health < 1) {
health = 1;
}
if ((health == 100) and (_root.char._currentframe != 7)) {
_root.char.gotoAndStop(7);
}
gotoAndStop(health);
}
Instance of Symbol 846 MovieClip "menubg" in Frame 9
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
_visible = false;
bob = 11000;
this.swapDepths(bob);
}
Instance of Symbol 874 MovieClip "menuitems" in Frame 9
onClipEvent (load) {
_visible = false;
bob = 13001;
this.swapDepths(bob);
}
Frame 10
stop();
startlevel();
_root.playsurvival = true;
_root.range.pistolammo = 8;
_root.spawnenemies = 0;
_root.survivaltimer = 0;
_root.melee.gotoAndStop(6);
Mouse.hide();
stopAllSounds();
someSound = new Sound();
someSound.attachSound("bossmusic", this);
someSound.start(0, 99999999999);
Instance of Symbol 878 MovieClip "ground" in Frame 10
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 879 MovieClip "headcrab" in Frame 10
onClipEvent (load) {
if (_name != "headcrab") {
roll = random(2);
if (roll == 0) {
_x = 565;
_y = 345;
} else if (roll == 1) {
_x = -15;
_y = 345;
}
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
dietimer = 0;
deathtimer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_currentframe == 4) {
dietimer++;
if (dietimer > 60) {
removeMovieClip(this);
}
}
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < -15) {
_x = -15;
moving = true;
}
if (_x > 565) {
_x = 565;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
}
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 10
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
gravity = 0;
type = 5;
ammo = 5;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y + 20, true)) {
_y = (_y-1);
gravity = 0;
}
if (holdingammo == 0) {
newwep = random(8) + 1;
gotoAndStop(newwep);
if (newwep == 1) {
holdingammo = 10;
}
if (newwep == 2) {
holdingammo = 30;
}
if (newwep == 3) {
holdingammo = 12;
}
if (newwep == 4) {
holdingammo = 50;
}
if (newwep == 5) {
holdingammo = 5;
}
if (newwep == 6) {
holdingammo = 18;
}
if (newwep == 7) {
holdingammo = 22;
}
if (newwep == 8) {
holdingammo = 10;
}
_y = -10;
}
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
newwep = random(8) + 1;
gotoAndStop(newwep);
if (newwep == 1) {
holdingammo = 10;
}
if (newwep == 2) {
holdingammo = 30;
}
if (newwep == 3) {
holdingammo = 12;
}
if (newwep == 4) {
holdingammo = 50;
}
if (newwep == 5) {
holdingammo = 5;
}
if (newwep == 6) {
holdingammo = 18;
}
if (newwep == 7) {
holdingammo = 22;
}
if (newwep == 8) {
holdingammo = 10;
}
_y = -10;
}
if (_currentframe == type) {
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
}
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 793 MovieClip in Frame 10
onClipEvent (enterFrame) {
if (_root.mainhpbar.health == 100) {
_root.char.gotoAndStop(7);
}
if (_root.menubg._visible == true) {
stop();
} else {
play();
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 10
onClipEvent (load) {
if (_name != "bat") {
_y = -20;
_x = random(550);
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 893 MovieClip in Frame 10
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
gravity = 0;
type = 4;
ammo = 50;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y + 20, true)) {
_y = (_y-1);
gravity = 0;
}
if (holdingammo == 0) {
newwep = random(8) + 1;
gotoAndStop(newwep);
if (newwep == 1) {
holdingammo = 10;
}
if (newwep == 2) {
holdingammo = 30;
}
if (newwep == 3) {
holdingammo = 12;
}
if (newwep == 4) {
holdingammo = 50;
}
if (newwep == 5) {
holdingammo = 5;
}
if (newwep == 6) {
holdingammo = 18;
}
if (newwep == 7) {
holdingammo = 22;
}
if (newwep == 8) {
holdingammo = 10;
}
_y = -10;
}
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
newwep = random(8) + 1;
gotoAndStop(newwep);
if (newwep == 1) {
holdingammo = 10;
}
if (newwep == 2) {
holdingammo = 30;
}
if (newwep == 3) {
holdingammo = 12;
}
if (newwep == 4) {
holdingammo = 50;
}
if (newwep == 5) {
holdingammo = 5;
}
if (newwep == 6) {
holdingammo = 18;
}
if (newwep == 7) {
holdingammo = 22;
}
if (newwep == 8) {
holdingammo = 10;
}
_y = -10;
}
if (_currentframe == type) {
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
}
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip "zombieguy" in Frame 10
onClipEvent (load) {
if (_name != "zombieguy") {
roll = random(2);
if (roll == 0) {
_x = 565;
_y = 345;
} else if (roll == 1) {
_x = -15;
_y = 345;
}
dontdissapear = 9;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
chooseweapon = random(100);
if ((chooseweapon >= 0) and (chooseweapon <= 40)) {
type = 1;
}
if ((chooseweapon >= 41) and (chooseweapon <= 50)) {
type = 2;
}
if ((chooseweapon >= 51) and (chooseweapon <= 60)) {
type = 3;
}
if ((chooseweapon >= 61) and (chooseweapon <= 65)) {
type = 4;
}
if ((chooseweapon >= 66) and (chooseweapon <= 67)) {
type = 5;
}
if ((chooseweapon >= 68) and (chooseweapon <= 75)) {
type = 6;
}
if ((chooseweapon >= 76) and (chooseweapon <= 80)) {
type = 7;
}
if ((chooseweapon >= 81) and (chooseweapon <= 83)) {
type = 8;
}
if ((chooseweapon >= 84) and (chooseweapon <= 100)) {
type = 1;
}
gun.gotoAndStop(type);
speed = random(2) + 1;
range = 50 + random(150);
if (type == 3) {
range = 100;
}
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
}
}
onClipEvent (enterFrame) {
if (_name != "zombieguy") {
if (_root.menubg._visible == false) {
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
gotoAndStop (2);
attacked = false;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1181 MovieClip in Frame 10
onClipEvent (load) {
if (_root.gamecomplete == false) {
_visible = false;
} else {
_visible = true;
}
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
type = 2;
down = false;
gotoAndStop(type);
}
onClipEvent (enterFrame) {
if ((((down == false) and _root.char.hit.hitTest(this)) and Key.isDown(69)) and (_visible == true)) {
changeover = _root.melee._currentframe;
type = _currentframe;
_root.melee.gotoAndStop(type);
_root.changeweaponfunction();
gotoAndStop(changeover);
down = true;
firstswap = true;
}
if (!Key.isDown(69)) {
down = false;
}
}
Instance of Symbol 1243 MovieClip "char" in Frame 10
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 28;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if (_x > 540) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Frame 11
startlevel();
_root.range.pistolammo = 10;
stopAllSounds();
if (_root.sound == true) {
Mainmusic = new Sound();
Mainmusic.attachSound("eeriemix", this);
Mainmusic.start(0, 99999);
}
Instance of Symbol 1249 MovieClip "ground" in Frame 11
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1311 MovieClip "char" in Frame 11
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 60) {
_x = 60;
}
if (_x > 555) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 11
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 4;
ammo = 50;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1181 MovieClip in Frame 11
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
type = 5;
down = false;
gotoAndStop(type);
}
onClipEvent (enterFrame) {
if (((down == false) and _root.char.hit.hitTest(this)) and Key.isDown(69)) {
changeover = _root.melee._currentframe;
type = _currentframe;
_root.melee.gotoAndStop(type);
_root.changeweaponfunction();
gotoAndStop(changeover);
down = true;
firstswap = true;
}
if (!Key.isDown(69)) {
down = false;
}
}
Instance of Symbol 1317 MovieClip in Frame 11
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 12
stop();
startlevel();
Instance of Symbol 1323 MovieClip "ground" in Frame 12
onClipEvent (load) {
bob = 399;
this.swapDepths(bob);
}
Instance of Symbol 1335 MovieClip in Frame 12
onClipEvent (load) {
health = 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
_root.ground.dieroof.swapDepths(2100);
removeMovieClip(_root.ground.dieroof);
gotoAndPlay (2);
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 12
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
this.swapDepths(200);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 10) {
_x = 10;
}
if (_x > 520) {
_x = 520;
}
if (_y > 355) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
}
Xd = _root.char._xmouse - this.gun._x;
Yd = _root.char._ymouse - this.gun._y;
radAngle = Math.atan2(Yd, Xd);
this.gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
Instance of Symbol 1340 MovieClip in Frame 12
onClipEvent (load) {
bob = 2999;
this.swapDepths(bob);
}
Instance of Symbol 1342 MovieClip in Frame 12
onClipEvent (load) {
bob = 400;
this.swapDepths(bob);
}
Frame 13
stop();
startlevel();
Instance of Symbol 1356 MovieClip "ground" in Frame 13
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 13
onClipEvent (enterFrame) {
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 13
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 3;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 13
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 2;
ammo = 30;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1362 MovieClip in Frame 13
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 13
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 13
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 13
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 13
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1367 MovieClip in Frame 13
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 14
stop();
startlevel();
_root.screenflicker = 5;
Instance of Symbol 1371 MovieClip "backgroundhangman" in Frame 14
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1373 MovieClip "ground" in Frame 14
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 879 MovieClip "headcrab" in Frame 14
onClipEvent (load) {
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 14
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 2;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.backgroundhangman._currentframe == 1)) {
_x = 540;
}
if ((_x > 555) and (_root.backgroundhangman._currentframe == 2)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1449 MovieClip "hang" in Frame 14
onClipEvent (load) {
dontdissapear = 2345456656;
this.swapDepths(865);
sprung = false;
}
onClipEvent (enterFrame) {
if ((_root.char._x > (this._x - 100)) && (!sprung)) {
this.play();
sprung = true;
}
if ((this.hangmanroomone._currentframe > 90) && (this.hangmanroomone._currentframe < 104)) {
_root.backgroundhangman.play();
}
if (this.hangmanroomone._currentframe > 105) {
_root.backgroundhangman.gotoAndStop(2);
}
if (this.hangmanroomone._currentframe > 140) {
_root.backgroundhangman.exitdoorone.gotoAndStop(2);
}
}
Instance of Symbol 1451 MovieClip in Frame 14
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 15
stop();
startlevel();
Instance of Symbol 1454 MovieClip "ground" in Frame 15
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 15
onClipEvent (enterFrame) {
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 15
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 3;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 15
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1168 MovieClip in Frame 15
onClipEvent (load) {
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
range = 250;
percent = 0;
maxhealth = health;
type = 1;
gun.gotoAndStop(type);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
dontchange = false;
speed = random(3) + 2;
range = 150 + random(100);
gotoAndStop (2);
gravity = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
if (_currentframe == 1) {
gun._x = -2.8;
gun._y = -33;
}
if (_currentframe == 2) {
gun._rotation = -90;
gun._x = -5.8;
gun._y = -28;
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
}
if (_root.char._x > _x) {
_xscale = scale;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 29;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 15
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 20;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 1362 MovieClip in Frame 15
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 15
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1460 MovieClip in Frame 15
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 16
stop();
startlevel();
Instance of Symbol 1469 MovieClip "ground" in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 16
onClipEvent (enterFrame) {
dontdissapear = 2353;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 16
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 5;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1506 MovieClip in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 250;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 3) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (3);
}
timer++;
if ((timer > 30) and (_currentframe == 1)) {
gotoAndStop (2);
timer = 0;
}
}
}
}
Instance of Symbol 1506 MovieClip in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 250;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 3) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (3);
}
timer++;
if ((timer > 30) and (_currentframe == 1)) {
gotoAndStop (2);
timer = 0;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 16
onClipEvent (load) {
dontdissapear = 1;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
range = 250;
percent = 0;
maxhealth = health;
type = 1;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
speed = random(3) + 2;
range = 250 + random(100);
gotoAndStop (2);
gravity = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
if (_currentframe == 1) {
gun._x = -2.8;
gun._y = -33;
}
if (_currentframe == 2) {
gun._rotation = -90;
gun._x = -5.8;
gun._y = -28;
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
}
if (_root.char._x > _x) {
_xscale = scale;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 29;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 1506 MovieClip in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 250;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 3) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (3);
}
timer++;
if ((timer > 30) and (_currentframe == 1)) {
gotoAndStop (2);
timer = 0;
}
}
}
}
Instance of Symbol 1513 MovieClip "turret" in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
_root.controlled = false;
key = false;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.controlled == true) {
_root.char._x = _x - 20;
_root.char._y = _y + 37;
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
angle = Math.atan2(Yd, Xd);
changer = int(((angle * 360) / (Math.PI*2)) + 180);
if (changer < 0) {
changer = changer + 180;
}
if (changer > 360) {
changer = changer - 360;
}
if (changer < 150) {
changer = 150;
}
if (changer > 210) {
changer = 210;
}
_rotation = changer;
}
if ((Key.isDown(69) and (key == false)) and (_root.controlled == false)) {
key = true;
if (_root.controlled == false) {
if (_root.char.hitTest(this)) {
_root.controlled = true;
_root.char._xscale = _root.char.scale;
if (_root.eee._visible == true) {
_root.eee._visible = false;
someSound = new Sound();
someSound.attachSound("YES", this);
someSound.start(0, 1);
}
_root.char.gotoAndStop(6);
}
}
}
if ((Key.isDown(69) and (key == false)) and (_root.controlled == true)) {
key = true;
_root.controlled = false;
_root.char.gotoAndStop(3);
_root.char._x = _x - 25;
_root.shooting = false;
_root.changeweaponfunction();
}
if (!Key.isDown(69)) {
key = false;
}
}
}
Instance of Symbol 1515 MovieClip "headcrab" in Frame 16
onClipEvent (load) {
dontdissapear = 235;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1532 MovieClip in Frame 16
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) and (_currentframe != 12)) and (_currentframe == 1)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 1535 MovieClip in Frame 16
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 17
stop();
startlevel();
_root.controlled = false;
Instance of Symbol 1537 MovieClip "ground" in Frame 17
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 17
onClipEvent (enterFrame) {
dontdissapear = 2234;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 17
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 3;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 17
onClipEvent (load) {
dontdissapear = 9334;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(3);
dontchange = false;
speed = random(5) + 1;
range = 40;
gotoAndStop (2);
gravity = 0;
moving = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 29;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 17
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 4;
ammo = 50;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip in Frame 17
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(3);
dontchange = false;
speed = random(2) + 2;
range = 150;
gotoAndStop (2);
gravity = 0;
moving = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 29;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 1547 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1565 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1572 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1578 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1547 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1565 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1572 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1578 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 17
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1581 MovieClip in Frame 17
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 18
stop();
startlevel();
Instance of Symbol 1594 MovieClip "ground" in Frame 18
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 18
onClipEvent (enterFrame) {
dontdissapear = 222353 /* 0x036491 */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 18
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 9;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
if (_root.char.hit.hitTest(this)) {
if (_root.mainhpbar.health <= 79) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 320;
_x = 50;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char.gotoAndStop(7);
}
}
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 18
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 2;
ammo = 60;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip in Frame 18
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 7;
speed = 1;
range = 950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 400;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 18
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 7;
speed = 1;
range = 950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 400;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1597 MovieClip in Frame 18
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 19
stop();
startlevel();
Instance of Symbol 1609 MovieClip "ground" in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 19
onClipEvent (enterFrame) {
dontdissapear = 12;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 19
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 12;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 320;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 3;
ammo = 10;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip in Frame 19
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 150 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 20;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 1362 MovieClip in Frame 19
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (1);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
_root.enemyhitbyweapons(this);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
gravity = 5;
_y = (_y + 10);
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 19
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 4;
speed = 1;
range = 150 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 100;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if ((okfight == true) and (_currentframe != 4)) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1634 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1362 MovieClip in Frame 19
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (1);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
_root.enemyhitbyweapons(this);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
gravity = 5;
_y = (_y + 10);
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 19
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (1);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
_root.enemyhitbyweapons(this);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
gravity = 5;
_y = (_y + 10);
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 19
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (1);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
_root.enemyhitbyweapons(this);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
gravity = 5;
_y = (_y + 10);
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 19
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (1);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (health <= 0) {
gotoAndStop (4);
}
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
_root.enemyhitbyweapons(this);
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
gravity = 5;
_y = (_y + 10);
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
}
Instance of Symbol 1515 MovieClip "headcrab" in Frame 19
onClipEvent (load) {
dontdissapear = 235;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1532 MovieClip in Frame 19
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) and (_currentframe != 12)) and (_currentframe == 1)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 1637 MovieClip in Frame 19
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 20
stop();
startlevel();
Instance of Symbol 1651 MovieClip "ground" in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 20
onClipEvent (enterFrame) {
dontdissapear = 43224;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 20
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 19;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
if (_root.char.hit.hitTest(this)) {
if (_root.mainhpbar.health <= 79) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char.gotoAndStop(7);
}
}
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 20
onClipEvent (load) {
dontdissapear = 20;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(3);
dontchange = false;
speed = random(3) + 2;
range = 500;
gotoAndStop (2);
gravity = 0;
moving = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = _root.char._y - (_y + gun._y);
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 20
onClipEvent (load) {
dontdissapear = 20;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(3);
dontchange = false;
speed = random(3) + 2;
range = 500;
gotoAndStop (2);
gravity = 0;
moving = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = _root.char._y - (_y + gun._y);
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 7;
ammo = 10;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip in Frame 20
onClipEvent (load) {
dontdissapear = 20;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(3);
dontchange = false;
speed = random(3) + 2;
range = 500;
gotoAndStop (2);
gravity = 0;
moving = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
_root.enemyhitbyweapons(this);
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if (((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (health != 5)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = _root.char._y - (_y + gun._y);
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
Instance of Symbol 1515 MovieClip "headcrab" in Frame 20
onClipEvent (load) {
dontdissapear = 2374;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
if (_y > 550) {
removeMovieClip(this);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1634 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
timer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_currentframe != 2) {
_root.enemyhitbyweapons(this);
_root.charhitbyweapons(this);
if (_root.char.hit.hitTest(this)) {
health = health - 1;
}
if (health <= 0) {
gotoAndStop (2);
}
}
}
Instance of Symbol 1654 MovieClip in Frame 20
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 21
stop();
startlevel();
Instance of Symbol 1659 MovieClip "ground" in Frame 21
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 21
onClipEvent (enterFrame) {
dontdissapear = 32345;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 21
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 24;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 21
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 350 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 21
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 350 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 21
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 350 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1672 MovieClip in Frame 21
onClipEvent (load) {
speed = 2 + random(3);
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
stop();
} else if (_currentframe != 1) {
play();
}
if (_root.menubg._visible == false) {
if (_x < 174) {
_x = 174;
}
if (_root.char.hit.hitTest(hit2)) {
_root.mainhpbar.health = _root.mainhpbar.health + 1;
}
if (_currentframe == 1) {
timerchange++;
if (_root.char.hit.hitTest(hit)) {
gotoAndPlay (2);
}
if ((_root.char._x < _x) and (timerchange > 10)) {
moving = true;
timerchange = 0;
}
if ((_root.char._x > _x) and (timerchange > 10)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
}
if (moving == true) {
_x = (_x - speed);
}
}
}
}
Instance of Symbol 1515 MovieClip "headcrab" in Frame 21
onClipEvent (load) {
dontdissapear = 235;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
trace(s);
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1181 MovieClip in Frame 21
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
type = 3;
down = false;
gotoAndStop(type);
}
onClipEvent (enterFrame) {
if (((down == false) and _root.char.hit.hitTest(this)) and Key.isDown(69)) {
changeover = _root.melee._currentframe;
type = _currentframe;
_root.melee.gotoAndStop(type);
_root.changeweaponfunction();
gotoAndStop(changeover);
down = true;
firstswap = true;
}
if (!Key.isDown(69)) {
down = false;
}
}
Instance of Symbol 1678 MovieClip in Frame 21
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 22
stop();
startlevel();
Instance of Symbol 1680 MovieClip "spawner" in Frame 22
onClipEvent (load) {
bat = false;
battimer = 0;
batrandomnum = 0;
batcurrent = 0;
maxbats = 5;
}
onClipEvent (enterFrame) {
if ((maxbats > 0) and (_root.hang._visible == true)) {
battimer = battimer + 0.3;
if ((battimer > 20) && (!bat)) {
batrandomnum = Math.random() * 1;
batrandomnum = Math.round(batrandomnum);
bat = true;
}
if (((batrandomnum == 0) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = 596;
tempname._y = 55;
batcurrent = batcurrent + 1;
battimer = 0;
bat = false;
maxbats = maxbats - 1;
}
if (((batrandomnum == 1) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = -48;
tempname._y = 55;
batcurrent = batcurrent + 1;
maxbats = maxbats - 1;
battimer = 0;
bat = false;
}
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 22
onClipEvent (load) {
dontdissapear = 225;
if (_name == "bat") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "bat") {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 1741 MovieClip "backgroundhangman" in Frame 22
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 1758 MovieClip "hang" in Frame 22
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
sprung = false;
_visible = false;
}
onClipEvent (enterFrame) {
if ((_root.char._x > (this._x - 100)) && (!sprung)) {
this.play();
sprung = true;
}
if (this.hangmanroomone._currentframe > 88) {
_visible = true;
}
if ((this.hangmanroomone._currentframe > 90) && (this.hangmanroomone._currentframe < 104)) {
_root.backgroundhangman.play();
}
if (this.hangmanroomone._currentframe > 105) {
_root.backgroundhangman.gotoAndStop(2);
}
if (this.hangmanroomone._currentframe > 140) {
_root.backgroundhangman.exitdoorone.gotoAndStop(2);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 22
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 2233;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1761 MovieClip "door" in Frame 22
onClipEvent (enterFrame) {
dontdissapear = 2142;
if (((_root.hang.hangmanroomone._currentframe == 142) and (_root.safernextscreen == 0)) and (_root.spawner.maxbats == 0)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1532 MovieClip in Frame 22
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this) and (_currentframe != 12)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 1763 MovieClip in Frame 22
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 23
stop();
startlevel();
Instance of Symbol 1765 MovieClip "ground" in Frame 23
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 1359 MovieClip "door" in Frame 23
onClipEvent (enterFrame) {
dontdissapear = 8233;
if (_root.batboss._currentframe == 4) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 23
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 67;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1821 MovieClip "batboss" in Frame 23
onClipEvent (load) {
teleporting = false;
jumping = false;
grav = 0;
batmax = 30;
batcurrent = 0;
teleporttimer = 0;
positiondice = -1;
teleported = false;
shootingtimer = 0;
pos = 1;
different = false;
health = 100;
maxhealth = 100;
hpbar._xscale = percent;
}
onClipEvent (enterFrame) {
if (_currentframe != 4) {
if (_root.menubg._visible == true) {
standing.stop();
shooting.stop();
teleport.stop();
death.stop();
} else {
standing.play();
shooting.play();
teleport.play();
death.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
}
if ((this._currentframe == 1) && (batcurrent < batmax)) {
shootingtimer = shootingtimer + 0.3;
}
if (shootingtimer > 20) {
this.gotoAndStop(2);
shootingtimer = 0;
}
if (this.shooting._currentframe > 11) {
this.gotoAndStop(1);
}
if (this._currentframe == 1) {
teleporttimer = teleporttimer + 0.3;
}
if ((teleporttimer > 20) && (this._currentframe == 1)) {
this.gotoAndStop(3);
teleporttimer = 0;
}
if (((this.teleport._currentframe > 10) && (!teleported)) && (positiondice < 0)) {
positiondice = Math.random() * 1;
positiondice = Math.round(positiondice);
teleported = true;
}
if (this.teleport._currentframe > 22) {
this.gotoAndStop(1);
teleported = false;
}
if (_root.teleportone.hitTest(this) && (positiondice == 1)) {
this._x = _root.teleporttwo._x;
this._y = _root.teleporttwo._y;
positiondice = -1;
}
if (_root.teleportone.hitTest(this) && (positiondice == 0)) {
this._x = _root.teleportthree._x;
this._y = _root.teleportthree._y;
positiondice = -1;
this._xscale = this._xscale - (this._xscale * 2);
}
if (_root.teleporttwo.hitTest(this) && (positiondice == 0)) {
this._x = _root.teleportthree._x;
this._y = _root.teleportthree._y;
positiondice = -1;
this._xscale = this._xscale - (this._xscale * 2);
}
if (_root.teleporttwo.hitTest(this) && (positiondice == 1)) {
this._x = _root.teleportone._x;
this._y = _root.teleportone._y;
positiondice = -1;
}
if (_root.teleportthree.hitTest(this) && (positiondice == 0)) {
this._x = _root.teleporttwo._x;
this._y = _root.teleporttwo._y;
positiondice = -1;
this._xscale = this._xscale - (this._xscale * 2);
}
if (_root.teleportthree.hitTest(this) && (positiondice == 1)) {
this._x = _root.teleportone._x;
this._y = _root.teleportone._y;
positiondice = -1;
this._xscale = this._xscale - (this._xscale * 2);
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 23
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 4;
ammo = 100;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 23
onClipEvent (load) {
collect = false;
grav = 0;
_root.totalammo = _root.totalammo + 1;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 8;
_root.range.uziammo = _root.range.uziammo + 6;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 10;
_root.range.rocketammo = _root.range.rocketammo + 1;
_root.range.energyammo = _root.range.energyammo + 2;
_root.range.sniperammo = _root.range.sniperammo + 2;
_root.range.grenadeammo = _root.range.grenadeammo + 1;
_root.totalammo = _root.totalammo - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 1825 MovieClip "bat" in Frame 23
onClipEvent (load) {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 1830 MovieClip in Frame 23
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 24
stop();
startlevel();
_root.range.pistolammo = 10;
Instance of Symbol 1362 MovieClip in Frame 24
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1506 MovieClip in Frame 24
onClipEvent (load) {
timer = 0;
health = 10;
}
onClipEvent (enterFrame) {
if (_currentframe != 3) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (3);
}
timer++;
if ((timer > 30) and (_currentframe == 1)) {
gotoAndStop (2);
timer = 0;
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 24
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 19;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 24
onClipEvent (enterFrame) {
dontdissapear = 23623;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 893 MovieClip in Frame 24
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 1;
ammo = 8;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1836 MovieClip "headcrab" in Frame 24
onClipEvent (load) {
dontdissapear = 235;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 24
onClipEvent (load) {
dontdissapear = 23312;
collect = false;
grav = 0;
_root.totalammo = _root.totalammo + 1;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 5;
_root.range.uziammo = _root.range.uziammo + 5;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 5;
_root.range.rocketammo = _root.range.rocketammo + 3;
_root.range.energyammo = _root.range.energyammo + 3;
_root.range.sniperammo = _root.range.sniperammo + 3;
_root.range.grenadeammo = _root.range.grenadeammo + 3;
_root.totalammo = _root.totalammo - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 1532 MovieClip in Frame 24
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) and (_currentframe != 12)) and (_currentframe == 1)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 1839 MovieClip in Frame 24
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 25
stop();
startlevel();
Instance of Symbol 1680 MovieClip "spawner" in Frame 25
onClipEvent (load) {
bat = false;
battimer = 0;
batrandomnum = 0;
batcurrent = 0;
maxbats = 5;
}
onClipEvent (enterFrame) {
if (maxbats > 0) {
battimer = battimer + 0.3;
if ((battimer > 20) && (!bat)) {
batrandomnum = Math.random() * 1;
batrandomnum = Math.round(batrandomnum);
bat = true;
}
if (((batrandomnum == 0) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = 596;
tempname._y = 55;
batcurrent = batcurrent + 1;
battimer = 0;
bat = false;
maxbats = maxbats - 1;
}
if (((batrandomnum == 1) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = -48;
tempname._y = 55;
batcurrent = batcurrent + 1;
maxbats = maxbats - 1;
battimer = 0;
bat = false;
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 25
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 1923;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 25
onClipEvent (enterFrame) {
dontdissapear = 235436 /* 0x0397AC */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1168 MovieClip in Frame 25
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 5;
speed = 1;
range = 650 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 25
onClipEvent (load) {
dontdissapear = 999;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 150 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 25
onClipEvent (load) {
dontdissapear = 225;
if (_name == "bat") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "bat") {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 893 MovieClip in Frame 25
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 8;
ammo = 6;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1547 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1556 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1565 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1572 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1578 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1547 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1572 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1578 MovieClip in Frame 25
onClipEvent (load) {
health = 1;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (health > 0) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndPlay (2);
}
}
}
Instance of Symbol 1848 MovieClip in Frame 25
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 26
stop();
startlevel();
Instance of Symbol 1680 MovieClip "spawner" in Frame 26
onClipEvent (load) {
ready = false;
bat = false;
crab = false;
battimer = 0;
crabtimer = 0;
batrandomnum = 0;
crabrandomnum = 0;
batcurrent = 0;
crabcurrent = 0;
maxbats = 0;
}
onClipEvent (enterFrame) {
if (maxbats < 25) {
if (ready) {
battimer = battimer + 1;
crabtimer = crabtimer + 1;
}
if ((battimer > 20) && (!bat)) {
batrandomnum = Math.random() * 1;
batrandomnum = Math.round(batrandomnum);
bat = true;
}
if (((batrandomnum == 0) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = 75;
tempname._y = 55;
batcurrent = batcurrent + 1;
battimer = 0;
bat = false;
maxbats = maxbats + 1;
}
if (((batrandomnum == 1) && (bat)) && (batcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = 480;
tempname._y = 55;
batcurrent = batcurrent + 1;
battimer = 0;
bat = false;
maxbats = maxbats + 1;
}
if ((crabtimer > 20) && (!crab)) {
crabrandomnum = Math.random() * 1;
crabrandomnum = Math.round(crabrandomnum);
crab = true;
}
if (((crabrandomnum == 0) && (crab)) && (crabcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newheadcrab" + _root.enemydepthcounter];
tempname._x = 45;
tempname._y = 296;
crabcurrent = crabcurrent + 1;
crabtimer = 0;
crab = false;
}
if (((crabrandomnum == 1) && (crab)) && (crabcurrent < 10)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newheadcrab" + _root.enemydepthcounter];
tempname._x = 45;
tempname._y = 345;
crabcurrent = crabcurrent + 1;
crabtimer = 0;
crab = false;
}
}
}
Instance of Symbol 1858 MovieClip "switchone" in Frame 26
onClipEvent (load) {
pressed = false;
up = false;
down = true;
speed = 0.2;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (((_root.char.hitTest(this) && (Key.isDown(69))) && (!pressed)) or ((_root.char.hitTest(_root.ground.elevator.switchone) && (Key.isDown(69))) && (!pressed))) {
_root.spawner.ready = true;
_root.ground.elevator.gotoAndStop(2);
_root.ground.elevator.switchone.gotoAndStop(2);
this.gotoAndStop(2);
someSound = new Sound();
someSound.attachSound("buttonpresssound", this);
someSound.start(0, 1);
pressed = true;
}
if ((_root.ground.elevator._currentframe > 1) && (down)) {
_root.ground.elevator._y = _root.ground.elevator._y + speed;
}
if ((_root.ground.elevator._currentframe > 1) && (up)) {
_root.ground.elevator._y = _root.ground.elevator._y - speed;
}
if (_root.ground.elevator.hitTest(_root.bottemhit) && (down)) {
down = false;
up = true;
_root.ground.elevator.gotoAndStop(1);
_root.ground.elevator.switchone.gotoAndStop(1);
this.gotoAndStop(1);
pressed = false;
speed = 1;
}
if (_root.ground.elevator.hitTest(_root.tophit) && (up)) {
down = true;
up = false;
_root.ground.elevator.gotoAndStop(1);
_root.ground.elevator.switchone.gotoAndStop(1);
this.gotoAndStop(1);
pressed = false;
}
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 26
onClipEvent (load) {
collect = false;
grav = 0;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 5;
_root.range.uziammo = _root.range.uziammo + 5;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 5;
_root.range.rocketammo = _root.range.rocketammo + 3;
_root.range.energyammo = _root.range.energyammo + 3;
_root.range.sniperammo = _root.range.sniperammo + 3;
_root.range.grenadeammo = _root.range.grenadeammo + 3;
removeMovieClip(this);
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 26
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 192;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 26
onClipEvent (enterFrame) {
dontdissapear = 3456753 /* 0x34BEF1 */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1168 MovieClip in Frame 26
onClipEvent (load) {
dontdissapear = 934;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 150 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 26
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 6;
ammo = 10;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 1168 MovieClip in Frame 26
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 150 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 26
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 20;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 1515 MovieClip "headcrab" in Frame 26
onClipEvent (load) {
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
_root.nextscreen = _root.nextscreen + 1;
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
_x = (_root.hang._x - random(10));
_y = ((_root.hang._y + 150) - random(10));
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 26
onClipEvent (load) {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.spawner.batcurrent = _root.spawner.batcurrent - 1;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 1873 MovieClip in Frame 26
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 27
stop();
startlevel();
Instance of Symbol 1903 MovieClip "meat" in Frame 27
onClipEvent (load) {
hammer = false;
cut = false;
speed = 0;
firsthit = false;
}
onClipEvent (enterFrame) {
if (this._name != meat) {
while (_root.ground.conveyone.hitTest(this._x, this._y + 2, true) && (!firsthit)) {
this._x = this._x + 1;
this._y = this._y - 2;
speed = 0;
firsthit = true;
}
if (_root.ground.conveyone.hitTest(this._x, this._y, true)) {
this._x = this._x + 1;
this._y = this._y - speed;
speed = 0;
}
if (_root.ground.conveytwo.hitTest(this._x, this._y, true)) {
this._x = this._x - 1;
this._y = this._y - speed;
speed = 0;
}
if ((!_root.ground.conveytwo.hitTest(this._x, this._y, true)) or (!_root.ground.conveyone.hitTest(this._x, this._y + 5, true))) {
speed = speed + 0.1;
this._y = this._y + speed;
}
if (_root.ground.hammerone.hitTest(this._x + 5, this._y - 2, true) && (!hammer)) {
this._x = this._x - 1;
}
if (_root.ground.hammerone.hitTest(this._x, this._y - 2, true) && (!hammer)) {
this.nextFrame();
hammer = true;
}
if ((!_root.ground.hammerone.hitTest(this._x, this._y - 2, true)) && (hammer)) {
hammer = false;
}
if (_root.ground.blade.hitTest(this._x, this._y - 4, true) && (!cut)) {
cut = false;
this.gotoAndStop(5);
}
if (this.hitTest(_root.ground.bucket)) {
removeMovieClip(this);
}
}
}
Instance of Symbol 1905 MovieClip in Frame 27
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
if ((timer > 10) && (_root.switchtwo._currentframe == 2)) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.meat, "newmeat" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newmeat" + _root.objectdepthcounter];
tempname._x = 110;
tempname._y = 70;
timer = 0;
}
}
Instance of Symbol 1858 MovieClip "switchtwo" in Frame 27
onClipEvent (load) {
pressed = false;
if (!pressed) {
_root.ground.conveyone.stop();
_root.ground.conveytwo.stop();
_root.ground.blade.stop();
_root.ground.hammerone.stop();
_root.ground.blade.spinner.stop();
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) && (Key.isDown(69))) && (!pressed)) {
someSound = new Sound();
someSound.attachSound("buttonpresssound", this);
someSound.start(0, 1);
pressed = true;
this.gotoAndStop(2);
_root.ground.conveyone.gotoAndStop(2);
_root.ground.conveytwo.gotoAndStop(2);
_root.ground.blade.play();
_root.ground.hammerone.play();
_root.ground.blade.spinner.play();
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 27
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 46;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
if (_currentframe != 7) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if (_y < -15) {
_root.char._y = 92;
_root.char._x = 10;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 27
onClipEvent (enterFrame) {
dontdissapear = 2234253235435;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1908 MovieClip in Frame 27
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 28
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 28
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 99;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 28
onClipEvent (enterFrame) {
dontdissapear = 2121834 /* 0x20606A */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1168 MovieClip in Frame 28
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 8;
speed = 1;
range = 950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 900;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 28
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 10) {
_x = 10;
moving = true;
}
if (_y > 550) {
removeMovieClip(this);
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1916 MovieClip in Frame 28
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 29
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 29
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 245;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 29
onClipEvent (enterFrame) {
dontdissapear = 562;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 29
onClipEvent (load) {
dontdissapear = 3453;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1927 MovieClip in Frame 29
onClipEvent (load) {
bob = 3000;
this.swapDepths(bob);
}
Instance of Symbol 1929 MovieClip in Frame 29
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 30
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 30
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 632;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.endlevel();
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 30
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 2;
speed = 1;
range = 950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 30
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
speed = 1;
range = 250 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 30
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 2;
speed = 1;
range = 950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 200;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 30
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
speed = 1;
range = 250 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 30
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
speed = 1;
range = 250 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1941 MovieClip in Frame 30
onClipEvent (load) {
bob = 3000;
this.swapDepths(bob);
}
Instance of Symbol 1943 MovieClip in Frame 30
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 31
stop();
startlevel();
Instance of Symbol 1946 MovieClip "ground" in Frame 31
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 2035 MovieClip in Frame 31
onClipEvent (load) {
dontlol = 3245;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
popuptimer = 0;
sinktimer = 0;
up = false;
down = true;
left = true;
right = false;
speed = Math.random() * 2;
speed = speed + 1;
changespeed = Math.random() * 2;
changespeed = changespeed + 1;
offset = 0;
health = 20;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
popup.stop();
walk.stop();
attack.stop();
sink.stop();
} else {
popup.play();
walk.play();
attack.play();
sink.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if ((_currentframe == 1) && (down)) {
popuptimer = popuptimer + changespeed;
}
if ((popuptimer > 100) && (down)) {
popuptimer = 0;
down = false;
up = true;
popup.gotoAndPlay(2);
}
if ((_currentframe > 1) && (up)) {
sinktimer = sinktimer + changespeed;
}
if ((sinktimer > 100) && (up)) {
sinktimer = 0;
down = true;
up = false;
gotoAndStop (5);
}
if (sink._currentframe == 12) {
_x = (Math.random() * 400);
gotoAndStop (1);
}
if (popup._currentframe == 40) {
gotoAndStop (2);
}
if (((_currentframe < 4) && (_x < _root.char._x)) && (left)) {
offset = offset + 1;
_x = (_x - speed);
}
if (((_currentframe < 4) && (_x > _root.char._x)) && (right)) {
offset = offset + 1;
_x = (_x + speed);
}
if ((offset > 10) && (left)) {
right = true;
left = false;
offset = 0;
}
if ((offset > 10) && (right)) {
right = false;
left = true;
offset = 0;
}
if (((_currentframe < 3) && (_x < _root.char._x)) && (right)) {
_xscale = -100;
_x = (_x + speed);
}
if (((_currentframe < 3) && (_x > _root.char._x)) && (left)) {
_xscale = 100;
_x = (_x - speed);
}
if (((_x > (_root.char._x - 70)) && (_x < (_root.char._x + 70))) && (_currentframe == 2)) {
gotoAndStop (3);
}
if (attack._currentframe == 22) {
gotoAndStop (2);
}
}
}
}
Instance of Symbol 2035 MovieClip in Frame 31
onClipEvent (load) {
dontlol = 3245576 /* 0x318608 */;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
popuptimer = 0;
sinktimer = 0;
up = false;
down = true;
left = true;
right = false;
speed = Math.random() * 2;
speed = speed + 1;
changespeed = Math.random() * 2;
changespeed = changespeed + 1;
offset = 0;
health = 20;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
popup.stop();
walk.stop();
attack.stop();
sink.stop();
} else {
popup.play();
walk.play();
attack.play();
sink.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if ((_currentframe == 1) && (down)) {
popuptimer = popuptimer + changespeed;
}
if ((popuptimer > 100) && (down)) {
popuptimer = 0;
down = false;
up = true;
popup.gotoAndPlay(2);
}
if ((_currentframe > 1) && (up)) {
sinktimer = sinktimer + changespeed;
}
if ((sinktimer > 100) && (up)) {
sinktimer = 0;
down = true;
up = false;
gotoAndStop (5);
}
if (sink._currentframe == 12) {
_x = (Math.random() * 400);
gotoAndStop (1);
}
if (popup._currentframe == 40) {
gotoAndStop (2);
}
if (((_currentframe < 4) && (_x < _root.char._x)) && (left)) {
offset = offset + 1;
_x = (_x - speed);
}
if (((_currentframe < 4) && (_x > _root.char._x)) && (right)) {
offset = offset + 1;
_x = (_x + speed);
}
if ((offset > 10) && (left)) {
right = true;
left = false;
offset = 0;
}
if ((offset > 10) && (right)) {
right = false;
left = true;
offset = 0;
}
if (((_currentframe < 3) && (_x < _root.char._x)) && (right)) {
_xscale = -100;
_x = (_x + speed);
}
if (((_currentframe < 3) && (_x > _root.char._x)) && (left)) {
_xscale = 100;
_x = (_x - speed);
}
if (((_x > (_root.char._x - 70)) && (_x < (_root.char._x + 70))) && (_currentframe == 2)) {
gotoAndStop (3);
}
if (attack._currentframe == 22) {
gotoAndStop (2);
}
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 31
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 1245;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2038 MovieClip "door" in Frame 31
onClipEvent (enterFrame) {
dontdissapear = 122435 /* 0x01DE43 */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1181 MovieClip in Frame 31
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
type = 5;
down = false;
gotoAndStop(type);
}
onClipEvent (enterFrame) {
if (((down == false) and _root.char.hit.hitTest(this)) and Key.isDown(69)) {
changeover = _root.melee._currentframe;
type = _currentframe;
_root.melee.gotoAndStop(type);
_root.changeweaponfunction();
gotoAndStop(changeover);
down = true;
firstswap = true;
}
if (!Key.isDown(69)) {
down = false;
}
}
Instance of Symbol 2046 MovieClip "bloodspraystep" in Frame 31
onClipEvent (enterFrame) {
if (this._name != bloodspraystep) {
if (this._currentframe == 8) {
removeMovieClip(this);
}
}
}
Instance of Symbol 1680 MovieClip "spawner" in Frame 31
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer = timer + 1;
if (((timer > 2) && (_root.char._currentframe == 5)) && (_root.ground.hitTest(_root.char._x, _root.char._y + 10, true))) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.bloodspraystep, "newbloodspraystep" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newbloodspraystep" + _root.objectdepthcounter];
tempname._x = _root.char._x;
tempname._y = _root.char._y - 15;
timer = 0;
}
}
Instance of Symbol 1532 MovieClip in Frame 31
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this) and (_currentframe != 12)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 2051 MovieClip "watertop" in Frame 31
onClipEvent (load) {
this.swapDepths(801);
}
Instance of Symbol 2054 MovieClip in Frame 31
onClipEvent (load) {
this.swapDepths(802);
}
Instance of Symbol 2056 MovieClip in Frame 31
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 32
stop();
startlevel();
Instance of Symbol 2058 MovieClip "ground" in Frame 32
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Instance of Symbol 2046 MovieClip "bloodspraystep" in Frame 32
onClipEvent (enterFrame) {
if (this._name != bloodspraystep) {
if (this._currentframe == 8) {
removeMovieClip(this);
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 32
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 2455;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2038 MovieClip "door" in Frame 32
onClipEvent (enterFrame) {
dontdissapear = 1241234 /* 0x12F092 */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 2035 MovieClip in Frame 32
onClipEvent (load) {
dontdissapaera = 36436;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
popuptimer = 0;
sinktimer = 0;
up = false;
down = true;
left = true;
right = false;
speed = Math.random() * 2;
speed = speed + 1;
changespeed = Math.random() * 2;
changespeed = changespeed + 1;
offset = 0;
health = 20;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
popup.stop();
walk.stop();
attack.stop();
sink.stop();
} else {
popup.play();
walk.play();
attack.play();
sink.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if ((_currentframe == 1) && (down)) {
popuptimer = popuptimer + changespeed;
}
if ((popuptimer > 100) && (down)) {
popuptimer = 0;
down = false;
up = true;
popup.gotoAndPlay(2);
}
if ((_currentframe > 1) && (up)) {
sinktimer = sinktimer + changespeed;
}
if ((sinktimer > 100) && (up)) {
sinktimer = 0;
down = true;
up = false;
gotoAndStop (5);
}
if (sink._currentframe == 12) {
_x = (Math.random() * 400);
gotoAndStop (1);
}
if (popup._currentframe == 40) {
gotoAndStop (2);
}
if (((_currentframe < 4) && (_x < _root.char._x)) && (left)) {
offset = offset + 1;
_x = (_x - speed);
}
if (((_currentframe < 4) && (_x > _root.char._x)) && (right)) {
offset = offset + 1;
_x = (_x + speed);
}
if ((offset > 10) && (left)) {
right = true;
left = false;
offset = 0;
}
if ((offset > 10) && (right)) {
right = false;
left = true;
offset = 0;
}
if (((_currentframe < 3) && (_x < _root.char._x)) && (right)) {
_xscale = -100;
_x = (_x + speed);
}
if (((_currentframe < 3) && (_x > _root.char._x)) && (left)) {
_xscale = 100;
_x = (_x - speed);
}
if (((_x > (_root.char._x - 70)) && (_x < (_root.char._x + 70))) && (_currentframe == 2)) {
gotoAndStop (3);
}
if (attack._currentframe == 22) {
gotoAndStop (2);
}
}
}
}
Instance of Symbol 2035 MovieClip in Frame 32
onClipEvent (load) {
dontdissapaera = 234234 /* 0x0392FA */;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
popuptimer = 0;
sinktimer = 0;
up = false;
down = true;
left = true;
right = false;
speed = Math.random() * 2;
speed = speed + 1;
changespeed = Math.random() * 2;
changespeed = changespeed + 1;
offset = 0;
health = 20;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
popup.stop();
walk.stop();
attack.stop();
sink.stop();
} else {
popup.play();
walk.play();
attack.play();
sink.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if ((_currentframe == 1) && (down)) {
popuptimer = popuptimer + changespeed;
}
if ((popuptimer > 100) && (down)) {
popuptimer = 0;
down = false;
up = true;
popup.gotoAndPlay(2);
}
if ((_currentframe > 1) && (up)) {
sinktimer = sinktimer + changespeed;
}
if ((sinktimer > 100) && (up)) {
sinktimer = 0;
down = true;
up = false;
gotoAndStop (5);
}
if (sink._currentframe == 12) {
_x = (Math.random() * 400);
gotoAndStop (1);
}
if (popup._currentframe == 40) {
gotoAndStop (2);
}
if (((_currentframe < 4) && (_x < _root.char._x)) && (left)) {
offset = offset + 1;
_x = (_x - speed);
}
if (((_currentframe < 4) && (_x > _root.char._x)) && (right)) {
offset = offset + 1;
_x = (_x + speed);
}
if ((offset > 10) && (left)) {
right = true;
left = false;
offset = 0;
}
if ((offset > 10) && (right)) {
right = false;
left = true;
offset = 0;
}
if (((_currentframe < 3) && (_x < _root.char._x)) && (right)) {
_xscale = -100;
_x = (_x + speed);
}
if (((_currentframe < 3) && (_x > _root.char._x)) && (left)) {
_xscale = 100;
_x = (_x - speed);
}
if (((_x > (_root.char._x - 70)) && (_x < (_root.char._x + 70))) && (_currentframe == 2)) {
gotoAndStop (3);
}
if (attack._currentframe == 22) {
gotoAndStop (2);
}
}
}
}
Instance of Symbol 2035 MovieClip in Frame 32
onClipEvent (load) {
dontdissapaera = 3633;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
popuptimer = 0;
sinktimer = 0;
up = false;
down = true;
left = true;
right = false;
speed = Math.random() * 2;
speed = speed + 1;
changespeed = Math.random() * 2;
changespeed = changespeed + 1;
offset = 0;
health = 20;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
popup.stop();
walk.stop();
attack.stop();
sink.stop();
} else {
popup.play();
walk.play();
attack.play();
sink.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if ((_currentframe == 1) && (down)) {
popuptimer = popuptimer + changespeed;
}
if ((popuptimer > 100) && (down)) {
popuptimer = 0;
down = false;
up = true;
popup.gotoAndPlay(2);
}
if ((_currentframe > 1) && (up)) {
sinktimer = sinktimer + changespeed;
}
if ((sinktimer > 100) && (up)) {
sinktimer = 0;
down = true;
up = false;
gotoAndStop (5);
}
if (sink._currentframe == 12) {
_x = (Math.random() * 400);
gotoAndStop (1);
}
if (popup._currentframe == 40) {
gotoAndStop (2);
}
if (((_currentframe < 4) && (_x < _root.char._x)) && (left)) {
offset = offset + 1;
_x = (_x - speed);
}
if (((_currentframe < 4) && (_x > _root.char._x)) && (right)) {
offset = offset + 1;
_x = (_x + speed);
}
if ((offset > 10) && (left)) {
right = true;
left = false;
offset = 0;
}
if ((offset > 10) && (right)) {
right = false;
left = true;
offset = 0;
}
if (((_currentframe < 3) && (_x < _root.char._x)) && (right)) {
_xscale = -100;
_x = (_x + speed);
}
if (((_currentframe < 3) && (_x > _root.char._x)) && (left)) {
_xscale = 100;
_x = (_x - speed);
}
if (((_x > (_root.char._x - 70)) && (_x < (_root.char._x + 70))) && (_currentframe == 2)) {
gotoAndStop (3);
}
if (attack._currentframe == 22) {
gotoAndStop (2);
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 32
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 100;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 2051 MovieClip "watertop" in Frame 32
onClipEvent (load) {
this.swapDepths(809);
}
Instance of Symbol 2066 MovieClip in Frame 32
onClipEvent (load) {
this.swapDepths(803);
}
Instance of Symbol 2068 MovieClip in Frame 32
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 33
stop();
stopAllSounds();
someSound = new Sound();
someSound.attachSound("bossmusic", this);
someSound.start(0, 999999999999);
_root.bossdeadyaknow = false;
startlevel();
Instance of Symbol 1359 MovieClip "door" in Frame 33
onClipEvent (enterFrame) {
dontdissapear = 562;
if ((_root.bossdeadyaknow == true) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1680 MovieClip "spawner" in Frame 33
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
if (_root.char._y > 300) {
timer = timer + 1;
if (((timer > 2) && (_root.char._currentframe == 5)) && (_root.ground.hitTest(_root.char._x, _root.char._y + 10, true))) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.bloodspraystep, "newbloodspraystep" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newbloodspraystep" + _root.objectdepthcounter];
tempname._x = _root.char._x;
tempname._y = _root.char._y - 15;
timer = 0;
}
}
}
Instance of Symbol 893 MovieClip in Frame 33
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 3;
ammo = 30;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 893 MovieClip in Frame 33
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 7;
ammo = 8;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 2075 MovieClip "zombieguy" in Frame 33
onClipEvent (load) {
if (_name != "zombieguy") {
_x = (200 + random(100));
_y = -60;
dontdissapear = 9;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
chooseweapon = random(100);
if ((chooseweapon >= 0) and (chooseweapon <= 40)) {
type = 1;
}
if ((chooseweapon >= 41) and (chooseweapon <= 50)) {
type = 2;
}
if ((chooseweapon >= 51) and (chooseweapon <= 60)) {
type = 3;
}
if ((chooseweapon >= 61) and (chooseweapon <= 65)) {
type = 4;
}
if ((chooseweapon >= 66) and (chooseweapon <= 67)) {
type = 5;
}
if ((chooseweapon >= 68) and (chooseweapon <= 75)) {
type = 6;
}
if ((chooseweapon >= 76) and (chooseweapon <= 80)) {
type = 7;
}
if ((chooseweapon >= 81) and (chooseweapon <= 83)) {
type = 8;
}
if ((chooseweapon >= 84) and (chooseweapon <= 100)) {
type = 1;
}
gun.gotoAndStop(type);
speed = random(2) + 1;
range = 50 + random(150);
if (type == 3) {
range = 100;
}
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
}
}
onClipEvent (enterFrame) {
if (_name != "zombieguy") {
if (_root.menubg._visible == false) {
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
gotoAndStop (2);
attacked = false;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
}
if (((_currentframe == 1) and (health >= 0)) and (_y > 100)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 33
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 100;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 33
onClipEvent (load) {
collect = false;
grav = 0;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 5;
_root.range.uziammo = _root.range.uziammo + 5;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 5;
_root.range.rocketammo = _root.range.rocketammo + 3;
_root.range.energyammo = _root.range.energyammo + 3;
_root.range.sniperammo = _root.range.sniperammo + 3;
_root.range.grenadeammo = _root.range.grenadeammo + 3;
removeMovieClip(this);
}
}
}
Instance of Symbol 2135 MovieClip "seaboss" in Frame 33
onClipEvent (load) {
dontdissapear = 9;
timer = 0;
startthisshit = false;
_root.openeyes = true;
notdead = true;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
stand.stop();
stand.head.stop();
hello.stop();
attackone.stop();
attacktwo.stop();
head.stop();
stand.head.eyeone.stop();
stand.head.eyetwo.stop();
} else if (startthisshit == true) {
stand.play();
stand.head.play();
hello.play();
attackone.play();
attacktwo.play();
head.play();
if (_root.openeyes == false) {
stand.head.eyeone.play();
stand.head.eyetwo.play();
}
}
if (_root.menubg._visible == false) {
if (notdead == true) {
if ((_root.char._x > 240) and (startthisshit == false)) {
startthisshit = true;
hello.gotoAndPlay(2);
torso.gotoAndPlay(2);
}
if (((_currentframe == 2) and (stand.head.eyeone._currentframe == 1)) and (_root.openeyes == true)) {
stand.head.eyeone.gotoAndPlay(2);
stand.head.eyetwo.gotoAndPlay(2);
}
} else {
gotoAndStop (5);
_rotation = (_rotation-1);
_y = (_y + 5);
_root.torso = _root.torso + 5;
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 33
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 12;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2141 MovieClip "watertop" in Frame 33
onClipEvent (load) {
this.swapDepths(801);
}
Instance of Symbol 2142 MovieClip in Frame 33
onClipEvent (load) {
this.swapDepths(804);
}
Instance of Symbol 2143 MovieClip "bighealth" in Frame 33
onClipEvent (load) {
this.swapDepths(806);
health = 250;
maxhealth = 250;
_xscale = percent;
}
onClipEvent (enterFrame) {
percent = (health / maxhealth) * 100;
_xscale = percent;
if (health <= 0) {
health = 0;
_root.bossdeadyaknow = true;
_root.seaboss.notdead = false;
}
}
Instance of Symbol 2145 MovieClip in Frame 33
onClipEvent (load) {
this.swapDepths(807);
}
Instance of Symbol 2147 MovieClip in Frame 33
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 34
stop();
startlevel();
stopAllSounds();
someSound = new Sound();
someSound.attachSound("eeriepiano", this);
someSound.start(0, 999999999);
Instance of Symbol 2150 MovieClip "ground" in Frame 34
onClipEvent (load) {
this.swapDepths(810);
}
Instance of Symbol 1311 MovieClip "char" in Frame 34
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 1334535 /* 0x145D07 */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 560) and (_root.door._currentframe == 1)) {
_x = 560;
}
if (((_x > 360) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 34
onClipEvent (enterFrame) {
dontdissapear = 5622345 /* 0x55CA49 */;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 2156 MovieClip "watertop" in Frame 34
onClipEvent (load) {
this.swapDepths(809);
}
Instance of Symbol 2046 MovieClip "bloodspraystep" in Frame 34
onClipEvent (enterFrame) {
if (this._name != bloodspraystep) {
if (this._currentframe == 8) {
removeMovieClip(this);
}
}
}
Instance of Symbol 1680 MovieClip "spawner" in Frame 34
onClipEvent (load) {
timer = 0;
}
onClipEvent (enterFrame) {
timer = timer + 1;
if (((timer > 2) && (_root.char._currentframe == 5)) && (_root.ground.hitTest(_root.char._x, _root.char._y + 10, true))) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.bloodspraystep, "newbloodspraystep" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newbloodspraystep" + _root.objectdepthcounter];
tempname._x = _root.char._x;
tempname._y = _root.char._y - 15;
timer = 0;
}
}
Instance of Symbol 2158 MovieClip in Frame 34
onClipEvent (load) {
this.swapDepths(811);
}
Frame 35
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 35
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 1214;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 35
onClipEvent (enterFrame) {
dontdissapear = 562;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 35
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1532 MovieClip in Frame 35
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) and (_currentframe != 12)) and (_currentframe == 1)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 2168 MovieClip in Frame 35
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 36
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 36
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 356235 /* 0x056F8B */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 36
onClipEvent (enterFrame) {
dontdissapear = 56234;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1168 MovieClip in Frame 36
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 7;
speed = 1;
range = 2950 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 350;
}
onClipEvent (enterFrame) {
if (_currentframe != 4) {
if ((_y > 600) or (_y < -100)) {
gotoAndStop (4);
}
}
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 2175 MovieClip in Frame 36
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 37
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 37
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 2563;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 37
onClipEvent (enterFrame) {
dontdissapear = 12314;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1168 MovieClip in Frame 37
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 50 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 37
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 4;
speed = 1;
range = 250 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 37
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 3;
speed = 1;
range = 250 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 37
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1181 MovieClip in Frame 37
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
type = 6;
down = false;
gotoAndStop(type);
}
onClipEvent (enterFrame) {
if (((down == false) and _root.char.hit.hitTest(this)) and Key.isDown(69)) {
changeover = _root.melee._currentframe;
type = _currentframe;
_root.melee.gotoAndStop(type);
_root.changeweaponfunction();
gotoAndStop(changeover);
down = true;
firstswap = true;
}
if (!Key.isDown(69)) {
down = false;
}
}
Instance of Symbol 2181 MovieClip in Frame 37
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 38
stop();
startlevel();
_root.range.pistolammo = 5;
_root.startthecarnage = false;
Instance of Symbol 2201 MovieClip "ground" in Frame 38
onClipEvent (enterFrame) {
if ((((_root.onslaughtover <= 0) and (_root.fade._currentframe == 20)) and (_currentframe == 1)) and (_root.safernextscreen == 0)) {
gotoAndPlay (2);
}
}
Instance of Symbol 2225 MovieClip in Frame 38
onClipEvent (load) {
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
speed = 1;
health = 5;
scale = _xscale;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe == 1) {
_root.enemyhitbyweapons(this);
if (_root.char.hit.hitTest(this) or (health <= 0)) {
gotoAndStop (2);
}
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
X = _root.char._x - _x;
Y = _root.char._y - _y;
angle = Math.atan2(Y, X);
_x = (_x + (Math.cos(angle) * speed));
_y = (_y + (Math.sin(angle) * speed));
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 38
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 435676 /* 0x06A5DC */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.endlevel();
}
if (_x < 5) {
_x = 5;
}
if (_x > 540) {
_x = 540;
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2226 MovieClip in Frame 38
onClipEvent (load) {
timer = 0;
_root.onslaughtover = 50;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.startthecarnage == true) {
timer++;
if ((timer > 25) and (_root.onslaughtover > 0)) {
roll = random(2) + 1;
if (roll == 1) {
_root.onslaughtover = _root.onslaughtover - 1;
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
if (roll == 2) {
_root.onslaughtover = _root.onslaughtover - 1;
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
}
timer = 0;
}
}
}
}
Instance of Symbol 893 MovieClip in Frame 38
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 8;
ammo = 20;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 2227 MovieClip "headcrab" in Frame 38
onClipEvent (load) {
dontdissapear = 235;
if (_name == "headcrab") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "headcrab") {
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
deathtimer = 0;
roll = random(4) + 1;
if (roll == 1) {
_x = 92;
_y = 59;
}
if (roll == 2) {
_x = 411;
_y = 81;
}
if (roll == 3) {
_x = 479;
_y = 176;
}
if (roll == 4) {
_x = 465;
_y = 289;
}
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < 5) {
_x = 5;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 38
onClipEvent (load) {
dontdissapear = 23312;
collect = false;
grav = 0;
_root.totalammo = _root.totalammo + 1;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 5;
_root.range.uziammo = _root.range.uziammo + 5;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 5;
_root.range.rocketammo = _root.range.rocketammo + 3;
_root.range.energyammo = _root.range.energyammo + 3;
_root.range.sniperammo = _root.range.sniperammo + 3;
_root.range.grenadeammo = _root.range.grenadeammo + 3;
_root.totalammo = _root.totalammo - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 38
onClipEvent (load) {
dontdissapear = 225;
if (_name == "bat") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "bat") {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 1456 MovieClip in Frame 38
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("heartbeatsound", this);
someSound.start(0, 1);
}
_root.mainhpbar.health = _root.mainhpbar.health - 20;
this.swapDepths(9999);
removeMovieClip(this);
}
}
Instance of Symbol 2229 MovieClip in Frame 38
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 39
stop();
startlevel();
Instance of Symbol 904 MovieClip in Frame 39
onClipEvent (load) {
dontdissapear = 273;
if (_name == "bat") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "bat") {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 1513 MovieClip "turret" in Frame 39
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
_root.controlled = false;
key = false;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.controlled == true) {
_root.char._x = _x - 20;
_root.char._y = _y + 37;
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
angle = Math.atan2(Yd, Xd);
changer = int(((angle * 360) / (Math.PI*2)) + 180);
if (changer < 0) {
changer = changer + 180;
}
if (changer > 360) {
changer = changer - 360;
}
if (changer < 120) {
changer = 120;
}
if (changer > 210) {
changer = 210;
}
_rotation = changer;
}
if ((Key.isDown(69) and (key == false)) and (_root.controlled == false)) {
key = true;
if (_root.controlled == false) {
if (_root.char.hitTest(this)) {
_root.controlled = true;
_root.char._xscale = _root.char.scale;
if (_root.eee._visible == true) {
_root.eee._visible = false;
someSound = new Sound();
someSound.attachSound("YES", this);
someSound.start(0, 1);
}
_root.char.gotoAndStop(6);
}
}
}
if ((Key.isDown(69) and (key == false)) and (_root.controlled == true)) {
key = true;
_root.controlled = false;
_root.char.gotoAndStop(3);
_root.char._x = _x - 25;
_root.shooting = false;
_root.changeweaponfunction();
}
if (!Key.isDown(69)) {
key = false;
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 39
onClipEvent (enterFrame) {
dontdissapear = 56234;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 39
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 42343576 /* 0x2861C98 */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 904 MovieClip "bat" in Frame 39
onClipEvent (load) {
dontdissapear = 225;
if (_name == "bat") {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
if (_name != "bat") {
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
_x = 600;
_y = (random(400) - 100);
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 2226 MovieClip in Frame 39
onClipEvent (load) {
timer = 0;
maxbats = 100;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
timer++;
if ((timer > 4) and (maxbats > 0)) {
maxbats = maxbats - 1;
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
timer = 0;
}
}
}
Instance of Symbol 2240 MovieClip in Frame 39
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 40
stop();
startlevel();
Instance of Symbol 1362 MovieClip in Frame 40
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 40
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 40
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 40
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 40
onClipEvent (load) {
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 40
onClipEvent (enterFrame) {
dontdissapear = 2432352112124;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 40
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 1123;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1672 MovieClip in Frame 40
onClipEvent (load) {
speed = 2 + random(3);
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
stop();
} else if (_currentframe != 1) {
play();
}
if (_root.menubg._visible == false) {
if (_x < 5) {
_x = 5;
}
if (_x > 545) {
_x = 545;
}
if (_root.char.hit.hitTest(hit2)) {
_root.mainhpbar.health = _root.mainhpbar.health + 1;
}
if (_currentframe == 1) {
timerchange++;
if (_root.char.hit.hitTest(hit)) {
gotoAndPlay (2);
}
if ((_root.char._x < _x) and (timerchange > 10)) {
moving = true;
timerchange = 0;
}
if ((_root.char._x > _x) and (timerchange > 10)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
}
if (moving == true) {
_x = (_x - speed);
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 40
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 1;
speed = 1;
range = 650 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 40
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 2;
speed = 1;
range = 550 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1168 MovieClip in Frame 40
onClipEvent (load) {
dontdissapear = 9;
bob = _root.enemydepthcounter;
swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
type = 6;
speed = 1;
range = 650 + random(50);
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
gun.gotoAndStop(type);
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
okfight = false;
vision = _x - 300;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (health != 5) {
okfight = true;
}
_root.enemyhitbyweapons(this);
if ((_root.char._x > vision) and (okfight == false)) {
okfight = true;
gotoAndPlay (2);
}
if (okfight == true) {
if (_currentframe != 4) {
gun.gotoAndStop(type);
walking.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
_root.enemyhitbyweapons(this);
}
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = random(3) + 2;
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if (health <= 0) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1672 MovieClip in Frame 40
onClipEvent (load) {
speed = 2 + random(3);
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
stop();
} else if (_currentframe != 1) {
play();
}
if (_root.menubg._visible == false) {
if (_x < 5) {
_x = 5;
}
if (_x > 545) {
_x = 545;
}
if (_root.char.hit.hitTest(hit2)) {
_root.mainhpbar.health = _root.mainhpbar.health + 1;
}
if (_currentframe == 1) {
timerchange++;
if (_root.char.hit.hitTest(hit)) {
gotoAndPlay (2);
}
if ((_root.char._x < _x) and (timerchange > 10)) {
moving = true;
timerchange = 0;
}
if ((_root.char._x > _x) and (timerchange > 10)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
}
if (moving == true) {
_x = (_x - speed);
}
}
}
}
Instance of Symbol 1672 MovieClip in Frame 40
onClipEvent (load) {
speed = 2 + random(3);
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == true) {
stop();
} else if (_currentframe != 1) {
play();
}
if (_root.menubg._visible == false) {
if (_x < 5) {
_x = 5;
}
if (_x > 545) {
_x = 545;
}
if (_root.char.hit.hitTest(hit2)) {
_root.mainhpbar.health = _root.mainhpbar.health + 1;
}
if (_currentframe == 1) {
timerchange++;
if (_root.char.hit.hitTest(hit)) {
gotoAndPlay (2);
}
if ((_root.char._x < _x) and (timerchange > 10)) {
moving = true;
timerchange = 0;
}
if ((_root.char._x > _x) and (timerchange > 10)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
}
if (moving == true) {
_x = (_x - speed);
}
}
}
}
Instance of Symbol 2253 MovieClip in Frame 40
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 41
stop();
startlevel();
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 41
onClipEvent (enterFrame) {
dontdissapear = 56234;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 41
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 4124526 /* 0x3EEF6E */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1362 MovieClip in Frame 41
onClipEvent (load) {
dontdissapear = 234;
mything = false;
bob = _root.enemydepthcounter;
this.swapDepths(bob);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
deathtimer = 0;
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
drewsdice = drewsdice + (Math.random() * 3);
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
_root.enemyhitbyweapons(this);
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
if (_x < 0) {
_x = 0;
moving = true;
}
if (_x > 550) {
_x = 550;
moving = false;
}
}
}
Instance of Symbol 1532 MovieClip in Frame 41
onClipEvent (load) {
if (_root.checkpoint == _root._currentframe) {
gotoAndStop (12);
}
}
onClipEvent (enterFrame) {
if ((_root.char.hitTest(this) and (_currentframe != 12)) and (_currentframe == 1)) {
_root.checkpointrange = _root.range._currentframe;
_root.checkpointmelee = _root.melee._currentframe;
_root.checkpoint = _root._currentframe;
if (_root.range._currentframe == 1) {
_root.checkpointammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
_root.checkpointammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
_root.checkpointammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
_root.checkpointammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
_root.checkpointammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
_root.checkpointammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
_root.checkpointammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
_root.checkpointammo = _root.range.grenadeammo;
}
gotoAndPlay (2);
}
}
Instance of Symbol 2258 MovieClip in Frame 41
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 42
stop();
startlevel();
stopAllSounds();
someSound = new Sound();
someSound.attachSound("bossmusic", this);
someSound.start(0, 99999999);
Instance of Symbol 2416 MovieClip "finalboss" in Frame 42
onClipEvent (load) {
lasorcount = 0;
shootable = false;
shoottimer = 0;
}
onClipEvent (enterFrame) {
if (_currentframe != 4) {
if (_root.menubg._visible == true) {
stand.insidea.stop();
stand.insideb.stop();
mouthopen.insidea.stop();
mouthopen.insideb.stop();
eyeshoot.insideb.stop();
stand.stop();
mouthopen.stop();
eyeshoot.stop();
death.stop();
} else {
eyeshoot.insideb.play();
stand.insidea.play();
stand.insideb.play();
mouthopen.insidea.play();
mouthopen.insideb.play();
stand.play();
mouthopen.play();
eyeshoot.play();
death.play();
}
if (_root.menubg._visible == false) {
if (_currentframe != 4) {
if (_currentframe == 3) {
shoottimer++;
}
if (((eyeshoot._currentframe > 1) && (eyeshoot._currentframe < 80)) && (shoottimer > 7)) {
_root.enemydepthcounter++;
_root.lasor.duplicateMovieClip("lasor" + _root.enemydepthcounter, _root.enemydepthcounter, {_x:(eyeshoot.topeye._x + _x) + 18, _y:(eyeshoot.topeye._y + _y) + 14});
shoottimer = 0;
}
}
}
}
}
Instance of Symbol 1311 MovieClip "char" in Frame 42
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 41245262344;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2422 MovieClip "lasor" in Frame 42
onClipEvent (load) {
if (_name != "lasor") {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("lasershot", this);
someSound.start(0, 1);
}
adjside = _root.char._x - this._x;
oppside = -1 * (_root.char._y - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this._rotation = -1 * angle;
alive = true;
speed = 12;
rot = this._rotation - 90;
timer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "lasor") {
timer++;
if (_root.char.hit.hitTest(_x, _y, true)) {
_root.mainhpbar.health = _root.mainhpbar.health + 5;
removeMovieClip(this);
}
if (_root.ground.hitTest(_x, _y, true) and (timer > 20)) {
removeMovieClip(this);
}
this._y = this._y + (speed * Math.cos((Math.PI/180) * rot));
this._x = this._x - (speed * Math.sin((Math.PI/180) * rot));
}
}
}
Instance of Symbol 2423 MovieClip "headcrab" in Frame 42
onClipEvent (load) {
if (_name != "headcrab") {
_x = 378;
_y = 240;
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
mything = false;
i = 0;
health = 1;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
gravity = 0;
timer = random(35);
gotoAndStop (2);
attacked = 10;
speed = 2;
attacked = false;
timerchange = 0;
dietimer = 0;
deathtimer = 0;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "headcrab") {
if (_currentframe == 4) {
dietimer++;
if (dietimer > 60) {
removeMovieClip(this);
}
}
if (_root.ground.hitTest(_x - 10, _y, true) && (moving)) {
this._x = this._x + speed;
}
if (_root.ground.hitTest(_x + 10, _y, true) && (!moving)) {
this._x = this._x - speed;
}
if ((_root.ground.hitTest(_x + 12, _y, true) && (this._currentframe < 3)) && (!moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 12, _y, true) && (this._currentframe < 3)) && (moving)) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
this._y = this._y + 30;
}
if ((_root.char.hit.hitTest(this) and (_currentframe == 3)) and (_currentframe != 4)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
gotoAndStop (4);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
speed = 2;
gotoAndStop (2);
attacked = false;
}
if ((((((_root.char._x - _x) > -40) and ((_root.char._x - _x) < 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked)) or (((((_root.char._x - _x) < 40) and ((_root.char._x - _x) > 0)) and _root.ground.hitTest(_x, _y + 3, true)) && (!attacked))) {
if (_currentframe != 4) {
_y = (_y - 4);
speed = 4 + random(2);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
}
if ((_currentframe != 4) and (_root.menubg._visible == false)) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
timerchange++;
if (((_root.char._x < _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = true;
timerchange = 0;
}
if (((_root.char._x > _x) and (timerchange > 10)) and _root.ground.hitTest(_x, _y + 3, true)) {
moving = false;
timerchange = 0;
}
if (moving == false) {
_x = (_x + speed);
_xscale = scale;
}
if (moving == true) {
_x = (_x - speed);
_xscale = (-scale);
}
if (_x < -15) {
_x = -15;
moving = true;
}
if (_x > 565) {
_x = 565;
moving = false;
}
}
percent = (health / maxhealth) * 100;
hpbar._xscale = percent;
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
}
if (health <= 0) {
gotoAndStop (4);
}
if (_currentframe == 4) {
deathtimer++;
if (deathtimer > 60) {
removeMovieClip(this);
}
}
}
}
}
Instance of Symbol 2424 MovieClip "bat" in Frame 42
onClipEvent (load) {
if (_name != "bat") {
_x = 378;
_y = 240;
dead = false;
speeder = Math.random() * 3;
speed = 2 + speeder;
changer = Math.random() * 30;
timer = 0;
teleporttimer = 0;
health = 1;
}
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_name != "bat") {
if (!dead) {
_root.charhitbyweapons(this);
_root.enemyhitbyweapons(this);
if (health <= 0) {
dead = true;
gotoAndStop (4);
}
adjside = _root.char._x - this._x;
oppside = -1 * ((_root.char._y - 20) - this._y);
angle = Math.atan2(oppside, adjside);
angle = Math.round((angle / Math.PI) * 180);
this.aimer._rotation = (-1 * angle) + changer;
}
if (!dead) {
this._y = this._y + (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
this._x = this._x - (speed * Math.sin(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (_root.char.hit.hitTest(_x, _y, true) and (_currentframe != 4)) {
this.gotoAndStop(4);
_root.mainhpbar.health = _root.mainhpbar.health + 1;
dead = true;
}
if (_root.batblocker.hitTest(this._x, this._y + 20, true)) {
this._y = this._y - (speed * Math.cos(((Math.PI/180) * this.aimer._rotation) - 90));
}
if (dead) {
timer++;
}
if (timer > 20) {
_root.batboss.batcurrent = _root.batboss.batcurrent - 1;
removeMovieClip(this);
}
}
}
}
Instance of Symbol 2425 MovieClip "zombieguy" in Frame 42
onClipEvent (load) {
if (_name != "zombieguy") {
_x = 378;
_y = 240;
dontdissapear = 9;
bob = _root.objectdepthcounter;
swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
i = 0;
health = 5;
timer = 0;
scale = -_xscale;
percent = 0;
maxhealth = health;
chooseweapon = random(100);
if ((chooseweapon >= 0) and (chooseweapon <= 40)) {
type = 1;
}
if ((chooseweapon >= 41) and (chooseweapon <= 50)) {
type = 2;
}
if ((chooseweapon >= 51) and (chooseweapon <= 60)) {
type = 3;
}
if ((chooseweapon >= 61) and (chooseweapon <= 65)) {
type = 4;
}
if ((chooseweapon >= 66) and (chooseweapon <= 67)) {
type = 5;
}
if ((chooseweapon >= 68) and (chooseweapon <= 75)) {
type = 6;
}
if ((chooseweapon >= 76) and (chooseweapon <= 80)) {
type = 7;
}
if ((chooseweapon >= 81) and (chooseweapon <= 83)) {
type = 8;
}
if ((chooseweapon >= 84) and (chooseweapon <= 100)) {
type = 1;
}
gun.gotoAndStop(type);
speed = random(2) + 1;
range = 50 + random(150);
if (type == 3) {
range = 100;
}
fall = false;
xknock = Math.random() * 10;
yknock = Math.random() * 20;
fallinggrav = 0;
dontchange = false;
gotoAndStop (1);
gravity = 0;
moving = true;
}
}
onClipEvent (enterFrame) {
if (_name != "zombieguy") {
if (_root.menubg._visible == false) {
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
if (_currentframe != 4) {
_root.enemyhitbyweapons(this);
gun.gotoAndStop(type);
walk.gun2.gotoAndStop(type);
gun3.gotoAndStop(type);
if ((moving == false) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((moving == true) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x - 20, _y, true) && (moving)) and (_currentframe != 1)) {
_x = (_x + speed);
}
if ((_root.ground.hitTest(_x + 20, _y, true) && (!moving)) and (_currentframe != 1)) {
_x = (_x - speed);
}
if ((_root.ground.hitTest(_x + 22, _y, true) && (_currentframe < 3)) && (!moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if ((_root.ground.hitTest(_x - 25, _y, true) && (_currentframe < 3)) && (moving)) {
_y = (_y - 4);
gotoAndStop (3);
gravity = gravity - (8 + random(6));
attacked = true;
}
if (_root.ground.hitTest(_x, _y - 15, true)) {
_y = (_y + 30);
}
if (((attacked == true) and _root.ground.hitTest(_x, _y + 3, true)) and (_currentframe != 4)) {
gotoAndStop (2);
attacked = false;
}
}
if (_currentframe != 4) {
gravity++;
_y = (_y + gravity);
while (_root.ground.hitTest(_x, _y, true)) {
_y = (_y-1);
gravity = 0;
}
}
while ((_currentframe == 4) && (_root.ground.hitTest(_x, _y, true))) {
_y = (_y-1);
fallinggrav = 0;
}
if ((_currentframe == 4) && (!_root.ground.hitTest(_x, _y, true))) {
fallinggrav = fallinggrav + 0.5;
_y = (_y + fallinggrav);
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x + 13, _y - 5, true))) {
_x = (_x - (xknock + 1));
}
if ((_currentframe == 4) && (_root.ground.hitTest(_x - 13, _y - 5, true))) {
_x = (_x + (xknock + 1));
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale > 1)) {
_x = (_x + xknock);
xknock = xknock - 0.5;
}
if (((_currentframe == 4) && (xknock > 0)) && (_xscale < 1)) {
_x = (_x - xknock);
xknock = xknock - 0.5;
}
if ((((_currentframe == 4) && (xknock < 2)) && (!fall)) && (_root.ground.hitTest(_x, _y, true))) {
death.gotoAndPlay(8);
fall = true;
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale > 1)) {
_x = (_x + 1);
}
if ((((_currentframe == 4) && (fall)) && (death._currentframe < 24)) && (_xscale < 1)) {
_x = (_x - 1);
}
if ((_currentframe == 1) or (_currentframe == 2)) {
if (health <= 0) {
gotoAndStop (4);
}
if (dontchange == false) {
if (_root.char._x < _x) {
_xscale = (-scale);
moving = true;
}
if (_root.char._x > _x) {
_xscale = scale;
moving = false;
}
if ((health <= 0) and (_currentframe != 4)) {
gotoAndStop (4);
}
}
if ((_currentframe == 1) and (health >= 0)) {
_root.enemyshootingweapons(this);
}
if ((((_root.char._x - _x) > (-range)) and ((_root.char._x - _x) < 0)) or (((_root.char._x - _x) < range) and ((_root.char._x - _x) > 0))) {
if (_currentframe != 4) {
gotoAndStop (1);
}
if (gun._currentframe != 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 30;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
if (gun._currentframe == 8) {
Xd = _root.char._x - (_x + gun._x);
if (_xscale < 0) {
Xd = -Xd;
}
Yd = (_root.char._y - (_y + gun._y)) - 430;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
}
} else if (_currentframe != 4) {
gun.anim.gotoAndStop(1);
gotoAndStop (2);
if (_root.char._x > _x) {
_x = (_x + speed);
}
if (_root.char._x < _x) {
_x = (_x - speed);
}
}
}
}
}
}
Instance of Symbol 1823 MovieClip "ammo" in Frame 42
onClipEvent (load) {
dontdissapear = 23312;
collect = false;
grav = 0;
_root.totalammo = _root.totalammo + 1;
}
onClipEvent (enterFrame) {
if (_name != "ammo") {
if (_root.ground.hitTest(this._x, this._y + 2, true)) {
this._y = this._y - 1;
grav = 0;
}
if (!_root.ground.hitTest(this._x, this._y + 2, true)) {
grav++;
this._y = this._y + grav;
}
if (_root.char.hit.hitTest(this)) {
_root.range.pistolammo = _root.range.pistolammo + 5;
_root.range.uziammo = _root.range.uziammo + 5;
_root.range.shotgunammo = _root.range.shotgunammo + 3;
_root.range.stargategunammo = _root.range.stargategunammo + 25;
_root.range.rocketammo = _root.range.rocketammo + 3;
_root.range.energyammo = _root.range.energyammo + 3;
_root.range.sniperammo = _root.range.sniperammo + 3;
_root.range.grenadeammo = _root.range.grenadeammo + 3;
_root.totalammo = _root.totalammo - 1;
removeMovieClip(this);
}
}
}
Instance of Symbol 893 MovieClip in Frame 42
onClipEvent (load) {
dontdissapear = 233434 /* 0x038FDA */;
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 4;
ammo = 250;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 893 MovieClip in Frame 42
onClipEvent (load) {
dontdissapear = 233499 /* 0x03901B */;
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
firstswap = false;
type = 8;
ammo = 5;
holdingammo = ammo;
down = false;
gotoAndStop(type);
gunsorting = function () {
if (_currentframe == 1) {
_root.range.pistolammo = holdingammo;
}
if (_currentframe == 2) {
_root.range.uziammo = holdingammo;
}
if (_currentframe == 3) {
_root.range.shotgunammo = holdingammo;
}
if (_currentframe == 4) {
_root.range.stargategunammo = holdingammo;
}
if (_currentframe == 5) {
_root.range.rocketammo = holdingammo;
}
if (_currentframe == 6) {
_root.range.energyammo = holdingammo;
}
if (_currentframe == 7) {
_root.range.sniperammo = holdingammo;
}
if (_currentframe == 8) {
_root.range.grenadeammo = holdingammo;
}
};
}
onClipEvent (enterFrame) {
if (_alpha < 50) {
_alpha = (_alpha+1);
}
ss = holdingammo;
if (((_root.char.hit.hitTest(this) and Key.isDown(69)) and (down == false)) and (_alpha == 50)) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("pickupsound", this);
someSound.start(0, 1);
}
type = _currentframe;
if (type == _root.range._currentframe) {
if (type == 1) {
if (firstswap == false) {
_root.range.pistolammo = _root.range.pistolammo + ammo;
} else {
_root.range.pistolammo = _root.range.pistolammo + holdingammo;
}
}
if (type == 2) {
if (firstswap == false) {
_root.range.uziammo = _root.range.uziammo + ammo;
} else {
_root.range.uziammo = _root.range.uziammo + holdingammo;
}
}
if (type == 3) {
if (firstswap == false) {
_root.range.shotgunammo = _root.range.shotgunammo + ammo;
} else {
_root.range.shotgunammo = _root.range.shotgunammo + holdingammo;
}
}
if (type == 4) {
if (firstswap == false) {
_root.range.stargategunammo = _root.range.stargategunammo + ammo;
} else {
_root.range.stargategunammo = _root.range.stargategunammo + holdingammo;
}
}
if (type == 5) {
if (firstswap == false) {
_root.range.rocketammo = _root.range.rocketammo + ammo;
} else {
_root.range.rocketammo = _root.range.rocketammo + holdingammo;
}
}
if (type == 6) {
if (firstswap == false) {
_root.range.energyammo = _root.range.energyammo + ammo;
} else {
_root.range.energyammo = _root.range.energyammo + holdingammo;
}
}
if (type == 7) {
if (firstswap == false) {
_root.range.sniperammo = _root.range.sniperammo + ammo;
} else {
_root.range.sniperammo = _root.range.sniperammo + holdingammo;
}
}
if (type == 8) {
if (firstswap == false) {
_root.range.grenadeammo = _root.range.grenadeammo + ammo;
} else {
_root.range.grenadeammo = _root.range.grenadeammo + holdingammo;
}
}
removeMovieClip(this);
}
if (_root.range._currentframe == 1) {
gunsorting();
holdingammo = _root.range.pistolammo;
}
if (_root.range._currentframe == 2) {
gunsorting();
holdingammo = _root.range.uziammo;
}
if (_root.range._currentframe == 3) {
gunsorting();
holdingammo = _root.range.shotgunammo;
}
if (_root.range._currentframe == 4) {
gunsorting();
holdingammo = _root.range.stargategunammo;
}
if (_root.range._currentframe == 5) {
gunsorting();
holdingammo = _root.range.rocketammo;
}
if (_root.range._currentframe == 6) {
gunsorting();
holdingammo = _root.range.energyammo;
}
if (_root.range._currentframe == 7) {
gunsorting();
holdingammo = _root.range.sniperammo;
}
if (_root.range._currentframe == 8) {
gunsorting();
holdingammo = _root.range.grenadeammo;
}
changeover = _root.range._currentframe;
type = _currentframe;
_root.range.gotoAndStop(type);
_root.changeweaponfunction();
_alpha = 0;
gotoAndStop(changeover);
down = true;
firstswap = true;
} else if (!Key.isDown(32)) {
down = false;
}
}
Instance of Symbol 2426 MovieClip "finalhealth" in Frame 42
onClipEvent (load) {
health = 450;
maxhealth = 450;
_xscale = percent;
}
onClipEvent (enterFrame) {
percent = (health / maxhealth) * 100;
_xscale = percent;
if (health <= 0) {
health = 0;
if (_root.finalboss._currentframe != 4) {
_root.finalboss.gotoAndStop(4);
}
}
}
Instance of Symbol 2428 MovieClip in Frame 42
onClipEvent (load) {
bob = _root.objectdepthcounter;
this.swapDepths(bob);
_root.objectdepthcounter = _root.objectdepthcounter + 1;
}
Frame 43
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 43
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 195533355 /* 0xBA79A2B */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 1359 MovieClip "door" in Frame 43
onClipEvent (enterFrame) {
dontdissapear = 56234;
if ((_root.safernextscreen == 0) and (_root.fade._currentframe == 20)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Frame 44
stop();
startlevel();
Instance of Symbol 1311 MovieClip "char" in Frame 44
onClipEvent (load) {
function checkrightwall() {
if ((_root.ground.hitTest(_x + (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x + (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x + (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x - speed);
}
}
function checkleftwall() {
if ((_root.ground.hitTest(_x - (hit2._width / 2), _y - (hit2._height / 2), true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - 30, true)) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) {
_x = (_x + speed);
}
}
dontdissapear = 195555 /* 0x02FBE3 */;
this.swapDepths(800);
grav = 0;
speed = 5;
jumpHeight = 12;
scale = _xscale;
yp = 0;
grounded = false;
timer = 0;
timer2 = 0;
changexscale = false;
}
onClipEvent (enterFrame) {
if ((_root.menubg._visible == false) and (_currentframe != 6)) {
grav++;
_y = (_y + grav);
while (_root.ground.hitTest(_x + (hit2._width / 2), _y, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y, true)) {
_y = (_y-1);
grav = 0;
if (_currentframe != 7) {
if (((_currentframe == 5) or (((_currentframe == 2) and (!Key.isDown(65))) and (!Key.isDown(68)))) or (((_currentframe == 1) and (!Key.isDown(65))) and (!Key.isDown(68)))) {
gotoAndStop (3);
}
}
}
if (_currentframe != 7) {
if (_root.cursor._x < _x) {
_xscale = (-scale);
}
if (_root.cursor._x > _x) {
_xscale = scale;
}
if (Key.isDown(68)) {
_x = (_x + speed);
checkrightwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x < this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (Key.isDown(65)) {
_x = (_x - speed);
checkleftwall();
if (_root.ground.hitTest(_x, _y + 3, true)) {
if (_root.cursor._x > this._x) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
} else if (_root.ground.hitTest(!this)) {
this.gotoAndStop(3);
}
} else if (((_root.ground.hitTest(_x, _y + 3, true) and (!Key.isDown(38))) or (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) or (_root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true) and (!Key.isDown(38)))) {
this.gotoAndStop(3);
}
if (Key.isDown(87) or Key.isDown(32)) {
if (_root.ground.hitTest(_x + (hit2._width / 2), _y + 1, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y + 1, true)) {
grav = -jumpHeight;
_y = (_y - 4);
this.gotoAndStop(5);
}
}
if ((_root.ground.hitTest(_x + (hit2._width / 2), (_y - hit2._height) - 20, true) or _root.ground.hitTest(_x - (hit2._width / 2), _y - hit2._height, true)) or _root.ground.hitTest(_x, (_y - hit2._height) - 20, true)) {
grav = 6;
_y = (_y + 5);
}
if (_y > 500) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
grav = 0;
_y = 92;
_x = 50;
}
if (_x < 5) {
_x = 5;
}
if ((_x > 540) and (_root.door._currentframe == 1)) {
_x = 540;
}
if (((_x > 555) and (_root.door._currentframe == 2)) and _root.door.hitTest(this)) {
_root.endlevel();
}
if ((Key.isDown(83) and (!Key.isDown(65))) and (!Key.isDown(68))) {
gotoAndStop (4);
}
_root.charhitbyweapons(this);
Xd = _root.char._xmouse - gun._x;
Yd = _root.char._ymouse - gun._y;
radAngle = Math.atan2(Yd, Xd);
gun._rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
if (_currentframe == 4) {
gun._y = -25;
} else {
gun._y = -32.3;
}
}
}
}
Instance of Symbol 2441 MovieClip "elev" in Frame 44
onClipEvent (load) {
this.elevatornumbers = 100;
timer = 0;
}
onClipEvent (enterFrame) {
if (this._currentframe > 1) {
timer++;
}
if (timer > 3) {
this.elevatornumbers = this.elevatornumbers - 1;
timer = 0;
}
if ((_currentframe > 50) and (_root.fade2._currentframe == 1)) {
trace(_root.fade2._currentframe);
_root.fade2.gotoAndPlay(2);
}
}
Instance of Symbol 2449 MovieClip in Frame 44
onClipEvent (load) {
hit = false;
}
onClipEvent (enterFrame) {
if (_root.char.hitTest(this) && (!hit)) {
_root.ground.gotoAndPlay(2);
_root.elev.gotoAndPlay(2);
hit = true;
}
}
Instance of Symbol 2450 MovieClip "fade2" in Frame 44
onClipEvent (load) {
bob = 10000;
this.swapDepths(bob);
}
Frame 45
stop();
_root.gamecomplete = true;
Mouse.show();
Symbol 53 MovieClip Frame 4
stop();
removeMovieClip(_parent);
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 54 MovieClip Frame 3
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("explode1", this);
someSound.start(0, 1);
}
Symbol 67 MovieClip Frame 40
stop();
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 2
stop();
Symbol 70 MovieClip Frame 8
stop();
Symbol 71 MovieClip Frame 4
stop();
removeMovieClip(_parent);
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 3
stop();
Symbol 78 MovieClip Frame 1
stop();
Instance of Symbol 77 MovieClip in Symbol 78 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent._parent.spinholder < 0) {
_rotation = (_rotation + 10);
} else {
_rotation = (_rotation - 10);
}
}
Symbol 78 MovieClip Frame 2
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
stop();
Symbol 81 MovieClip Frame 3
stop();
Symbol 82 MovieClip [bullet] Frame 1
stop();
Symbol 82 MovieClip [bullet] Frame 2
stop();
Symbol 82 MovieClip [bullet] Frame 3
stop();
Symbol 82 MovieClip [bullet] Frame 4
stop();
Symbol 82 MovieClip [bullet] Frame 5
stop();
Symbol 82 MovieClip [bullet] Frame 6
stop();
Symbol 82 MovieClip [bullet] Frame 7
stop();
Symbol 82 MovieClip [bullet] Frame 8
stop();
Symbol 82 MovieClip [bullet] Frame 20
stop();
_root.turretframelabel = _currentframe;
Symbol 93 MovieClip Frame 1
stop();
Symbol 102 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 109 MovieClip Frame 105
_root.gotoAndStop(4);
Symbol 119 Button
on (press) {
if (_root.handfade._currentframe == 66) {
stopAllSounds();
_root.nextFrame();
}
}
on (rollOver) {
if (_root.handfade._currentframe == 66) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
}
Symbol 122 Button
on (press) {
if (_root.handfade._currentframe == 66) {
_root.beencheckpoint = true;
_root.gotoAndStop(_root.checkpoint);
}
}
on (rollOver) {
if (_root.handfade._currentframe == 66) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
}
Symbol 131 MovieClip Frame 66
stop();
Symbol 132 MovieClip Frame 20
stop();
Symbol 137 MovieClip Frame 1
if (_root.sound == true) {
buzz = new Sound(this);
buzz.attachSound("buzzsound", this);
buzz.start(0, 1);
}
Symbol 137 MovieClip Frame 5
if (_root.sound == true) {
buzz.stop();
}
Symbol 137 MovieClip Frame 93
if (_root.sound == true) {
buzz = new Sound(this);
buzz.attachSound("buzzsound", this);
buzz.start(0, 1);
}
Symbol 137 MovieClip Frame 95
if (_root.sound == true) {
buzz.stop();
}
Symbol 137 MovieClip Frame 172
if (_root.sound == true) {
buzz = new Sound(this);
buzz.attachSound("buzzsound", this);
buzz.start(0, 1);
}
Symbol 137 MovieClip Frame 180
if (_root.sound == true) {
buzz.stop();
}
Symbol 144 Button
on (press) {
_root.nextFrame();
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 147 Button
on (press) {
_root.gotoAndStop(6);
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 152 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 155 Button
on (release) {
getURL ("http://twitter.com/armorgames", "blank");
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 160 Button
on (press) {
getURL ("http://www.eggysgames.com", "blank");
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 163 Button
on (press) {
_root.gotoAndStop(7);
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 167 Button
on (press) {
getURL ("http://www.facebook.com/facebook?ref=pf#/apps/application.php?id=59461593144", "blank");
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 170 Button
on (press) {
if (_root.checkpoint != 11) {
_root.beencheckpoint = true;
_root.gotoAndStop(_root.checkpoint);
}
}
on (rollOver) {
if (_root.checkpoint != 11) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
}
Symbol 174 Button
on (press) {
stopAllSounds();
_root.gotoAndStop(11);
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 175 Button
on (press) {
_root.deleteallbacktomenu();
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 268 Button
on (press) {
stopAllSounds();
_root.gotoAndStop(10);
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 303 Button
on (press) {
stopAllSounds();
_root.gotoAndStop(9);
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 315 Button
on (press) {
stopAllSounds();
someSound = new Sound();
someSound.attachSound("intromusic", this);
someSound.start(0, 1);
_root.deleteallbacktomenu();
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 318 Button
on (press) {
stopAllSounds();
if (_root.playsurvival == true) {
_root.gotoAndStop(10);
} else if (_root.playsurvival == false) {
_root.gotoAndStop(9);
}
}
on (rollOver) {
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("rolloversound", this);
someSound.start(0, 1);
}
}
Symbol 364 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 2
play();
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 2
play();
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 2
play();
Symbol 399 MovieClip Frame 1
stop();
Symbol 399 MovieClip Frame 2
play();
Symbol 427 MovieClip Frame 1
stop();
Instance of Symbol 405 MovieClip in Symbol 427 MovieClip Frame 1
onClipEvent (load) {
bob = random(4) + 1;
gotoAndStop(bob);
}
Symbol 427 MovieClip Frame 2
play();
Symbol 450 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 2
play();
Symbol 459 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 2
play();
Symbol 474 MovieClip Frame 20
stop();
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 2
play();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 2
play();
Symbol 503 MovieClip Frame 1
stop();
Symbol 503 MovieClip Frame 2
play();
Symbol 517 MovieClip Frame 1
stop();
Symbol 517 MovieClip Frame 2
play();
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 2
play();
Symbol 540 MovieClip Frame 1
stop();
Symbol 540 MovieClip Frame 2
play();
Symbol 578 MovieClip Frame 1
stop();
Symbol 578 MovieClip Frame 2
play();
Symbol 578 MovieClip Frame 14
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("hammersound", this);
someSound.start(0, 1);
}
Symbol 579 MovieClip Frame 1
stop();
Symbol 579 MovieClip Frame 2
stop();
Symbol 579 MovieClip Frame 3
stop();
Symbol 579 MovieClip Frame 4
stop();
Symbol 579 MovieClip Frame 5
stop();
Symbol 579 MovieClip Frame 6
stop();
Symbol 579 MovieClip Frame 7
stop();
Symbol 579 MovieClip Frame 8
stop();
Symbol 579 MovieClip Frame 9
stop();
Symbol 579 MovieClip Frame 10
stop();
Symbol 579 MovieClip Frame 11
stop();
Symbol 579 MovieClip Frame 12
stop();
Symbol 579 MovieClip Frame 13
stop();
Symbol 579 MovieClip Frame 14
stop();
Symbol 631 MovieClip Frame 9
stop();
Symbol 694 MovieClip Frame 40
_root.deleteallsurvival();
Symbol 695 MovieClip Frame 1
stop();
Symbol 695 MovieClip Frame 2
stop();
Symbol 695 MovieClip Frame 3
stop();
Symbol 695 MovieClip Frame 4
stop();
Symbol 695 MovieClip Frame 5
stop();
Symbol 695 MovieClip Frame 6
stop();
Symbol 695 MovieClip Frame 7
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("deathsound", this);
someSound.start(0, 1);
}
Symbol 728 MovieClip Frame 9
stop();
Symbol 734 MovieClip Frame 1
stop();
Symbol 781 MovieClip Frame 9
stop();
_parent.removeMovieClip(this);
Symbol 782 MovieClip Frame 1
stop();
Symbol 782 MovieClip Frame 4
stop();
Symbol 782 MovieClip Frame 5
stop();
Symbol 784 MovieClip Frame 1
stop();
Symbol 784 MovieClip Frame 4
stop();
Symbol 784 MovieClip Frame 5
stop();
Symbol 788 MovieClip Frame 1
stop();
Symbol 788 MovieClip Frame 4
stop();
Symbol 788 MovieClip Frame 5
stop();
Symbol 790 MovieClip Frame 1
stop();
Symbol 790 MovieClip Frame 4
stop();
Symbol 790 MovieClip Frame 5
stop();
Symbol 791 MovieClip Frame 1
stop();
Symbol 791 MovieClip Frame 2
stop();
Symbol 791 MovieClip Frame 3
stop();
Symbol 791 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.screenflicker = _root.screenflicker - 1;
_root.amount = _root.amount - 1;
Instance of Symbol 782 MovieClip "one" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 791 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 793 MovieClip Frame 30
_root.survivaltimer = _root.survivaltimer + 1;
Symbol 812 MovieClip Frame 1
stop();
Symbol 812 MovieClip Frame 2
play();
Symbol 822 MovieClip Frame 1
stop();
Symbol 822 MovieClip Frame 2
stop();
Symbol 822 MovieClip Frame 3
stop();
Symbol 822 MovieClip Frame 4
stop();
Symbol 822 MovieClip Frame 5
stop();
Symbol 822 MovieClip Frame 6
stop();
Symbol 822 MovieClip Frame 7
stop();
Symbol 822 MovieClip Frame 8
stop();
Symbol 837 MovieClip Frame 1
stop();
Symbol 837 MovieClip Frame 2
stop();
Symbol 837 MovieClip Frame 3
stop();
Symbol 837 MovieClip Frame 4
stop();
Symbol 837 MovieClip Frame 5
stop();
Symbol 837 MovieClip Frame 6
stop();
Symbol 839 MovieClip Frame 1
stop();
Symbol 840 MovieClip Frame 1
stop();
Symbol 840 MovieClip Frame 2
stop();
Symbol 845 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 100
stop();
Instance of Symbol 851 MovieClip "slidericon" in Symbol 852 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 853 MovieClip Frame 1
this.ratio = 0;
_root.volume = 100;
dragger.onPress = function () {
this.startDrag(true, 0, 0, line._width, 0);
this.onEnterFrame = function () {
ratio = Math.round((this._x * 100) / line._width);
_root.volume = ratio;
};
};
dragger.onRelease = (dragger.onReleaseOutside = stopDrag);
Instance of Symbol 852 MovieClip "dragger" in Symbol 853 MovieClip Frame 1
on (rollOver) {
slidericon._visible = true;
}
on (rollOut) {
slidericon._visible = false;
}
Symbol 861 MovieClip Frame 1
stop();
Symbol 861 MovieClip Frame 2
stop();
Symbol 861 MovieClip Frame 3
stop();
Symbol 865 Button
on (press) {
qualitychanger.gotoAndStop(1);
_quality = "low";
}
Symbol 869 Button
on (press) {
qualitychanger.gotoAndStop(2);
_quality = "medium";
}
Symbol 873 Button
on (press) {
qualitychanger.gotoAndStop(3);
_quality = "High";
}
Instance of Symbol 853 MovieClip "mySlider" in Symbol 874 MovieClip Frame 1
onClipEvent (load) {
_root.mySound = new Sound();
}
onClipEvent (enterFrame) {
_root.mySound.setVolume(_root.volume);
}
Instance of Symbol 861 MovieClip "qualitychanger" in Symbol 874 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (3);
}
Symbol 879 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 2
stop();
Symbol 879 MovieClip Frame 3
stop();
Symbol 879 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.screenflicker = _root.screenflicker - 1;
Instance of Symbol 782 MovieClip "one" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 879 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 893 MovieClip Frame 1
stop();
Symbol 893 MovieClip Frame 2
stop();
Symbol 893 MovieClip Frame 3
stop();
Symbol 893 MovieClip Frame 4
stop();
Symbol 893 MovieClip Frame 5
stop();
Symbol 893 MovieClip Frame 6
stop();
Symbol 893 MovieClip Frame 7
stop();
Symbol 893 MovieClip Frame 8
stop();
Symbol 903 MovieClip Frame 1
stop();
Symbol 903 MovieClip Frame 5
stop();
Symbol 904 MovieClip Frame 1
stop();
Symbol 904 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("batsound", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
if ((((((((_root.range.pistolammo < 8) or (_root.range.uziammo < 30)) or (_root.range.shotgunammo < 8)) or (_root.range.stargategunammo < 40)) or (_root.range.rocketammo < 2)) or (_root.range.energyammo < 10)) or (_root.range.grenadeammo < 5)) or (_root.range.sniperammo < 10)) {
if (_root.totalammo < 3) {
rollammo = random(3) + 1;
if (rollammo == 2) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
}
}
Instance of Symbol 903 MovieClip in Symbol 904 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 2;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
yes = true;
}
onClipEvent (enterFrame) {
if (yes) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 932 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 1
stop();
Symbol 938 MovieClip Frame 2
play();
Symbol 946 MovieClip Frame 1
stop();
Symbol 946 MovieClip Frame 2
play();
Symbol 946 MovieClip Frame 7
Symbol 951 MovieClip Frame 1
stop();
Symbol 951 MovieClip Frame 2
play();
Symbol 962 MovieClip Frame 1
stop();
Symbol 962 MovieClip Frame 2
play();
Symbol 974 MovieClip Frame 1
stop();
Symbol 974 MovieClip Frame 2
play();
Symbol 979 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 2
play();
Symbol 986 MovieClip Frame 1
stop();
Symbol 986 MovieClip Frame 2
play();
Symbol 986 MovieClip Frame 37
letsroll = random(2);
if (letsroll == 1) {
gotoAndStop (1);
}
Symbol 986 MovieClip Frame 39
letsroll = random(2);
if (letsroll == 1) {
gotoAndStop (1);
}
Symbol 987 MovieClip Frame 1
stop();
Symbol 987 MovieClip Frame 2
stop();
Symbol 987 MovieClip Frame 3
stop();
Symbol 987 MovieClip Frame 4
stop();
Symbol 987 MovieClip Frame 5
stop();
Symbol 987 MovieClip Frame 6
stop();
Symbol 987 MovieClip Frame 7
stop();
Symbol 987 MovieClip Frame 8
stop();
Symbol 1091 MovieClip Frame 11
stop();
Symbol 1167 MovieClip Frame 7
stop();
Symbol 1167 MovieClip Frame 31
stop();
stop();
Symbol 1168 MovieClip Frame 1
stop();
Symbol 1168 MovieClip Frame 2
stop();
Symbol 1168 MovieClip Frame 3
stop();
Symbol 1168 MovieClip Frame 4
stop();
_root.nextscreen = _root.nextscreen - 1;
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("zombiedeathsound", this);
someSound.start(0, 1);
}
Symbol 1176 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 2
stop();
Symbol 1181 MovieClip Frame 3
stop();
Symbol 1181 MovieClip Frame 4
stop();
Symbol 1181 MovieClip Frame 5
stop();
Symbol 1181 MovieClip Frame 6
stop();
Symbol 1242 MovieClip Frame 45
_root.deleteallsurvival2();
Symbol 1243 MovieClip Frame 1
stop();
Symbol 1243 MovieClip Frame 2
stop();
Symbol 1243 MovieClip Frame 3
stop();
Symbol 1243 MovieClip Frame 4
stop();
Symbol 1243 MovieClip Frame 5
stop();
Symbol 1243 MovieClip Frame 6
stop();
Symbol 1243 MovieClip Frame 7
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("deathsound", this);
someSound.start(0, 1);
}
Symbol 1310 MovieClip Frame 55
stop();
_root.deleteallanddie();
Symbol 1311 MovieClip Frame 1
stop();
Symbol 1311 MovieClip Frame 2
stop();
Symbol 1311 MovieClip Frame 3
stop();
Symbol 1311 MovieClip Frame 4
stop();
Symbol 1311 MovieClip Frame 5
stop();
Symbol 1311 MovieClip Frame 6
stop();
Symbol 1311 MovieClip Frame 7
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("deathsound", this);
someSound.start(0, 1);
}
Symbol 1335 MovieClip Frame 1
stop();
Symbol 1335 MovieClip Frame 2
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("glasssound", this);
someSound.start(0, 1);
}
Symbol 1335 MovieClip Frame 8
stop();
Symbol 1359 MovieClip Frame 1
stop();
Symbol 1359 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("doorsound", this);
someSound.start(0, 1);
}
Symbol 1362 MovieClip Frame 1
stop();
Symbol 1362 MovieClip Frame 2
stop();
Symbol 1362 MovieClip Frame 3
stop();
Symbol 1362 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
Instance of Symbol 782 MovieClip "one" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 1362 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 1370 MovieClip Frame 1
stop();
Symbol 1370 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("doorsound", this);
someSound.start(0, 1);
}
Symbol 1371 MovieClip Frame 1
stop();
Symbol 1371 MovieClip Frame 2
stop();
Symbol 1428 MovieClip Frame 15
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("throwupsound", this);
someSound.start(0, 1);
}
Symbol 1428 MovieClip Frame 16
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
Symbol 1428 MovieClip Frame 19
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
Symbol 1428 MovieClip Frame 22
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
Symbol 1428 MovieClip Frame 28
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
Symbol 1428 MovieClip Frame 31
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter = _root.enemydepthcounter + 1;
Symbol 1428 MovieClip Frame 37
stop();
Symbol 1448 MovieClip Frame 1
stop();
Symbol 1448 MovieClip Frame 87
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("staticsound", this);
someSound.start(0, 1);
}
Symbol 1448 MovieClip Frame 92
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("staticsound", this);
someSound.start(0, 1);
}
Symbol 1448 MovieClip Frame 142
stop();
Symbol 1449 MovieClip Frame 1
stop();
Symbol 1449 MovieClip Frame 2
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("hangingsound", this);
someSound.start(0, 1);
}
Symbol 1449 MovieClip Frame 30
stop();
Instance of Symbol 1448 MovieClip "hangmanroomone" in Symbol 1449 MovieClip Frame 30
onClipEvent (enterFrame) {
if ((_root.screenflicker == 0) and (_currentframe == 1)) {
gotoAndPlay (2);
}
}
Symbol 1493 MovieClip Frame 7
if (_root.safernextscreen < 11) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newheadcrab" + _root.enemydepthcounter];
tempname._x = _parent._x - 6;
tempname._y = _parent._y + 1;
}
Symbol 1493 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 1505 MovieClip Frame 14
stop();
Symbol 1506 MovieClip Frame 1
stop();
Symbol 1506 MovieClip Frame 2
stop();
Symbol 1506 MovieClip Frame 3
stop();
_root.nextscreen = _root.nextscreen - 1;
Symbol 1513 MovieClip Frame 1
stop();
Symbol 1515 MovieClip Frame 1
stop();
Symbol 1515 MovieClip Frame 2
stop();
Symbol 1515 MovieClip Frame 3
stop();
Symbol 1515 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
Instance of Symbol 782 MovieClip "one" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 1515 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 1532 MovieClip Frame 1
stop();
Symbol 1532 MovieClip Frame 12
stop();
Symbol 1547 MovieClip Frame 1
stop();
Symbol 1547 MovieClip Frame 7
stop();
Symbol 1556 MovieClip Frame 1
stop();
Symbol 1556 MovieClip Frame 7
stop();
Symbol 1565 MovieClip Frame 1
stop();
Symbol 1565 MovieClip Frame 7
stop();
Symbol 1572 MovieClip Frame 1
stop();
Symbol 1572 MovieClip Frame 7
stop();
Symbol 1578 MovieClip Frame 1
stop();
Symbol 1578 MovieClip Frame 6
stop();
Symbol 1633 MovieClip Frame 10
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newheadcrab" + _root.enemydepthcounter];
tempname._x = _parent._x - 6;
tempname._y = _parent._y + 1;
Symbol 1633 MovieClip Frame 14
stop();
Symbol 1634 MovieClip Frame 1
stop();
Symbol 1634 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("eggsacksound", this);
someSound.start(0, 1);
}
Symbol 1672 MovieClip Frame 1
stop();
Symbol 1672 MovieClip Frame 2
play();
Symbol 1741 MovieClip Frame 1
stop();
Symbol 1741 MovieClip Frame 2
stop();
Symbol 1757 MovieClip Frame 87
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("staticsound", this);
someSound.start(0, 1);
}
Symbol 1757 MovieClip Frame 90
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("staticsound", this);
someSound.start(0, 1);
}
Symbol 1757 MovieClip Frame 142
stop();
Symbol 1758 MovieClip Frame 1
stop();
Symbol 1758 MovieClip Frame 30
stop();
Symbol 1761 MovieClip Frame 1
stop();
Symbol 1761 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("doorsound", this);
someSound.start(0, 1);
}
Instance of Symbol 1785 MovieClip in Symbol 1793 MovieClip Frame 5
onClipEvent (enterFrame) {
if ((_root.batboss.batcurrent < _root.batboss.batmax) && (_root.batboss._xscale > 0)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = _parent._parent._x - 40;
tempname._y = _parent._parent._y - 50;
_root.batboss.batcurrent = _root.batboss.batcurrent + 1;
_root.batboss.teleporttimer = _root.batboss.teleporttimer + 1;
}
if ((_root.batboss.batcurrent < _root.batboss.batmax) && (_root.batboss._xscale < 0)) {
_root.enemydepthcounter = _root.enemydepthcounter + 1;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
tempname = _root["newbat" + _root.enemydepthcounter];
tempname._x = _parent._parent._x + 40;
tempname._y = _parent._parent._y - 50;
_root.batboss.batcurrent = _root.batboss.batcurrent + 1;
_root.batboss.teleporttimer = _root.batboss.teleporttimer + 1;
}
}
Symbol 1820 MovieClip Frame 33
stop();
Symbol 1821 MovieClip Frame 1
stop();
Symbol 1821 MovieClip Frame 2
stop();
Symbol 1821 MovieClip Frame 3
stop();
Symbol 1821 MovieClip Frame 4
stop();
Symbol 1824 MovieClip Frame 1
stop();
Symbol 1824 MovieClip Frame 5
stop();
Symbol 1825 MovieClip Frame 1
stop();
Symbol 1825 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("batsound", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
if ((((((((_root.range.pistolammo < 8) or (_root.range.uziammo < 30)) or (_root.range.shotgunammo < 8)) or (_root.range.stargategunammo < 60)) or (_root.range.rocketammo < 2)) or (_root.range.energyammo < 10)) or (_root.range.grenadeammo < 5)) or (_root.range.sniperammo < 10)) {
if (_root.totalammo < 4) {
rollammo = random(2) + 1;
if (rollammo == 2) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
}
}
Instance of Symbol 1824 MovieClip "death" in Symbol 1825 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 2;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
yes = true;
}
onClipEvent (enterFrame) {
if (yes) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 1836 MovieClip Frame 1
stop();
Symbol 1836 MovieClip Frame 2
stop();
Symbol 1836 MovieClip Frame 3
stop();
Symbol 1836 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
if ((((((((_root.range.pistolammo < 8) or (_root.range.uziammo < 30)) or (_root.range.shotgunammo < 8)) or (_root.range.stargategunammo < 40)) or (_root.range.rocketammo < 2)) or (_root.range.energyammo < 10)) or (_root.range.grenadeammo < 5)) or (_root.range.sniperammo < 10)) {
if (_root.totalammo < 4) {
rollammo = random(2) + 1;
if (rollammo == 2) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
}
}
Instance of Symbol 782 MovieClip "one" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 1836 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 1858 MovieClip Frame 1
stop();
Symbol 1858 MovieClip Frame 2
stop();
Symbol 1866 MovieClip Frame 1
stop();
Symbol 1866 MovieClip Frame 2
stop();
Instance of Symbol 1866 MovieClip "elevator" in Symbol 1867 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 1877 MovieClip in Symbol 1878 MovieClip Frame 23
onClipEvent (enterFrame) {
if (_root.char.hit.hitTest(this)) {
if (_root.mainhpbar.health <= 79) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char._y = 92;
_root.char._x = 10;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char.gotoAndStop(7);
}
}
}
Instance of Symbol 1877 MovieClip in Symbol 1878 MovieClip Frame 37
onClipEvent (enterFrame) {
if (_root.char.hit.hitTest(this)) {
if (_root.mainhpbar.health <= 79) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char._y = 92;
_root.char._x = 10;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char.gotoAndStop(7);
}
}
}
Symbol 1885 MovieClip Frame 1
stop();
Symbol 1885 MovieClip Frame 2
stop();
Instance of Symbol 1877 MovieClip in Symbol 1889 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.char.hit.hitTest(this)) {
if (_root.mainhpbar.health <= 79) {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char._y = 92;
_root.char._x = 10;
} else {
_root.mainhpbar.health = _root.mainhpbar.health + 20;
_root.char.gotoAndStop(7);
}
}
}
Instance of Symbol 1885 MovieClip "conveyone" in Symbol 1900 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitTest(_root.char._x, _root.char._y + 2, true) && (!_root.ground.hammerone.hitTest(_root.char._x, _root.char._y + 2, true))) && (this._currentframe == 2)) {
_root.char._x = _root.char._x + 1;
}
}
Instance of Symbol 1885 MovieClip "conveytwo" in Symbol 1900 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.char._x, _root.char._y + 10, true) && (this._currentframe == 2)) {
_root.char._x = _root.char._x - 1;
}
}
Symbol 1903 MovieClip Frame 1
stop();
Symbol 1994 MovieClip Frame 1
stop();
Symbol 1994 MovieClip Frame 41
stop();
Instance of Symbol 2014 MovieClip in Symbol 2025 MovieClip Frame 12
onClipEvent (enterFrame) {
if (_root.char.hitTest(this)) {
_root.mainhpbar.health = _root.mainhpbar.health + 2;
}
}
Symbol 2025 MovieClip Frame 22
stop();
Symbol 2031 MovieClip Frame 12
stop();
Symbol 2035 MovieClip Frame 1
stop();
Symbol 2035 MovieClip Frame 2
stop();
Symbol 2035 MovieClip Frame 3
stop();
Symbol 2035 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("deadslime", this);
someSound.start(0, 1);
}
Symbol 2035 MovieClip Frame 5
stop();
Symbol 2038 MovieClip Frame 1
stop();
Symbol 2038 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("doorsound", this);
someSound.start(0, 1);
}
Symbol 2072 MovieClip Frame 1
stop();
Symbol 2072 MovieClip Frame 59
stop();
Symbol 2075 MovieClip Frame 1
stop();
Symbol 2075 MovieClip Frame 2
stop();
Symbol 2075 MovieClip Frame 3
stop();
Symbol 2075 MovieClip Frame 4
stop();
_root.nextscreen = _root.nextscreen - 1;
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("zombiedeathsound", this);
someSound.start(0, 1);
}
if (_root.totalammo < 3) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
Symbol 2096 MovieClip Frame 1
stop();
Symbol 2096 MovieClip Frame 2
play();
Symbol 2096 MovieClip Frame 3
play();
Symbol 2096 MovieClip Frame 56
stop();
Instance of Symbol 2096 MovieClip "eyeone" in Symbol 2099 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_currentframe != 1) and (_currentframe != 56)) {
if (_root.menubg._visible == false) {
i = 500;
while (i < 520) {
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 5) {
_root.bighealth.health = _root.bighealth.health - 10;
}
}
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 8) {
if (tempname._x > _x) {
dontchange = true;
_xscale = scale;
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._x < _x) {
dontchange = true;
_xscale = (-scale);
_root.bighealth.health = _root.bighealth.health - 10;
}
}
}
if (_root["newbullet" + i].hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 1)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 3) {
_root.bighealth.health = _root.bighealth.health - 2;
}
if (tempname._currentframe == 5) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 8) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 6) {
_root.bighealth.health = _root.bighealth.health - 3;
}
if (tempname._currentframe == 7) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 20) {
_root.bighealth.health = _root.bighealth.health - 20;
} else {
_root.bighealth.health = _root.bighealth.health - 1;
}
if ((tempname._currentframe != 6) and (_currentframe != 4)) {
tempname.inside.gotoAndStop(3);
break;
}
}
i++;
}
}
}
}
Instance of Symbol 2096 MovieClip "eyetwo" in Symbol 2099 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_currentframe != 1) and (_currentframe != 56)) {
if (_root.menubg._visible == false) {
i = 500;
while (i < 520) {
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 5) {
_root.bighealth.health = _root.bighealth.health - 10;
}
}
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 8) {
if (tempname._x > _x) {
dontchange = true;
_xscale = scale;
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._x < _x) {
dontchange = true;
_xscale = (-scale);
_root.bighealth.health = _root.bighealth.health - 10;
}
}
}
if (_root["newbullet" + i].hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 1)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 3) {
_root.bighealth.health = _root.bighealth.health - 2;
}
if (tempname._currentframe == 5) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 8) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 6) {
_root.bighealth.health = _root.bighealth.health - 3;
}
if (tempname._currentframe == 7) {
_root.bighealth.health = _root.bighealth.health - 10;
}
if (tempname._currentframe == 20) {
_root.bighealth.health = _root.bighealth.health - 20;
} else {
_root.bighealth.health = _root.bighealth.health - 1;
}
if ((tempname._currentframe != 6) and (_currentframe != 4)) {
tempname.inside.gotoAndStop(3);
break;
}
}
i++;
}
}
}
}
Symbol 2111 MovieClip Frame 1
stop();
Symbol 2111 MovieClip Frame 61
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("growl1", this);
someSound.start(0, 1);
}
Symbol 2111 MovieClip Frame 121
stop();
_root.seaboss.gotoAndStop(2);
Symbol 2119 MovieClip Frame 1
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("growl1", this);
someSound.start(0, 1);
}
Symbol 2119 MovieClip Frame 101
roll = random(2) + 1;
if (roll == 1) {
_root.seaboss.gotoAndStop(3);
}
if (roll == 2) {
_root.seaboss.gotoAndStop(4);
}
Symbol 2128 MovieClip Frame 20
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("slam", this);
someSound.start(0, 1);
}
Instance of Symbol 2125 MovieClip in Symbol 2128 MovieClip Frame 20
onClipEvent (enterFrame) {
if (_root.char.hit.hitTest(this)) {
_root.mainhpbar.health = _root.mainhpbar.health + 5;
}
}
Symbol 2128 MovieClip Frame 44
_root.openeyes = true;
_root.seaboss.gotoAndStop(2);
Symbol 2133 MovieClip Frame 54
_root.enemydepthcounter++;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter++;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
Symbol 2133 MovieClip Frame 100
_root.openeyes = true;
_root.seaboss.gotoAndStop(2);
Symbol 2135 MovieClip Frame 1
stop();
oncetext = true;
Symbol 2135 MovieClip Frame 2
stop();
if (oncetext == true) {
oncetext = false;
texter.gotoAndPlay(2);
}
Symbol 2135 MovieClip Frame 3
stop();
Symbol 2135 MovieClip Frame 4
stop();
Symbol 2135 MovieClip Frame 5
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("growl2", this);
someSound.start(0, 1);
}
Symbol 2201 MovieClip Frame 1
stop();
Instance of Symbol 2183 MovieClip "throb" in Symbol 2201 MovieClip Frame 1
onClipEvent (enterFrame) {
}
Symbol 2201 MovieClip Frame 15
stop();
Instance of Symbol 2210 MovieClip in Symbol 2211 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
play();
} else {
stop();
}
}
Symbol 2224 MovieClip Frame 22
stop();
_root.startthecarnage = true;
removeMovieClip(_parent);
Symbol 2225 MovieClip Frame 1
stop();
Instance of Symbol 2211 MovieClip "walk" in Symbol 2225 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
play();
} else {
stop();
}
}
Symbol 2225 MovieClip Frame 2
stop();
Symbol 2227 MovieClip Frame 1
stop();
Symbol 2227 MovieClip Frame 2
stop();
Symbol 2227 MovieClip Frame 3
stop();
Symbol 2227 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
_root.nextscreen = _root.nextscreen - 1;
if ((((((((_root.range.pistolammo < 8) or (_root.range.uziammo < 30)) or (_root.range.shotgunammo < 8)) or (_root.range.stargategunammo < 40)) or (_root.range.rocketammo < 2)) or (_root.range.energyammo < 10)) or (_root.range.grenadeammo < 5)) or (_root.range.sniperammo < 10)) {
if (_root.totalammo < 4) {
rollammo = random(2) + 1;
if (rollammo == 2) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
}
}
Instance of Symbol 782 MovieClip "one" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 2227 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 2286 MovieClip Frame 1
stop();
Symbol 2286 MovieClip Frame 2
stop();
Symbol 2325 MovieClip Frame 91
roll = random(2) + 1;
if (roll == 1) {
_root.finalboss.gotoAndStop(2);
}
if (roll == 2) {
_root.finalboss.gotoAndStop(3);
}
Symbol 2344 MovieClip Frame 18
_root.enemydepthcounter++;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter++;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter++;
duplicateMovieClip (_root.zombieguy, "newzombieguy" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter++;
duplicateMovieClip (_root.bat, "newbat" + _root.enemydepthcounter, _root.enemydepthcounter);
_root.enemydepthcounter++;
duplicateMovieClip (_root.headcrab, "newheadcrab" + _root.enemydepthcounter, _root.enemydepthcounter);
Symbol 2344 MovieClip Frame 70
_root.finalboss.gotoAndStop(1);
Instance of Symbol 2286 MovieClip "topeye" in Symbol 2357 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(2);
}
Symbol 2357 MovieClip Frame 65
_root.finalboss.gotoAndStop(1);
Symbol 2415 MovieClip Frame 44
stop();
Instance of Symbol 2410 MovieClip in Symbol 2415 MovieClip Frame 44
onClipEvent (enterFrame) {
if (_root.char.hit.hitTest(this)) {
_root.endlevel();
}
}
Symbol 2416 MovieClip Frame 1
stop();
Instance of Symbol 2328 MovieClip in Symbol 2416 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
i = 500;
while (i < 520) {
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 5) {
_root.finalhealth.health = _root.finalhealth.health - 10;
}
}
if (_root["newbullet" + i].inside.bang.hit.hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 2)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 8) {
if (tempname._x > _x) {
dontchange = true;
_xscale = scale;
_root.finalhealth.health = _root.finalhealth.health - 10;
}
if (tempname._x < _x) {
dontchange = true;
_xscale = (-scale);
_root.finalhealth.health = _root.finalhealth.health - 10;
}
}
}
if (_root["newbullet" + i].hitTest(hit) and (_root["newbullet" + i].inside._currentframe == 1)) {
tempname = _root["newbullet" + i];
if (tempname._currentframe == 3) {
_root.finalhealth.health = _root.finalhealth.health - 2;
}
if (tempname._currentframe == 5) {
_root.finalhealth.health = _root.finalhealth.health - 10;
}
if (tempname._currentframe == 8) {
_root.finalhealth.health = _root.finalhealth.health - 10;
}
if (tempname._currentframe == 6) {
_root.finalhealth.health = _root.finalhealth.health - 3;
}
if (tempname._currentframe == 7) {
_root.finalhealth.health = _root.finalhealth.health - 10;
}
if (tempname._currentframe == 20) {
_root.finalhealth.health = _root.finalhealth.health - 20;
} else {
_root.finalhealth.health = _root.finalhealth.health - 1;
}
if ((tempname._currentframe != 6) and (_currentframe != 4)) {
tempname.inside.gotoAndStop(3);
break;
}
}
i++;
}
}
}
Symbol 2416 MovieClip Frame 2
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("throwupsound", this);
someSound.start(0, 1);
}
Symbol 2416 MovieClip Frame 3
stop();
Symbol 2416 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("biggrowl", this);
someSound.start(0, 1);
}
Symbol 2421 MovieClip Frame 57
stop();
Symbol 2423 MovieClip Frame 1
stop();
Symbol 2423 MovieClip Frame 2
stop();
Symbol 2423 MovieClip Frame 3
stop();
Symbol 2423 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("squish", this);
someSound.start(0, 1);
}
Instance of Symbol 782 MovieClip "one" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 784 MovieClip "two" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 788 MovieClip "three" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "four" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "five" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Instance of Symbol 790 MovieClip "six" in Symbol 2423 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 4;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
}
onClipEvent (enterFrame) {
if (_root.menubg._visible == false) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 2424 MovieClip Frame 1
stop();
Symbol 2424 MovieClip Frame 4
stop();
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("batsound", this);
someSound.start(0, 1);
}
Instance of Symbol 903 MovieClip in Symbol 2424 MovieClip Frame 4
onClipEvent (load) {
xpos = 0;
ypos = 0;
dying = false;
count = 2;
xnumincreaser = Math.random() * 14;
ynumincreaser = Math.random() * 14;
xspeed = (Math.random() * -14) + xnumincreaser;
yspeed = (Math.random() * -14) + ynumincreaser;
rotater = (Math.random() * 10) + xspeed;
yes = true;
}
onClipEvent (enterFrame) {
if (yes) {
if (_currentframe != 5) {
xpos = this._parent._x + this._x;
ypos = this._parent._y + this._y;
if ((count < 2) && (!dying)) {
this.gotoAndPlay(2);
dying = true;
}
this._rotation = this._rotation + rotater;
if (count > 0) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
}
yspeed = yspeed + 0.5;
if (_root.ground.hitTest(xpos + 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x - 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos - 12, ypos, true)) {
xspeed = -xspeed;
this._x = this._x + 18;
xspeed = xspeed - (xspeed / 3);
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos + 12, true)) {
if ((yspeed > 10) and (yspeed < 16)) {
_y = (_y + 6);
dying = true;
gotoAndStop (5);
} else if (yspeed > 16) {
_y = (_y + 2);
dying = true;
gotoAndStop (5);
}
yspeed = -yspeed;
this._y = this._y - 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
if (_root.ground.hitTest(xpos, ypos - 8, true)) {
yspeed = -yspeed;
this._y = this._y + 18;
yspeed = yspeed - (yspeed / 3);
count = count - 1;
this.splat.play();
}
}
}
}
Symbol 2425 MovieClip Frame 1
stop();
Symbol 2425 MovieClip Frame 2
stop();
Symbol 2425 MovieClip Frame 3
stop();
Symbol 2425 MovieClip Frame 4
stop();
_root.nextscreen = _root.nextscreen - 1;
if (_root.sound == true) {
someSound = new Sound();
someSound.attachSound("zombiedeathsound", this);
someSound.start(0, 1);
}
if (_root.totalammo < 3) {
_root.objectdepthcounter = _root.objectdepthcounter + 1;
duplicateMovieClip (_root.ammo, "newammo" + _root.objectdepthcounter, _root.objectdepthcounter);
tempname = _root["newammo" + _root.objectdepthcounter];
tempname._x = _x;
tempname._y = _y - 20;
}
Symbol 2441 MovieClip Frame 1
stop();
Symbol 2441 MovieClip Frame 75
stop();
Symbol 2447 MovieClip Frame 1
stop();
Symbol 2447 MovieClip Frame 72
stop();
Symbol 2450 MovieClip Frame 1
stop();
Symbol 2450 MovieClip Frame 21
stop();
_root.endgame();