Frame 1
stop();
Frame 7
stop();
Frame 12
function Area(areanum, levelnum) {
this.num = areanum;
this.name = ["Valles Marineris", "Olympus Mons", "Elysium Planitia", "Utopia Planitia", "Planum Boreum", "Colony"][areanum - 1];
this.level = new Level(levelnum);
}
function Level(num) {
this.num = num;
this.enemies = {};
this.movienum = 0;
statbar.reset();
statbar.levelbar.gotoAndStop("level" + num);
}
function Special(type) {
this.name = type;
if ((((type == "supershot") || (type == "sonic drill")) || (type == "supertreads")) || (type == "nukes")) {
this.level = 4;
this.max = 4;
statbar.special.gotoAndStop(type + "4");
} else if (type == "infinite ammo") {
this.level = 1;
this.max = 1;
statbar.special.gotoAndStop("infinite ammo");
} else {
this.level = 0;
this.max = 0;
statbar.special.gotoAndStop("none");
}
}
function newspecial(sptype) {
game.life.special = new Special(sptype);
}
function Life() {
this.mines = 3;
this.ammo = 3;
this.special = new Special("none");
}
function Game(startarea, startlevel) {
playon = false;
this.points = 0;
this.lives = 3;
this.life = new Life();
this.area = new Area(startarea, startlevel);
}
function endlife() {
if (changelives(-1)) {
game.life = new Life();
clearlevel();
gotoAndStop((("level " + game.area.num) + "-") + game.area.level.num);
} else {
gotoAndStop (1199);
}
}
function endlevel(dir) {
game.playon = false;
gotoAndPlay(((("level " + game.area.num) + "-") + game.area.level.num) + " end");
}
function changelives(num) {
if ((game.lives + num) >= 0) {
game.lives = Math.min(game.lives + num, 6);
statbar.liveslevel.gotoAndStop("life" + game.lives);
return(true);
}
game.lives = 0;
statbar.liveslevel.gotoAndStop("life0");
return(false);
}
function changemines(num) {
if (game.life.special.name != "infiniteon") {
if ((game.life.mines + num) >= 0) {
game.life.mines = Math.min(game.life.mines + num, 6);
statbar.minelevel.gotoAndStop("mine" + game.life.mines);
return(true);
}
game.life.mines = 0;
statbar.minelevel.gotoAndStop("mine0");
return(false);
}
return(true);
}
function changeammo(num) {
if (game.life.special.name != "infiniteon") {
if ((game.life.ammo + num) >= 0) {
game.life.ammo = Math.min(game.life.ammo + num, 6);
statbar.ammolevel.gotoAndStop("ammo" + game.life.ammo);
return(true);
}
game.life.ammo = 0;
statbar.ammolevel.gotoAndStop("ammo0");
return(false);
}
return(true);
}
function changepoints(num) {
game.points = game.points + num;
statbar.points = game.points;
}
function clearlevel() {
for (i in levelfloor) {
if (typeof(levelfloor[i]) == "movieclip") {
levelfloor[i].removeMovieClip();
}
}
for (k in leveltop) {
if (typeof(leveltop[k]) == "movieclip") {
leveltop[k].removeMovieClip();
}
}
}
function movieincr(num) {
game.area.level.movienum = game.area.level.movienum + num;
return(game.area.level.movienum);
}
function addenemy(name, mc) {
game.area.level.enemies[name] = mc;
}
function deleteenemy(name) {
delete game.area.level.enemies[name];
}
function getpos(x, y) {
return({x:Math.round((x - 25) / 50), y:Math.round((y - 25) / 50)});
}
function getdir(dir) {
return({up:{dx:0, dy:-1}, down:{dx:0, dy:1}, right:{dx:1, dy:0}, left:{dx:-1, dy:0}}[dir]);
}
function getdir2(rot) {
rot = ((180 >= rot) ? (((rot >= -180) ? (rot) : (360 + rot))) : (rot - 360));
var rot1 = (Math.round(rot / 90) * 90);
if (rot1 == 0) {
return({dx:0, dy:-1});
}
if (rot1 == 90) {
return({dx:1, dy:0});
}
if (rot1 == -90) {
return({dx:-1, dy:0});
}
return({dx:0, dy:1});
}
function getdirname(dx, dy) {
return(((dx == 0) ? (((0 < dy) ? "down" : "up")) : (((0 < dx) ? "right" : "left"))));
}
function getdirname2(rot) {
rot = ((180 >= rot) ? (((rot >= -180) ? (rot) : (360 + rot))) : (rot - 360));
var rot1 = (Math.round(rot / 90) * 90);
if (rot1 == 0) {
return(up);
}
if (rot1 == 90) {
return(right);
}
if (rot1 == -90) {
return(left);
}
return(down);
}
function getrot(dx, dy) {
return(((dx == 0) ? (((0 < dy) ? 180 : 0)) : (((0 < dx) ? 90 : -90))));
}
function checkpos(name, x, y, terrain, enemies) {
var bool = true;
if (((((x < 0) || (9 < x)) || (y < 0)) || (5 < y)) || (_root[(("grid" + x) + ",") + y] && (!terrain[_root[(("grid" + x) + ",") + y].type]))) {
bool = false;
} else if (!enemies) {
for (j in game/area/level:enemies) {
var mc = game.area.level.enemies[j];
if ((((mc.pos.x == x) && (mc.pos.y == y)) || (((mc.pos.x + mc.dir.dx) == x) && ((mc.pos.y + mc.dir.dy) == y))) && (mc._name != name)) {
bool = false;
break;
}
}
}
return(bool);
}
function newdir(name, dir, pos, terrain) {
if ((dir.dx == 0) && (dir.dy == 0)) {
if (0.5 < Math.random()) {
dir.dy = ((0.5 < Math.random()) ? 1 : -1);
dir.dx = 0;
} else {
dir.dx = ((0.5 < Math.random()) ? 1 : -1);
dir.dy = 0;
}
}
dirArr = {};
dirArr.forward = {dx:dir.dx, dy:dir.dy};
dirArr.back = {dx:-dir.dx, dy:-dir.dy};
dirArr.side1 = {dx:dir.dy, dy:dir.dx};
dirArr.side2 = {dx:-dir.dy, dy:-dir.dx};
dirArr.none = {dx:0, dy:0};
boolArr = {};
for (k in dirArr) {
var newpos = {x:pos.x + dirArr[k].dx, y:pos.y + dirArr[k].dy};
boolArr[k] = checkpos(name, newpos.x, newpos.y, terrain, false);
}
if (((!boolArr.side1) && (!boolArr.side2)) && (!boolArr.forward)) {
return(((!boolArr.back) ? (dirArr.none) : (dirArr.back)));
}
if ((!boolArr.forward) || ((0.75 < Math.random()) && (boolArr.side1 || (boolArr.side2)))) {
return((((boolArr.side2 && (0.5 < Math.random())) || (!boolArr.side1)) ? (dirArr.side2) : (dirArr.side1)));
}
return(dirArr.forward);
}
stop();
Special.prototype.fire = function () {
if (this.name == "infinite ammo") {
_root.changemines(6);
_root.changeammo(6);
this.name = "infiniteon";
_root.statbar.special.gotoAndPlay("infinite ammo");
} else if (this.name != "infiniteon") {
this.level--;
if (0 < this.level) {
_root.statbar.special.gotoAndStop(this.name + this.level);
} else {
this.name = "none";
this.max = 0;
_root.statbar.special.gotoAndStop("none");
}
}
};
Instance of Symbol 123 MovieClip in Frame 17
onClipEvent (keyDown) {
_parent.keypressed(Key.getCode());
}
Instance of Symbol 58 MovieClip [bonus] in Frame 40
onClipEvent (load) {
type = "ammo";
}
Instance of Symbol 57 MovieClip [bonus] in Frame 40
onClipEvent (load) {
type = "mines";
}
Instance of Symbol 56 MovieClip [bonus] in Frame 40
onClipEvent (load) {
type = "life";
}
Instance of Symbol 55 MovieClip [bonus] in Frame 46
onClipEvent (load) {
type = "supershot";
}
Instance of Symbol 54 MovieClip [bonus] in Frame 46
onClipEvent (load) {
type = "infinite ammo";
}
Instance of Symbol 53 MovieClip [bonus] in Frame 46
onClipEvent (load) {
type = "sonic drill";
}
Instance of Symbol 52 MovieClip [bonus] in Frame 46
onClipEvent (load) {
type = "supertreads";
}
Instance of Symbol 51 MovieClip [bonus] in Frame 46
onClipEvent (load) {
type = "nukes";
}
Instance of Symbol 123 MovieClip in Frame 65
onClipEvent (keyDown) {
_parent.keypressed(Key.getCode());
}
Frame 790
gotoAndStop (12);
Frame 791
game.area.level = new Level(1);
stop();
Instance of Symbol 301 MovieClip in Frame 791
onClipEvent (load) {
areanum = 1;
}
Frame 792
stop();
game.area.level = new Level(1);
Instance of Symbol 309 MovieClip in Frame 792
onClipEvent (load) {
dir = "right";
}
Frame 793
stop();
game.playon = true;
Instance of Symbol 383 MovieClip "enemy1" in Frame 793
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 384 MovieClip "enemy2" in Frame 793
onClipEvent (load) {
bonus = "supershot";
}
Instance of Symbol 386 MovieClip "probe" in Frame 793
onClipEvent (load) {
startdir = "right";
}
Frame 805
clearlevel();
gotoAndPlay (806);
Frame 806
stop();
game.area.level = new Level(2);
Instance of Symbol 309 MovieClip in Frame 806
onClipEvent (load) {
dir = "right";
}
Frame 807
stop();
game.playon = true;
Instance of Symbol 383 MovieClip "enemy1" in Frame 807
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 389 MovieClip "enemy2" in Frame 807
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 390 MovieClip "enemy3" in Frame 807
onClipEvent (load) {
bonus = "life";
}
Instance of Symbol 386 MovieClip "probe" in Frame 807
onClipEvent (load) {
startdir = "right";
}
Frame 821
clearlevel();
gotoAndStop (822);
Frame 822
stop();
game.area.level = new Level(3);
Instance of Symbol 309 MovieClip in Frame 822
onClipEvent (load) {
dir = "right";
}
Frame 823
stop();
game.playon = true;
Instance of Symbol 383 MovieClip "enemy3" in Frame 823
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 389 MovieClip "enemy2" in Frame 823
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 823
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 823
onClipEvent (load) {
startdir = "right";
}
Frame 837
clearlevel();
gotoAndStop (838);
Frame 838
stop();
game.area.level = new Level(4);
Instance of Symbol 309 MovieClip in Frame 838
onClipEvent (load) {
dir = "right";
}
Frame 839
stop();
game.playon = true;
Instance of Symbol 383 MovieClip "enemy1" in Frame 839
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 389 MovieClip "enemy3" in Frame 839
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 396 MovieClip "enemy2" in Frame 839
onClipEvent (load) {
bonus = "none";
}
Instance of Symbol 386 MovieClip "probe" in Frame 839
onClipEvent (load) {
startdir = "right";
}
Frame 853
clearlevel();
gotoAndStop (854);
Frame 854
stop();
game.area.level = new Level(5);
Instance of Symbol 397 MovieClip in Frame 854
onClipEvent (load) {
dir = "down";
}
Frame 855
stop();
game.playon = true;
Instance of Symbol 400 MovieClip "enemy2" in Frame 855
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 396 MovieClip "enemy1" in Frame 855
onClipEvent (load) {
bonus = "none";
}
Instance of Symbol 383 MovieClip "enemy3" in Frame 855
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 855
onClipEvent (load) {
startdir = "right";
}
Frame 869
gotoAndStop (870);
Frame 870
game.area = new Area(2, 1);
stop();
Instance of Symbol 401 MovieClip in Frame 870
onClipEvent (load) {
areanum = 2;
}
Frame 871
stop();
Instance of Symbol 309 MovieClip in Frame 871
onClipEvent (load) {
dir = "right";
}
Frame 872
stop();
game.playon = true;
Instance of Symbol 410 MovieClip "enemy2" in Frame 872
onClipEvent (load) {
bonus = "infinite ammo";
rotArr = new Array();
rotArr[0] = 180;
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 872
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 390 MovieClip "enemy4" in Frame 872
onClipEvent (load) {
bonus = "life";
}
Instance of Symbol 411 MovieClip "probe" in Frame 872
onClipEvent (load) {
startdir = "down";
}
Frame 884
clearlevel();
gotoAndPlay (885);
Frame 885
stop();
game.area.level = new Level(2);
Instance of Symbol 309 MovieClip in Frame 885
onClipEvent (load) {
dir = "right";
}
Frame 886
stop();
game.playon = true;
Instance of Symbol 413 MovieClip "enemy3" in Frame 886
onClipEvent (load) {
bonus = "none";
rotArr = new Array(90, 180, -90, 180);
}
Instance of Symbol 414 MovieClip "enemy4" in Frame 886
onClipEvent (load) {
bonus = "infinite ammo";
rotArr = new Array(-90, 0, 90, 0);
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 886
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 389 MovieClip "enemy2" in Frame 886
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 386 MovieClip "probe" in Frame 886
onClipEvent (load) {
startdir = "right";
}
Frame 900
clearlevel();
gotoAndStop (901);
Frame 901
stop();
game.area.level = new Level(3);
Instance of Symbol 309 MovieClip in Frame 901
onClipEvent (load) {
dir = "right";
}
Frame 902
stop();
game.playon = true;
Instance of Symbol 415 MovieClip "enemy2" in Frame 902
onClipEvent (load) {
bonus = "mines";
rotArr = new Array(0, -90);
}
Instance of Symbol 416 MovieClip "enemy3" in Frame 902
onClipEvent (load) {
bonus = "none";
rotArr = new Array(180, 90);
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 902
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 417 MovieClip "enemy4" in Frame 902
onClipEvent (load) {
bonus = "supershot";
}
Instance of Symbol 386 MovieClip "probe" in Frame 902
onClipEvent (load) {
startdir = "right";
}
Frame 916
clearlevel();
gotoAndStop (917);
Frame 917
stop();
game.area.level = new Level(4);
Instance of Symbol 309 MovieClip in Frame 917
onClipEvent (load) {
dir = "right";
}
Frame 918
stop();
game.playon = true;
Instance of Symbol 383 MovieClip "enemy1" in Frame 918
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 396 MovieClip "enemy4" in Frame 918
onClipEvent (load) {
bonus = "none";
}
Instance of Symbol 418 MovieClip "enemy2" in Frame 918
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(0, -90);
}
Instance of Symbol 419 MovieClip "enemy3" in Frame 918
onClipEvent (load) {
bonus = "none";
rotArr = new Array(0, 90);
}
Instance of Symbol 386 MovieClip "probe" in Frame 918
onClipEvent (load) {
startdir = "right";
}
Frame 932
clearlevel();
gotoAndStop (933);
Frame 933
stop();
game.area.level = new Level(5);
Instance of Symbol 309 MovieClip in Frame 933
onClipEvent (load) {
dir = "right";
}
Frame 934
stop();
game.playon = true;
Instance of Symbol 418 MovieClip "enemy4" in Frame 934
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(0, -90);
}
Instance of Symbol 420 MovieClip "enemy3" in Frame 934
onClipEvent (load) {
bonus = "infinite ammo";
rotArr = new Array(0, 90);
}
Instance of Symbol 416 MovieClip "enemy1" in Frame 934
onClipEvent (load) {
bonus = "none";
rotArr = new Array(180, 90);
}
Instance of Symbol 421 MovieClip "enemy2" in Frame 934
onClipEvent (load) {
bonus = "mines";
rotArr = new Array(180, -90);
}
Instance of Symbol 386 MovieClip "probe" in Frame 934
onClipEvent (load) {
startdir = "right";
}
Frame 947
gotoAndStop (948);
Frame 948
game.area = new Area(3, 1);
stop();
Instance of Symbol 422 MovieClip in Frame 948
onClipEvent (load) {
areanum = 3;
}
Frame 949
stop();
Instance of Symbol 309 MovieClip in Frame 949
onClipEvent (load) {
dir = "right";
}
Frame 950
stop();
game.playon = true;
Instance of Symbol 428 MovieClip "enemy1" in Frame 950
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 429 MovieClip "enemy2" in Frame 950
onClipEvent (load) {
bonus = "sonic drill";
}
Instance of Symbol 386 MovieClip "probe" in Frame 950
onClipEvent (load) {
startdir = "right";
}
Frame 962
clearlevel();
gotoAndPlay (963);
Frame 963
stop();
game.area.level = new Level(2);
Instance of Symbol 309 MovieClip in Frame 963
onClipEvent (load) {
dir = "right";
}
Frame 964
stop();
game.playon = true;
Instance of Symbol 430 MovieClip "enemy2" in Frame 964
onClipEvent (load) {
bonus = "infinite ammo";
rotArr = new Array(180, 90);
}
Instance of Symbol 429 MovieClip "enemy1" in Frame 964
onClipEvent (load) {
bonus = "sonic drill";
}
Instance of Symbol 431 MovieClip "enemy3" in Frame 964
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 386 MovieClip "probe" in Frame 964
onClipEvent (load) {
startdir = "right";
}
Frame 978
clearlevel();
gotoAndStop (979);
Frame 979
stop();
game.area.level = new Level(3);
Instance of Symbol 309 MovieClip in Frame 979
onClipEvent (load) {
dir = "right";
}
Frame 980
stop();
game.playon = true;
Instance of Symbol 432 MovieClip "enemy3" in Frame 980
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array();
rotArr[0] = 0;
}
Instance of Symbol 429 MovieClip "enemy1" in Frame 980
onClipEvent (load) {
bonus = "sonic drill";
}
Instance of Symbol 417 MovieClip "enemy2" in Frame 980
onClipEvent (load) {
bonus = "supershot";
}
Instance of Symbol 386 MovieClip "probe" in Frame 980
onClipEvent (load) {
startdir = "right";
}
Frame 994
clearlevel();
gotoAndStop (995);
Frame 995
stop();
game.area.level = new Level(4);
Instance of Symbol 309 MovieClip in Frame 995
onClipEvent (load) {
dir = "right";
}
Frame 996
stop();
game.playon = true;
Instance of Symbol 433 MovieClip "enemy2" in Frame 996
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(0, 90, 180, -90);
}
Instance of Symbol 434 MovieClip "enemy3" in Frame 996
onClipEvent (load) {
bonus = "life";
rotArr = new Array(0, -90, 180, 90);
}
Instance of Symbol 431 MovieClip "enemy1" in Frame 996
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 386 MovieClip "probe" in Frame 996
onClipEvent (load) {
startdir = "right";
}
Frame 1010
clearlevel();
gotoAndStop (1011);
Frame 1011
stop();
game.area.level = new Level(5);
Instance of Symbol 309 MovieClip in Frame 1011
onClipEvent (load) {
dir = "right";
}
Frame 1012
stop();
game.playon = true;
Instance of Symbol 435 MovieClip "enemy1" in Frame 1012
onClipEvent (load) {
bonus = "infinite ammo";
}
Instance of Symbol 428 MovieClip "enemy2" in Frame 1012
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1012
onClipEvent (load) {
startdir = "right";
}
Frame 1025
gotoAndStop (1026);
Frame 1026
game.area = new Area(4, 1);
stop();
Instance of Symbol 436 MovieClip in Frame 1026
onClipEvent (load) {
areanum = 4;
}
Frame 1027
stop();
Instance of Symbol 309 MovieClip in Frame 1027
onClipEvent (load) {
dir = "right";
}
Frame 1028
stop();
game.playon = true;
Instance of Symbol 439 MovieClip "enemy1" in Frame 1028
onClipEvent (load) {
bonus = "supertreads";
}
Instance of Symbol 383 MovieClip "enemy3" in Frame 1028
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 440 MovieClip "enemy2" in Frame 1028
onClipEvent (load) {
bonus = "sonic drill";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1028
onClipEvent (load) {
startdir = "right";
}
Frame 1040
clearlevel();
gotoAndPlay (1041);
Frame 1041
stop();
game.area.level = new Level(2);
Instance of Symbol 309 MovieClip in Frame 1041
onClipEvent (load) {
dir = "right";
}
Frame 1042
stop();
game.playon = true;
Instance of Symbol 441 MovieClip "enemy2" in Frame 1042
onClipEvent (load) {
bonus = "mines";
rotArr = new Array(1);
rotArr[0] = 0;
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 1042
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 442 MovieClip "enemy3" in Frame 1042
onClipEvent (load) {
bonus = "life";
rotArr = new Array(90, 0, -90);
}
Instance of Symbol 383 MovieClip "enemy4" in Frame 1042
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1042
onClipEvent (load) {
startdir = "right";
}
Frame 1056
clearlevel();
gotoAndStop (1057);
Frame 1057
stop();
game.area.level = new Level(3);
Instance of Symbol 309 MovieClip in Frame 1057
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 443 MovieClip in Frame 1057
onClipEvent (load) {
gateArray = new Array("gate1");
}
Instance of Symbol 444 MovieClip in Frame 1057
onClipEvent (load) {
gateArray = new Array("gate2");
}
Frame 1058
stop();
game.playon = true;
Instance of Symbol 417 MovieClip "enemy2" in Frame 1058
onClipEvent (load) {
bonus = "supershot";
}
Instance of Symbol 449 MovieClip "gate1" in Frame 1058
onClipEvent (load) {
rotArray = new Array(90, 180);
}
Instance of Symbol 449 MovieClip "gate2" in Frame 1058
onClipEvent (load) {
rotArray = new Array(90, 180);
}
Instance of Symbol 439 MovieClip "enemy1" in Frame 1058
onClipEvent (load) {
bonus = "supertreads";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1058
onClipEvent (load) {
startdir = "right";
}
Frame 1072
clearlevel();
gotoAndStop (1073);
Frame 1073
stop();
game.area.level = new Level(4);
Instance of Symbol 309 MovieClip in Frame 1073
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 443 MovieClip in Frame 1073
onClipEvent (load) {
gateArray = new Array("gate1");
}
Instance of Symbol 444 MovieClip in Frame 1073
onClipEvent (load) {
gateArray = new Array("gate2");
}
Instance of Symbol 443 MovieClip in Frame 1073
onClipEvent (load) {
gateArray = new Array("gate1");
}
Instance of Symbol 450 MovieClip in Frame 1073
onClipEvent (load) {
gateArray = new Array("gate3");
}
Frame 1074
stop();
game.playon = true;
Instance of Symbol 449 MovieClip "gate1" in Frame 1074
onClipEvent (load) {
rotArray = new Array(90, 180);
}
Instance of Symbol 453 MovieClip "gate2" in Frame 1074
onClipEvent (load) {
rotArray = new Array(-90, 180);
}
Instance of Symbol 454 MovieClip "gate3" in Frame 1074
onClipEvent (load) {
rotArray = new Array(0, -90);
}
Instance of Symbol 383 MovieClip "enemy1" in Frame 1074
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1074
onClipEvent (load) {
startdir = "right";
}
Frame 1088
clearlevel();
gotoAndStop (1089);
Frame 1089
stop();
game.area.level = new Level(5);
Instance of Symbol 309 MovieClip in Frame 1089
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 455 MovieClip in Frame 1089
onClipEvent (load) {
gateArray = new Array("gate1", "gate2");
}
Instance of Symbol 456 MovieClip in Frame 1089
onClipEvent (load) {
gateArray = new Array("gate1", "gate3");
}
Instance of Symbol 450 MovieClip in Frame 1089
onClipEvent (load) {
gateArray = new Array("gate3");
}
Frame 1090
stop();
game.playon = true;
Instance of Symbol 457 MovieClip "enemy3" in Frame 1090
onClipEvent (load) {
bonus = "sonic drill";
rotArr = new Array(90, 0);
}
Instance of Symbol 458 MovieClip "enemy2" in Frame 1090
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 459 MovieClip "enemy1" in Frame 1090
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(180, -90);
}
Instance of Symbol 454 MovieClip "gate3" in Frame 1090
onClipEvent (load) {
rotArray = new Array(0, -90);
}
Instance of Symbol 460 MovieClip "gate2" in Frame 1090
onClipEvent (load) {
rotArray = new Array(0, 90, 180, 90);
}
Instance of Symbol 461 MovieClip "gate1" in Frame 1090
onClipEvent (load) {
rotArray = new Array(180, 90);
}
Instance of Symbol 386 MovieClip "probe" in Frame 1090
onClipEvent (load) {
startdir = "right";
}
Frame 1103
gotoAndStop (1104);
Frame 1104
game.area = new Area(5, 1);
stop();
Instance of Symbol 462 MovieClip in Frame 1104
onClipEvent (load) {
areanum = 5;
}
Frame 1105
stop();
Instance of Symbol 309 MovieClip in Frame 1105
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 470 MovieClip in Frame 1105
onClipEvent (load) {
offset = 0;
}
Instance of Symbol 471 MovieClip in Frame 1105
onClipEvent (load) {
offset = 40;
}
Frame 1106
stop();
game.playon = true;
Instance of Symbol 472 MovieClip "enemy1" in Frame 1106
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(0, 90);
}
Instance of Symbol 441 MovieClip "enemy2" in Frame 1106
onClipEvent (load) {
bonus = "mines";
rotArr = new Array(1);
rotArr[0] = 0;
}
Instance of Symbol 383 MovieClip "enemy3" in Frame 1106
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1106
onClipEvent (load) {
startdir = "right";
}
Frame 1118
clearlevel();
gotoAndPlay (1119);
Frame 1119
stop();
game.area.level = new Level(2);
Instance of Symbol 473 MovieClip in Frame 1119
onClipEvent (load) {
dir = "down";
}
Instance of Symbol 471 MovieClip in Frame 1119
onClipEvent (load) {
offset = 40;
}
Instance of Symbol 470 MovieClip in Frame 1119
onClipEvent (load) {
offset = 0;
}
Instance of Symbol 474 MovieClip in Frame 1119
onClipEvent (load) {
offset = 50;
}
Frame 1120
stop();
game.playon = true;
Instance of Symbol 475 MovieClip "enemy2" in Frame 1120
onClipEvent (load) {
bonus = "supertreads";
rotArr = new Array(0, -90);
}
Instance of Symbol 472 MovieClip "enemy3" in Frame 1120
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(0, 90);
}
Instance of Symbol 479 MovieClip "enemy1" in Frame 1120
onClipEvent (load) {
bonus = "supertreads";
}
Instance of Symbol 386 MovieClip "probe" in Frame 1120
onClipEvent (load) {
startdir = "right";
}
Frame 1134
clearlevel();
gotoAndStop (1135);
Frame 1135
stop();
game.area.level = new Level(3);
Instance of Symbol 480 MovieClip in Frame 1135
onClipEvent (load) {
dir = "left";
}
Instance of Symbol 481 MovieClip in Frame 1135
onClipEvent (load) {
gateArray = new Array("gate0");
}
Instance of Symbol 482 MovieClip in Frame 1135
onClipEvent (load) {
offset = 10;
}
Instance of Symbol 483 MovieClip in Frame 1135
onClipEvent (load) {
offset = 80;
}
Instance of Symbol 470 MovieClip in Frame 1135
onClipEvent (load) {
offset = 0;
}
Instance of Symbol 484 MovieClip in Frame 1135
onClipEvent (load) {
offset = 20;
}
Frame 1136
stop();
game.playon = true;
Instance of Symbol 485 MovieClip "gate0" in Frame 1136
onClipEvent (load) {
rotArray = new Array(-90, 0, 90);
}
Instance of Symbol 486 MovieClip "enemy1" in Frame 1136
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(180, 90);
}
Instance of Symbol 411 MovieClip "probe" in Frame 1136
onClipEvent (load) {
startdir = "down";
}
Frame 1150
clearlevel();
gotoAndStop (1151);
Frame 1151
stop();
game.area.level = new Level(4);
Instance of Symbol 397 MovieClip in Frame 1151
onClipEvent (load) {
dir = "down";
}
Frame 1152
stop();
game.playon = true;
Instance of Symbol 487 MovieClip "enemy1" in Frame 1152
onClipEvent (load) {
bonus = "nukes";
}
Instance of Symbol 486 MovieClip "enemy2" in Frame 1152
onClipEvent (load) {
bonus = "ammo";
rotArr = new Array(180, 90);
}
Instance of Symbol 488 MovieClip "enemy3" in Frame 1152
onClipEvent (load) {
bonus = "life";
rotArr = new Array(0, 90);
}
Instance of Symbol 489 MovieClip "enemy4" in Frame 1152
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 490 MovieClip "probe" in Frame 1152
onClipEvent (load) {
startdir = "left";
}
Frame 1166
clearlevel();
gotoAndStop (1167);
Frame 1167
stop();
game.area.level = new Level(5);
Instance of Symbol 309 MovieClip in Frame 1167
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 474 MovieClip in Frame 1167
onClipEvent (load) {
offset = 50;
}
Instance of Symbol 471 MovieClip in Frame 1167
onClipEvent (load) {
offset = 40;
}
Instance of Symbol 493 MovieClip in Frame 1167
onClipEvent (load) {
offset = 30;
}
Instance of Symbol 482 MovieClip in Frame 1167
onClipEvent (load) {
offset = 10;
}
Frame 1168
stop();
game.playon = true;
Instance of Symbol 417 MovieClip "enemy1" in Frame 1168
onClipEvent (load) {
bonus = "supershot";
}
Instance of Symbol 489 MovieClip "enemy3" in Frame 1168
onClipEvent (load) {
bonus = "mines";
}
Instance of Symbol 494 MovieClip "enemy2" in Frame 1168
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 411 MovieClip "probe" in Frame 1168
onClipEvent (load) {
startdir = "down";
}
Frame 1181
gotoAndStop (1182);
Frame 1182
game.area = new Area(6, 1);
stop();
Instance of Symbol 495 MovieClip in Frame 1182
onClipEvent (load) {
areanum = 6;
}
Frame 1183
stop();
Instance of Symbol 309 MovieClip in Frame 1183
onClipEvent (load) {
dir = "right";
}
Instance of Symbol 309 MovieClip in Frame 1183
onClipEvent (load) {
dir = "right";
}
Frame 1184
stop();
game.playon = true;
Instance of Symbol 386 MovieClip "probe" in Frame 1184
onClipEvent (load) {
startdir = "right";
}
Instance of Symbol 58 MovieClip [bonus] in Frame 1184
onClipEvent (load) {
type = "ammo";
}
Instance of Symbol 58 MovieClip [bonus] in Frame 1184
onClipEvent (load) {
type = "ammo";
}
Instance of Symbol 494 MovieClip "enemy1" in Frame 1184
onClipEvent (load) {
bonus = "ammo";
}
Instance of Symbol 494 MovieClip "enemy2" in Frame 1184
onClipEvent (load) {
bonus = "ammo";
}
Frame 1188
if (!enemy1.dead) {
enemy1.die();
}
if (!enemy2.dead) {
enemy2.die();
}
stop();
Frame 1198
gotoAndPlay (1201);
Frame 1199
stop();
_root.endpoints = ("You ended with " + _root.game.points) + " points.";
Frame 1200
gotoAndStop (1199);
Frame 1201
stop();
_root.endpoints = ("You ended with " + _root.game.points) + " points.";
Symbol 8 MovieClip Frame 1
do {
num = Math.floor(Math.random() * 4) + 1;
} while (num == 5);
gotoAndStop(num);
Symbol 12 MovieClip [nuke] Frame 15
for (k in /game/area/level:enemies) {
mc = _root.game.area.level.enemies[k];
if (hitTest(mc)) {
mc.die();
}
}
Symbol 12 MovieClip [nuke] Frame 19
removeMovieClip(this);
Symbol 31 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 31 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 32 MovieClip [explosion] Frame 9
stop();
removeMovieClip(this);
Symbol 36 MovieClip [mine] Frame 1
function checkenemies() {
for (k in /game/area/level:enemies) {
if (_root.game.area.level.enemies[k].hit(_x, _y, "mine")) {
gotoAndPlay (15);
}
}
}
type = "mine";
Instance of Symbol 33 MovieClip "mine" in Symbol 36 MovieClip [mine] Frame 1
onClipEvent (enterFrame) {
_parent.checkenemies();
}
Symbol 36 MovieClip [mine] Frame 14
gotoAndPlay (1);
Symbol 36 MovieClip [mine] Frame 15
type = "none";
Symbol 36 MovieClip [mine] Frame 23
stop();
Symbol 38 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.gotoAndStop("end");
} else {
for (k in /game/area/level:enemies) {
bulletpoint = {x:_x, y:_y};
localToGlobal(bulletpoint);
if (_root.game.area.level.enemies[k].hit(bulletpoint.x, bulletpoint.y, "enemy bullet")) {
_parent.stop();
gotoAndPlay (3);
break;
}
}
}
Symbol 38 MovieClip Frame 2
gotoAndPlay (1);
Symbol 38 MovieClip Frame 7
_parent.gotoAndStop("end");
Symbol 39 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.gotoAndStop("end");
} else {
for (k in /game/area/level:enemies) {
bulletpoint = {x:_x, y:_y};
localToGlobal(bulletpoint);
if (_root.game.area.level.enemies[k].hit(bulletpoint.x, bulletpoint.y, "enemy bullet")) {
_parent.stop();
gotoAndPlay (3);
break;
}
}
}
Symbol 39 MovieClip Frame 2
gotoAndPlay (1);
Symbol 39 MovieClip Frame 7
_parent.gotoAndStop("end");
Symbol 40 MovieClip [gun turret bullet] Frame 1
type = "bullet";
terrain = {valley:true, hill:false, crater:true, rock:false, gateswitch:true, ice:true, start:true, end:true};
gotoAndPlay (2);
Symbol 40 MovieClip [gun turret bullet] Frame 2
if (!_root.checkpos(this, pos.x, pos.y, terrain, true)) {
gotoAndPlay (6);
}
Instance of Symbol 38 MovieClip "bullet" in Symbol 40 MovieClip [gun turret bullet] Frame 2
onClipEvent (enterFrame) {
_parent.checkhit();
}
Symbol 40 MovieClip [gun turret bullet] Frame 5
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
gotoAndPlay (1);
Symbol 40 MovieClip [gun turret bullet] Frame 6
type = "none";
Symbol 40 MovieClip [gun turret bullet] Frame 13
removeMovieClip(this);
stop();
Symbol 42 MovieClip Frame 1
for (k in /game/area/level:enemies) {
bulletpoint = {x:_x, y:_y};
localToGlobal(bulletpoint);
if (_root.game.area.level.enemies[k].hit(bulletpoint.x, bulletpoint.y, "bullet")) {
_parent.stop();
gotoAndPlay (3);
break;
}
}
Symbol 42 MovieClip Frame 2
gotoAndPlay (1);
Symbol 42 MovieClip Frame 7
_parent.gotoAndStop("end");
Symbol 43 MovieClip [bullet] Frame 1
type = "bullet";
terrain = {valley:true, hill:false, crater:true, ice:true, gateswitch:true, rock:false, start:true, end:true};
gotoAndPlay (2);
Symbol 43 MovieClip [bullet] Frame 2
if (!_root.checkpos(this, pos.x, pos.y, terrain, true)) {
gotoAndPlay (6);
}
Symbol 43 MovieClip [bullet] Frame 5
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
gotoAndPlay (1);
Symbol 43 MovieClip [bullet] Frame 6
type = "none";
Symbol 43 MovieClip [bullet] Frame 13
removeMovieClip(this);
stop();
Symbol 45 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 45 MovieClip Frame 2
gotoAndPlay (1);
Symbol 46 MovieClip [drone] Frame 1
function die() {
if (!dead) {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_parent._parent.numdrones--;
_root.deleteenemy(name);
gotoAndStop (43);
}
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if ((20 < dist) || (type == "mine")) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function checkrot() {
if (!dead) {
_rotation = newrot;
drot = _rotation - _root.getrot(dir.dx, dir.dy);
drot = ((180 < drot) ? (drot - 360) : (((drot < -180) ? (drot + 360) : (drot))));
if (drot == 0) {
gotoAndPlay (35);
} else if (0 < drot) {
gotoAndPlay (23);
newrot = _rotation - 90;
} else {
gotoAndPlay (29);
newrot = _rotation + 90;
}
}
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(name, dir, pos, {valley:true, hill:false, crater:true, gateswitch:true, ice:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
checkrot();
} else {
dir = {dx:0, dy:0};
gotoAndPlay (2);
}
}
}
point = {x:_x, y:_y};
localToGlobal(point);
pos = _root.getpos(point.x, point.y);
dir = {dx:0, dy:0};
newrot = _rotation;
name = (_parent._parent._name + "_") + _name;
_root.addenemy(name, this);
dead = false;
reset();
Symbol 46 MovieClip [drone] Frame 22
reset();
Symbol 46 MovieClip [drone] Frame 28
checkrot();
Symbol 46 MovieClip [drone] Frame 34
checkrot();
Symbol 46 MovieClip [drone] Frame 42
gotoAndStop (2);
reset();
Symbol 48 MovieClip Frame 1
for (k in /game/area/level:enemies) {
bulletpoint = {x:_x, y:_y};
localToGlobal(bulletpoint);
mc = _root.game.area.level.enemies[k];
if (mc.hit(bulletpoint.x, bulletpoint.y, "supershot") && (mc.type == "gate")) {
_parent.stop();
gotoAndPlay (3);
break;
}
}
Symbol 48 MovieClip Frame 2
gotoAndPlay (1);
Symbol 48 MovieClip Frame 7
_parent.gotoAndStop("end");
Symbol 49 MovieClip [supershot] Frame 1
type = "supershot";
terrain = {valley:true, hill:false, crater:true, gateswitch:true, ice:true, rock:false, start:true, end:true};
gotoAndPlay (2);
Symbol 49 MovieClip [supershot] Frame 2
if (!_root.checkpos(_name, pos.x, pos.y, terrain, true)) {
gotoAndPlay (6);
}
Symbol 49 MovieClip [supershot] Frame 5
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
gotoAndPlay (1);
Symbol 49 MovieClip [supershot] Frame 6
type = "none";
Symbol 49 MovieClip [supershot] Frame 13
removeMovieClip(this);
stop();
Symbol 50 MovieClip [explosion] Frame 9
stop();
removeMovieClip(this);
Symbol 51 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 51 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 52 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 52 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 53 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 53 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 54 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 54 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 55 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 55 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 56 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 56 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 57 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 57 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 58 MovieClip [bonus] Frame 1
stop();
Instance of Symbol 30 MovieClip in Symbol 58 MovieClip [bonus] Frame 1
onClipEvent (load) {
getbonus = new Sound(this);
getbonus.attachSound("bonus_sound");
gotoAndStop(_parent.type);
}
onClipEvent (enterFrame) {
if (_root.game.playon && (hitTest(_root.probe.body))) {
getbonus.start();
_root.changepoints(100);
if (_parent.type == "ammo") {
_root.changeammo(2);
} else if (_parent.type == "mines") {
_root.changemines(2);
} else if (_parent.type == "life") {
_root.changelives(1);
} else if (_parent.type == "supershot") {
_root.newspecial("supershot");
} else if (_parent.type == "infinite ammo") {
_root.newspecial("infinite ammo");
} else if (_parent.type == "sonic drill") {
_root.newspecial("sonic drill");
} else if (_parent.type == "supertreads") {
_root.newspecial("supertreads");
} else if (_parent.type == "nukes") {
_root.newspecial("nukes");
}
_parent.gotoAndStop(2);
}
}
Symbol 67 MovieClip Frame 1
bytes = _root.getBytesLoaded();
totbytes = _root.getBytesTotal();
circle._x = -60 + (120 * (bytes / totbytes));
rect._x = -60 + (60 * (bytes / totbytes));
rect._xscale = 100 * (bytes / totbytes);
percloaded = ("" + Math.round(100 * (bytes / totbytes))) + "% loaded";
bytesloaded = ((("(" + Math.floor(bytes / 1024)) + "K/") + Math.floor(totbytes / 1024)) + "K)";
if (bytes >= totbytes) {
gotoAndStop (3);
_root.play();
}
Symbol 67 MovieClip Frame 2
gotoAndPlay (1);
Symbol 74 Button
on (release) {
gotoAndPlay (70);
}
Symbol 78 Button
on (release) {
gotoAndStop (12);
}
Symbol 84 Button
on (release) {
gotoAndStop (65);
}
Symbol 88 Button
on (release) {
gotoAndStop (17);
}
Symbol 92 Button
on (release) {
gotoAndStop (53);
}
Symbol 96 Button
on (release) {
gotoAndStop (60);
}
Symbol 103 Button
on (release) {
gotoAndStop (12);
}
Symbol 107 Button
on (release) {
gotoAndStop (40);
}
Symbol 112 Button
on (release) {
gotoAndStop (23);
}
Symbol 115 Button
on (release) {
gotoAndStop (29);
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 4
_parent.moveon = false;
Symbol 136 MovieClip Frame 11
gotoAndStop (1);
_parent.moveon = true;
Symbol 136 MovieClip Frame 12
_parent.moveon = false;
Symbol 136 MovieClip Frame 21
gotoAndStop (1);
_parent.moveon = true;
Symbol 149 Button
on (release) {
gotoAndStop (17);
}
Symbol 176 Button
on (release) {
gotoAndStop (23);
}
Symbol 187 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 189 MovieClip Frame 1
type = "crater";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 194 MovieClip Frame 1
function explode() {
gotoAndPlay (2);
}
stop();
type = "rock";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 194 MovieClip Frame 9
stop();
type = "valley";
Symbol 206 Button
on (release) {
gotoAndStop (34);
}
Symbol 215 MovieClip Frame 1
type = "ice";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 219 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 224 Button
on (release) {
gotoAndStop (29);
}
Symbol 237 Button
on (release) {
gotoAndStop (46);
}
Symbol 253 Button
on (release) {
gotoAndStop (40);
}
Symbol 254 Button
on (release) {
gotoAndStop (17);
}
Symbol 262 Button
on (release) {
thisarea = "none";
password = password.toLowerCase();
if (password == "deimos") {
thisarea = 2;
} else if (password == "phobos") {
thisarea = 3;
} else if (password == "mariner") {
thisarea = 4;
} else if (password == "viking") {
thisarea = 5;
} else if (password == "red planet") {
thisarea = 6;
}
if (thisarea != "none") {
game = new Game(thisarea, 1);
gotoAndStop("map" + thisarea);
}
}
Symbol 270 Button
on (release) {
getURL ("http://nugenflugen.tripod.com");
}
Symbol 274 Button
on (release) {
game = new Game(1, 1);
gotoAndStop (791);
}
Symbol 280 Button
on (release) {
gotoAndPlay (12);
}
Symbol 301 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 301 MovieClip Frame 21
gotoAndPlay (1);
Symbol 301 MovieClip Frame 41
gotoAndPlay (1);
Symbol 301 MovieClip Frame 61
gotoAndPlay (1);
Symbol 301 MovieClip Frame 81
gotoAndPlay (1);
Symbol 301 MovieClip Frame 101
gotoAndPlay (1);
Symbol 301 MovieClip Frame 121
gotoAndPlay (1);
Instance of Symbol 304 MovieClip in Symbol 305 MovieClip Frame 1
onClipEvent (keyUp) {
_root.nextFrame();
}
Symbol 307 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 308 MovieClip Frame 1
type = "start";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 309 MovieClip Frame 1
type = "end";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 311 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 313 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 315 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 317 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 319 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 323 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 329 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
for (k in /game/area/level:enemies) {
bulletpoint = {x:_x, y:_y};
localToGlobal(bulletpoint);
mc = _root.game.area.level.enemies[k];
if (mc.hit(bulletpoint.x, bulletpoint.y, "supershot") && (mc.type == "gate")) {
_parent.stop();
gotoAndPlay (3);
break;
}
}
Symbol 351 MovieClip Frame 2
gotoAndPlay (1);
Symbol 351 MovieClip Frame 7
_parent.gotoAndStop("end");
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 260
_root.newspecial("none");
Symbol 368 MovieClip Frame 1
function reset() {
areaname = _root.game.area.name;
points = _root.game.points;
liveslevel.gotoAndStop("life" + _root.game.lives);
minelevel.gotoAndStop("mine" + _root.game.life.mines);
ammolevel.gotoAndStop("ammo" + _root.game.life.ammo);
levelbar.gotoAndStop("level" + _root.game.area.level.num);
if (_root.game.life.special.name == "infinite ammo") {
special.gotoAndStop("infinite ammo");
} else if (_root.game.life.special.name != "none") {
special.gotoAndStop(_root.game.life.special.name + _root.game.life.special.level);
}
}
stop();
reset();
Symbol 374 MovieClip Frame 1
leveltext = "Level " + _root.game.area.level.num;
areatext = _root.game.area.name;
stop();
Instance of Symbol 369 MovieClip in Symbol 374 MovieClip Frame 1
onClipEvent (keyUp) {
_root.play();
}
Symbol 376 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 376 MovieClip Frame 2
gotoAndPlay (1);
Symbol 380 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 380 MovieClip Frame 2
gotoAndPlay (1);
Symbol 383 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 383 MovieClip Frame 9
reset();
Symbol 383 MovieClip Frame 28
reset();
Symbol 383 MovieClip Frame 47
reset();
Symbol 384 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 384 MovieClip Frame 9
reset();
Symbol 384 MovieClip Frame 28
reset();
Symbol 384 MovieClip Frame 47
reset();
Symbol 386 MovieClip Frame 1
function die() {
if ((!dead) && (movedone)) {
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
explosion._xscale = 150;
explosion._yscale = 150;
_root.game.playon = false;
dead = true;
gotoAndPlay (183);
return(true);
}
return(false);
}
function reset() {
moveon = true;
_x = (_x + (50 * dpos.dx));
_y = (_y + (50 * dpos.dy));
movedone = true;
if (dead) {
gotoAndPlay (183);
} else if (levelend) {
_root.endlevel();
gotoAndStop (183);
} else if (_root[(("grid" + pos.x) + ",") + pos.y].type == "end") {
_root.game.playon = false;
dirs = {right:0, up:1, left:2, down:3};
dirname = _root.getdirname(dir.dx, dir.dy);
dirdiff = dirs[_root[(("grid" + pos.x) + ",") + pos.y].dir] - dirs[dirname];
dirdiff = ((2 < Math.abs(dirdiff)) ? (-dirdiff) : (dirdiff));
if (dirdiff < 0) {
rotate("cw");
} else if (0 < dirdiff) {
rotate("ccw");
} else {
levelend = true;
gotoAndPlay("move " + dirname);
}
} else if ((((_root[(("grid" + pos.x) + ",") + pos.y].type == "ice") && ((dpos.dx != 0) || (dpos.dy != 0))) && (_root.checkpos(_name, pos.x + dpos.dx, pos.y + dpos.dy, terraintypes, true))) && (checkgates(pos.x + dpos.dx, pos.y + dpos.dy))) {
if (supertreads) {
supertreads = false;
} else {
moveon = false;
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
if ((dpos.dx != (-dir.dx)) || (dpos.dy != (-dir.dy))) {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
} else if ((_root[(("grid" + pos.x) + ",") + pos.y].type == "gateswitch") && ((dpos.dx != 0) || (dpos.dy != 0))) {
_root[(("grid" + pos.x) + ",") + pos.y].activate();
}
}
function checkgates(x, y) {
var bool = true;
for (j in /game/area/level:enemies) {
var mc = _root.game.area.level.enemies[j];
if (((mc.type == "gate") && (mc.pos.x == x)) && (mc.pos.y == y)) {
bool = false;
break;
}
}
return(bool);
}
function move(direction) {
if (moveon) {
dpos = ((direction == "forward") ? ({dx:dir.dx, dy:dir.dy}) : ({dx:-dir.dx, dy:-dir.dy}));
newpos = {x:pos.x + dpos.dx, y:pos.y + dpos.dy};
if (_root.checkpos(_name, newpos.x, newpos.y, terraintypes, true) && (checkgates(newpos.x, newpos.y))) {
moveon = false;
pos = newpos;
if (direction == "forward") {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
}
}
function rotate(direction) {
if (moveon) {
rotarr = ((direction == "cw") ? ({up:"right", right:"down", down:"left", left:"up"}) : ({up:"left", right:"up", down:"right", left:"down"}));
moveon = false;
dpos = {dx:0, dy:0};
dirname = _root.getdirname(dir.dx, dir.dy);
gotoAndPlay((dirname + " to ") + rotarr[dirname]);
dir = _root.getdir(rotarr[dirname]);
}
}
function keypressed(keynum) {
if (_root.game.playon && (moveon)) {
if (keynum == 39) {
rotate("cw");
} else if (keynum == 37) {
rotate("ccw");
} else if (keynum == 38) {
move("forward");
} else if (keynum == 40) {
move("backward");
} else if (keynum == 70) {
if (_root.changeammo(-1)) {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
}
} else if (keynum == 68) {
minelaid = true;
for (k in /levelfloor) {
if (((_root.levelfloor[k].type == "mine") && (_root.levelfloor[k]._x == _x)) && (_root.levelfloor[k]._y == _y)) {
minelaid = false;
break;
}
}
if (minelaid && (_root.changemines(-1))) {
dropmine.start();
num = _root.movieincr(1);
_root.levelfloor.attachMovie("mine", "mine" + num, num);
_root.levelfloor["mine" + num]._x = _x;
_root.levelfloor["mine" + num]._y = _y;
}
} else if (keynum == 83) {
var specialtype = _root.game.life.special.name;
if (specialtype == "supershot") {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("supershot", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
} else if (specialtype == "sonic drill") {
turret.gotoAndPlay("sonic drill");
mc = _root[(("grid" + (pos.x + dir.dx)) + ",") + (pos.y + dir.dy)];
if (mc.type == "rock") {
mc.explode();
}
} else if (specialtype == "nukes") {
num = _root.movieincr(1);
_root.leveltop.attachMovie("nuke", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = 75 + (50 * Math.round(7 * Math.random()));
mc._y = 75 + (50 * Math.round(3 * Math.random()));
} else if ((specialtype == "supertreads") && (!supertreads)) {
supertreads = true;
}
_root.game.life.special.fire();
}
}
}
movedone = true;
terraintypes = {valley:true, gateswitch:true, hill:false, crater:false, ice:true, rock:false, start:true, end:true};
dropmine = new Sound(this);
dropmine.attachSound("mine_sound");
dead = false;
supertreads = false;
levelend = false;
pos = _root.getpos(_x, _y);
dpos = _root.getdir(startdir);
dir = _root.getdir(startdir);
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
moveon = false;
gotoAndPlay("move " + startdir);
Instance of Symbol 123 MovieClip in Symbol 386 MovieClip Frame 1
onClipEvent (keyDown) {
_parent.keypressed(Key.getCode());
}
Symbol 386 MovieClip Frame 2
stop();
reset();
Symbol 386 MovieClip Frame 14
stop();
reset();
Symbol 386 MovieClip Frame 27
stop();
reset();
Symbol 386 MovieClip Frame 38
stop();
reset();
Symbol 386 MovieClip Frame 49
gotoAndStop (2);
Symbol 386 MovieClip Frame 58
gotoAndStop (27);
Symbol 386 MovieClip Frame 67
gotoAndStop (14);
Symbol 386 MovieClip Frame 76
gotoAndStop (2);
Symbol 386 MovieClip Frame 85
gotoAndStop (38);
Symbol 386 MovieClip Frame 97
movedone = false;
gotoAndStop (38);
Symbol 386 MovieClip Frame 109
movedone = false;
gotoAndStop (2);
Symbol 386 MovieClip Frame 121
movedone = false;
gotoAndStop (14);
Symbol 386 MovieClip Frame 133
movedone = false;
gotoAndStop (27);
Symbol 386 MovieClip Frame 145
movedone = false;
gotoAndStop (14);
Symbol 386 MovieClip Frame 157
movedone = false;
gotoAndStop (27);
Symbol 386 MovieClip Frame 169
movedone = false;
gotoAndStop (38);
Symbol 386 MovieClip Frame 181
movedone = false;
gotoAndStop (2);
Symbol 386 MovieClip Frame 206
stop();
_root.endlife();
Symbol 388 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 389 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 389 MovieClip Frame 9
reset();
Symbol 389 MovieClip Frame 28
reset();
Symbol 389 MovieClip Frame 47
reset();
Symbol 390 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 390 MovieClip Frame 9
reset();
Symbol 390 MovieClip Frame 28
reset();
Symbol 390 MovieClip Frame 47
reset();
Symbol 392 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 394 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 394 MovieClip Frame 2
gotoAndPlay (1);
Symbol 395 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 395 MovieClip Frame 2
gotoAndPlay (1);
Symbol 396 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (86);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if ((type == "mine") || (type == "supershot")) {
die();
}
return(true);
}
function checkrot() {
if (!dead) {
_rotation = newrot;
drot = _rotation - _root.getrot(dir.dx, dir.dy);
drot = ((180 < drot) ? (drot - 360) : (((drot < -180) ? (drot + 360) : (drot))));
if (drot == 0) {
gotoAndPlay (65);
} else if (0 < drot) {
gotoAndPlay (23);
newrot = _rotation - 90;
} else {
gotoAndPlay (44);
newrot = _rotation + 90;
}
}
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
checkrot();
} else {
dir = {dx:0, dy:0};
gotoAndPlay (2);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
newrot = _rotation;
_root.addenemy(_name, this);
dead = false;
reset();
Symbol 396 MovieClip Frame 22
reset();
Symbol 396 MovieClip Frame 43
checkrot();
Symbol 396 MovieClip Frame 64
checkrot();
Symbol 396 MovieClip Frame 85
gotoAndStop (2);
reset();
Symbol 397 MovieClip Frame 1
type = "end";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 399 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 400 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (86);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if ((type == "mine") || (type == "supershot")) {
die();
}
return(true);
}
function checkrot() {
if (!dead) {
_rotation = newrot;
drot = _rotation - _root.getrot(dir.dx, dir.dy);
drot = ((180 < drot) ? (drot - 360) : (((drot < -180) ? (drot + 360) : (drot))));
if (drot == 0) {
gotoAndPlay (65);
} else if (0 < drot) {
gotoAndPlay (23);
newrot = _rotation - 90;
} else {
gotoAndPlay (44);
newrot = _rotation + 90;
}
}
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
checkrot();
} else {
dir = {dx:0, dy:0};
gotoAndPlay (2);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
newrot = _rotation;
_root.addenemy(_name, this);
dead = false;
reset();
Symbol 400 MovieClip Frame 22
reset();
Symbol 400 MovieClip Frame 43
checkrot();
Symbol 400 MovieClip Frame 64
checkrot();
Symbol 400 MovieClip Frame 85
gotoAndStop (2);
reset();
Symbol 401 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 401 MovieClip Frame 21
gotoAndPlay (1);
Symbol 401 MovieClip Frame 41
gotoAndPlay (1);
Symbol 401 MovieClip Frame 61
gotoAndPlay (1);
Symbol 401 MovieClip Frame 81
gotoAndPlay (1);
Symbol 401 MovieClip Frame 101
gotoAndPlay (1);
Symbol 401 MovieClip Frame 121
gotoAndPlay (1);
Instance of Symbol 304 MovieClip in Symbol 404 MovieClip Frame 1
onClipEvent (keyUp) {
_root.nextFrame();
}
Symbol 405 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 406 MovieClip Frame 1
function reset() {
areaname = _root.game.area.name;
points = _root.game.points;
liveslevel.gotoAndStop("life" + _root.game.lives);
minelevel.gotoAndStop("mine" + _root.game.life.mines);
ammolevel.gotoAndStop("ammo" + _root.game.life.ammo);
levelbar.gotoAndStop("level" + _root.game.area.level.num);
if (_root.game.life.special.name == "infinite ammo") {
special.gotoAndStop("infinite ammo");
} else if (_root.game.life.special.name != "none") {
special.gotoAndStop(_root.game.life.special.name + _root.game.life.special.level);
}
}
stop();
reset();
Symbol 407 MovieClip Frame 1
leveltext = "Level " + _root.game.area.level.num;
areatext = _root.game.area.name;
stop();
Instance of Symbol 369 MovieClip in Symbol 407 MovieClip Frame 1
onClipEvent (keyUp) {
_root.play();
}
Symbol 409 MovieClip Frame 1
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
Symbol 409 MovieClip Frame 2
gotoAndPlay (1);
Symbol 410 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 410 MovieClip Frame 2
reset();
Symbol 410 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 410 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 410 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 410 MovieClip Frame 46
gotoAndStop (2);
Symbol 411 MovieClip Frame 1
function die() {
if ((!dead) && (movedone)) {
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
explosion._xscale = 150;
explosion._yscale = 150;
_root.game.playon = false;
dead = true;
gotoAndPlay (183);
return(true);
}
return(false);
}
function reset() {
moveon = true;
_x = (_x + (50 * dpos.dx));
_y = (_y + (50 * dpos.dy));
movedone = true;
if (dead) {
gotoAndPlay (183);
} else if (levelend) {
_root.endlevel();
gotoAndStop (183);
} else if (_root[(("grid" + pos.x) + ",") + pos.y].type == "end") {
_root.game.playon = false;
dirs = {right:0, up:1, left:2, down:3};
dirname = _root.getdirname(dir.dx, dir.dy);
dirdiff = dirs[_root[(("grid" + pos.x) + ",") + pos.y].dir] - dirs[dirname];
dirdiff = ((2 < Math.abs(dirdiff)) ? (-dirdiff) : (dirdiff));
if (dirdiff < 0) {
rotate("cw");
} else if (0 < dirdiff) {
rotate("ccw");
} else {
levelend = true;
gotoAndPlay("move " + dirname);
}
} else if ((((_root[(("grid" + pos.x) + ",") + pos.y].type == "ice") && ((dpos.dx != 0) || (dpos.dy != 0))) && (_root.checkpos(_name, pos.x + dpos.dx, pos.y + dpos.dy, terraintypes, true))) && (checkgates(pos.x + dpos.dx, pos.y + dpos.dy))) {
if (supertreads) {
supertreads = false;
} else {
moveon = false;
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
if ((dpos.dx != (-dir.dx)) || (dpos.dy != (-dir.dy))) {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
} else if ((_root[(("grid" + pos.x) + ",") + pos.y].type == "gateswitch") && ((dpos.dx != 0) || (dpos.dy != 0))) {
_root[(("grid" + pos.x) + ",") + pos.y].activate();
}
}
function checkgates(x, y) {
var bool = true;
for (j in /game/area/level:enemies) {
var mc = _root.game.area.level.enemies[j];
if (((mc.type == "gate") && (mc.pos.x == x)) && (mc.pos.y == y)) {
bool = false;
break;
}
}
return(bool);
}
function move(direction) {
if (moveon) {
dpos = ((direction == "forward") ? ({dx:dir.dx, dy:dir.dy}) : ({dx:-dir.dx, dy:-dir.dy}));
newpos = {x:pos.x + dpos.dx, y:pos.y + dpos.dy};
if (_root.checkpos(_name, newpos.x, newpos.y, terraintypes, true) && (checkgates(newpos.x, newpos.y))) {
moveon = false;
pos = newpos;
if (direction == "forward") {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
}
}
function rotate(direction) {
if (moveon) {
rotarr = ((direction == "cw") ? ({up:"right", right:"down", down:"left", left:"up"}) : ({up:"left", right:"up", down:"right", left:"down"}));
moveon = false;
dpos = {dx:0, dy:0};
dirname = _root.getdirname(dir.dx, dir.dy);
gotoAndPlay((dirname + " to ") + rotarr[dirname]);
dir = _root.getdir(rotarr[dirname]);
}
}
function keypressed(keynum) {
if (_root.game.playon && (moveon)) {
if (keynum == 39) {
rotate("cw");
} else if (keynum == 37) {
rotate("ccw");
} else if (keynum == 38) {
move("forward");
} else if (keynum == 40) {
move("backward");
} else if (keynum == 70) {
if (_root.changeammo(-1)) {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
}
} else if (keynum == 68) {
minelaid = true;
for (k in /levelfloor) {
if (((_root.levelfloor[k].type == "mine") && (_root.levelfloor[k]._x == _x)) && (_root.levelfloor[k]._y == _y)) {
minelaid = false;
break;
}
}
if (minelaid && (_root.changemines(-1))) {
dropmine.start();
num = _root.movieincr(1);
_root.levelfloor.attachMovie("mine", "mine" + num, num);
_root.levelfloor["mine" + num]._x = _x;
_root.levelfloor["mine" + num]._y = _y;
}
} else if (keynum == 83) {
var specialtype = _root.game.life.special.name;
if (specialtype == "supershot") {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("supershot", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
} else if (specialtype == "sonic drill") {
turret.gotoAndPlay("sonic drill");
mc = _root[(("grid" + (pos.x + dir.dx)) + ",") + (pos.y + dir.dy)];
if (mc.type == "rock") {
mc.explode();
}
} else if (specialtype == "nukes") {
num = _root.movieincr(1);
_root.leveltop.attachMovie("nuke", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = 75 + (50 * Math.round(7 * Math.random()));
mc._y = 75 + (50 * Math.round(3 * Math.random()));
} else if ((specialtype == "supertreads") && (!supertreads)) {
supertreads = true;
}
_root.game.life.special.fire();
}
}
}
movedone = true;
terraintypes = {valley:true, gateswitch:true, hill:false, crater:false, ice:true, rock:false, start:true, end:true};
dropmine = new Sound(this);
dropmine.attachSound("mine_sound");
dead = false;
supertreads = false;
levelend = false;
pos = _root.getpos(_x, _y);
dpos = _root.getdir(startdir);
dir = _root.getdir(startdir);
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
moveon = false;
gotoAndPlay("move " + startdir);
Instance of Symbol 123 MovieClip in Symbol 411 MovieClip Frame 1
onClipEvent (keyDown) {
_parent.keypressed(Key.getCode());
}
Symbol 411 MovieClip Frame 2
stop();
reset();
Symbol 411 MovieClip Frame 14
stop();
reset();
Symbol 411 MovieClip Frame 27
stop();
reset();
Symbol 411 MovieClip Frame 38
stop();
reset();
Symbol 411 MovieClip Frame 49
gotoAndStop (2);
Symbol 411 MovieClip Frame 58
gotoAndStop (27);
Symbol 411 MovieClip Frame 67
gotoAndStop (14);
Symbol 411 MovieClip Frame 76
gotoAndStop (2);
Symbol 411 MovieClip Frame 85
gotoAndStop (38);
Symbol 411 MovieClip Frame 97
movedone = false;
gotoAndStop (38);
Symbol 411 MovieClip Frame 109
movedone = false;
gotoAndStop (2);
Symbol 411 MovieClip Frame 121
movedone = false;
gotoAndStop (14);
Symbol 411 MovieClip Frame 133
movedone = false;
gotoAndStop (27);
Symbol 411 MovieClip Frame 145
movedone = false;
gotoAndStop (14);
Symbol 411 MovieClip Frame 157
movedone = false;
gotoAndStop (27);
Symbol 411 MovieClip Frame 169
movedone = false;
gotoAndStop (38);
Symbol 411 MovieClip Frame 181
movedone = false;
gotoAndStop (2);
Symbol 411 MovieClip Frame 206
stop();
_root.endlife();
Symbol 412 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 413 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 413 MovieClip Frame 2
reset();
Symbol 413 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 413 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 413 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 413 MovieClip Frame 46
gotoAndStop (2);
Symbol 414 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 414 MovieClip Frame 2
reset();
Symbol 414 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 414 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 414 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 414 MovieClip Frame 46
gotoAndStop (2);
Symbol 415 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 415 MovieClip Frame 2
reset();
Symbol 415 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 415 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 415 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 415 MovieClip Frame 46
gotoAndStop (2);
Symbol 416 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 416 MovieClip Frame 2
reset();
Symbol 416 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 416 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 416 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 416 MovieClip Frame 46
gotoAndStop (2);
Symbol 417 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (86);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if ((type == "mine") || (type == "supershot")) {
die();
}
return(true);
}
function checkrot() {
if (!dead) {
_rotation = newrot;
drot = _rotation - _root.getrot(dir.dx, dir.dy);
drot = ((180 < drot) ? (drot - 360) : (((drot < -180) ? (drot + 360) : (drot))));
if (drot == 0) {
gotoAndPlay (65);
} else if (0 < drot) {
gotoAndPlay (23);
newrot = _rotation - 90;
} else {
gotoAndPlay (44);
newrot = _rotation + 90;
}
}
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
checkrot();
} else {
dir = {dx:0, dy:0};
gotoAndPlay (2);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
newrot = _rotation;
_root.addenemy(_name, this);
dead = false;
reset();
Symbol 417 MovieClip Frame 22
reset();
Symbol 417 MovieClip Frame 43
checkrot();
Symbol 417 MovieClip Frame 64
checkrot();
Symbol 417 MovieClip Frame 85
gotoAndStop (2);
reset();
Symbol 418 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 418 MovieClip Frame 2
reset();
Symbol 418 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 418 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 418 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 418 MovieClip Frame 46
gotoAndStop (2);
Symbol 419 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 419 MovieClip Frame 2
reset();
Symbol 419 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 419 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 419 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 419 MovieClip Frame 46
gotoAndStop (2);
Symbol 420 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 420 MovieClip Frame 2
reset();
Symbol 420 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 420 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 420 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 420 MovieClip Frame 46
gotoAndStop (2);
Symbol 421 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 421 MovieClip Frame 2
reset();
Symbol 421 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 421 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 421 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 421 MovieClip Frame 46
gotoAndStop (2);
Symbol 422 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 422 MovieClip Frame 21
gotoAndPlay (1);
Symbol 422 MovieClip Frame 41
gotoAndPlay (1);
Symbol 422 MovieClip Frame 61
gotoAndPlay (1);
Symbol 422 MovieClip Frame 81
gotoAndPlay (1);
Symbol 422 MovieClip Frame 101
gotoAndPlay (1);
Symbol 422 MovieClip Frame 121
gotoAndPlay (1);
Symbol 428 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = 0;
explosion._y = 0;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
for (k in drones) {
if (typeof(drones[k]) == "movieclip") {
drones[k].die();
}
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (24 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function reset() {
if ((!dead) && (numdrones < 3)) {
drones.attachMovie("drone", "drone" + movienum, movienum);
mc = drones["drone" + movienum];
mc._x = 0;
mc._y = 0;
bonusnum = 0;
bonusArr = new Array("none", "none", "ammo", "ammo", "mines");
do {
bonusnum = Math.floor(Math.random() * bonusArr.length);
} while (bonusnum == bonusArr.length);
mc.bonus = bonusArr[bonusnum];
numdrones++;
movienum++;
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
numdrones = 0;
movienum = 0;
Instance of Symbol 426 MovieClip "body" in Symbol 428 MovieClip Frame 1
onClipEvent (load) {
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
}
Symbol 428 MovieClip Frame 2
reset();
Symbol 428 MovieClip Frame 57
gotoAndPlay (2);
Symbol 429 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 429 MovieClip Frame 9
reset();
Symbol 429 MovieClip Frame 28
reset();
Symbol 429 MovieClip Frame 47
reset();
Symbol 430 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 430 MovieClip Frame 2
reset();
Symbol 430 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 430 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 430 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 430 MovieClip Frame 46
gotoAndStop (2);
Symbol 431 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = 0;
explosion._y = 0;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
for (k in drones) {
if (typeof(drones[k]) == "movieclip") {
drones[k].die();
}
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (24 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function reset() {
if ((!dead) && (numdrones < 3)) {
drones.attachMovie("drone", "drone" + movienum, movienum);
mc = drones["drone" + movienum];
mc._x = 0;
mc._y = 0;
bonusnum = 0;
bonusArr = new Array("none", "none", "ammo", "ammo", "mines");
do {
bonusnum = Math.floor(Math.random() * bonusArr.length);
} while (bonusnum == bonusArr.length);
mc.bonus = bonusArr[bonusnum];
numdrones++;
movienum++;
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
numdrones = 0;
movienum = 0;
Instance of Symbol 426 MovieClip "body" in Symbol 431 MovieClip Frame 1
onClipEvent (load) {
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
}
Symbol 431 MovieClip Frame 2
reset();
Symbol 431 MovieClip Frame 57
gotoAndPlay (2);
Symbol 432 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 432 MovieClip Frame 2
reset();
Symbol 432 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 432 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 432 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 432 MovieClip Frame 46
gotoAndStop (2);
Symbol 433 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 433 MovieClip Frame 2
reset();
Symbol 433 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 433 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 433 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 433 MovieClip Frame 46
gotoAndStop (2);
Symbol 434 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 434 MovieClip Frame 2
reset();
Symbol 434 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 434 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 434 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 434 MovieClip Frame 46
gotoAndStop (2);
Symbol 435 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = 0;
explosion._y = 0;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
for (k in drones) {
if (typeof(drones[k]) == "movieclip") {
drones[k].die();
}
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (24 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function reset() {
if ((!dead) && (numdrones < 3)) {
drones.attachMovie("drone", "drone" + movienum, movienum);
mc = drones["drone" + movienum];
mc._x = 0;
mc._y = 0;
bonusnum = 0;
bonusArr = new Array("none", "none", "ammo", "ammo", "mines");
do {
bonusnum = Math.floor(Math.random() * bonusArr.length);
} while (bonusnum == bonusArr.length);
mc.bonus = bonusArr[bonusnum];
numdrones++;
movienum++;
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
numdrones = 0;
movienum = 0;
Instance of Symbol 426 MovieClip "body" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
}
Symbol 435 MovieClip Frame 2
reset();
Symbol 435 MovieClip Frame 57
gotoAndPlay (2);
Symbol 436 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 436 MovieClip Frame 21
gotoAndPlay (1);
Symbol 436 MovieClip Frame 41
gotoAndPlay (1);
Symbol 436 MovieClip Frame 61
gotoAndPlay (1);
Symbol 436 MovieClip Frame 81
gotoAndPlay (1);
Symbol 436 MovieClip Frame 101
gotoAndPlay (1);
Symbol 436 MovieClip Frame 121
gotoAndPlay (1);
Symbol 439 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 439 MovieClip Frame 9
reset();
Symbol 439 MovieClip Frame 28
reset();
Symbol 439 MovieClip Frame 47
reset();
Symbol 440 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = 0;
explosion._y = 0;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
for (k in drones) {
if (typeof(drones[k]) == "movieclip") {
drones[k].die();
}
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (24 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function reset() {
if ((!dead) && (numdrones < 3)) {
drones.attachMovie("drone", "drone" + movienum, movienum);
mc = drones["drone" + movienum];
mc._x = 0;
mc._y = 0;
bonusnum = 0;
bonusArr = new Array("none", "none", "ammo", "ammo", "mines");
do {
bonusnum = Math.floor(Math.random() * bonusArr.length);
} while (bonusnum == bonusArr.length);
mc.bonus = bonusArr[bonusnum];
numdrones++;
movienum++;
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
numdrones = 0;
movienum = 0;
Instance of Symbol 426 MovieClip "body" in Symbol 440 MovieClip Frame 1
onClipEvent (load) {
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
}
Symbol 440 MovieClip Frame 2
reset();
Symbol 440 MovieClip Frame 57
gotoAndPlay (2);
Symbol 441 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 441 MovieClip Frame 2
reset();
Symbol 441 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 441 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 441 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 441 MovieClip Frame 46
gotoAndStop (2);
Symbol 442 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 442 MovieClip Frame 2
reset();
Symbol 442 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 442 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 442 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 442 MovieClip Frame 46
gotoAndStop (2);
Symbol 443 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 444 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 448 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:center._x, y:center._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
return(true);
}
_root.addenemy(_parent._name + "fence", this);
type = "gate";
pos = _root.getpos(_parent._x + center._x, _parent._y + center._y);
dir = {dx:0, dy:0};
Instance of Symbol 447 MovieClip "center" in Symbol 448 MovieClip Frame 1
onClipEvent (enterFrame) {
for (k in /game/area/level:enemies) {
centerpoint = {x:0, y:0};
localToGlobal(centerpoint);
mc = _root.game.area.level.enemies[k];
if (Math.sqrt(((mc._x - centerpoint.x) * (mc._x - centerpoint.x)) + ((mc._y - centerpoint.y) * (mc._y - centerpoint.y))) < 25) {
mc.die();
}
}
}
Symbol 449 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 449 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 449 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 449 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 450 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 452 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 453 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 453 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 453 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 453 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 454 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 454 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 454 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 454 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 455 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 456 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 457 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 457 MovieClip Frame 2
reset();
Symbol 457 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 457 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 457 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 457 MovieClip Frame 46
gotoAndStop (2);
Symbol 458 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (86);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if ((type == "mine") || (type == "supershot")) {
die();
}
return(true);
}
function checkrot() {
if (!dead) {
_rotation = newrot;
drot = _rotation - _root.getrot(dir.dx, dir.dy);
drot = ((180 < drot) ? (drot - 360) : (((drot < -180) ? (drot + 360) : (drot))));
if (drot == 0) {
gotoAndPlay (65);
} else if (0 < drot) {
gotoAndPlay (23);
newrot = _rotation - 90;
} else {
gotoAndPlay (44);
newrot = _rotation + 90;
}
}
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
checkrot();
} else {
dir = {dx:0, dy:0};
gotoAndPlay (2);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
newrot = _rotation;
_root.addenemy(_name, this);
dead = false;
reset();
Symbol 458 MovieClip Frame 22
reset();
Symbol 458 MovieClip Frame 43
checkrot();
Symbol 458 MovieClip Frame 64
checkrot();
Symbol 458 MovieClip Frame 85
gotoAndStop (2);
reset();
Symbol 459 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 459 MovieClip Frame 2
reset();
Symbol 459 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 459 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 459 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 459 MovieClip Frame 46
gotoAndStop (2);
Symbol 460 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 460 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 460 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 460 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 461 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 461 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 461 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 461 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 462 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 462 MovieClip Frame 21
gotoAndPlay (1);
Symbol 462 MovieClip Frame 41
gotoAndPlay (1);
Symbol 462 MovieClip Frame 61
gotoAndPlay (1);
Symbol 462 MovieClip Frame 81
gotoAndPlay (1);
Symbol 462 MovieClip Frame 101
gotoAndPlay (1);
Symbol 462 MovieClip Frame 121
gotoAndPlay (1);
Symbol 470 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 470 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 470 MovieClip Frame 103
gotoAndPlay (2);
Symbol 471 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 471 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 471 MovieClip Frame 103
gotoAndPlay (2);
Symbol 472 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 472 MovieClip Frame 2
reset();
Symbol 472 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 472 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 472 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 472 MovieClip Frame 46
gotoAndStop (2);
Symbol 473 MovieClip Frame 1
type = "end";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 474 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 474 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 474 MovieClip Frame 103
gotoAndPlay (2);
Symbol 475 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 475 MovieClip Frame 2
reset();
Symbol 475 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 475 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 475 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 475 MovieClip Frame 46
gotoAndStop (2);
Symbol 477 MovieClip Frame 6
stop();
Symbol 478 MovieClip Frame 1
if (hitTest(_root.probe) && (_root.probe.die())) {
_parent.die();
}
Symbol 478 MovieClip Frame 2
gotoAndPlay (1);
Symbol 479 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "mine") || (type == "supershot")) || (shieldgone && (type == "bullet"))) {
die();
} else if (type == "bullet") {
body.shield.gotoAndStop("blank");
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
shieldgone = true;
_root.changepoints(10);
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
if (shieldgone) {
gotoAndPlay (48);
} else {
gotoAndPlay (29);
}
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
shieldgone = false;
Symbol 479 MovieClip Frame 9
reset();
Symbol 479 MovieClip Frame 28
reset();
Symbol 479 MovieClip Frame 47
reset();
Symbol 479 MovieClip Frame 57
reset();
Symbol 480 MovieClip Frame 1
type = "end";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 481 MovieClip Frame 1
function activate() {
var i = 0;
while (i < gateArray.length) {
_root[gateArray[i]].turngate();
i++;
}
}
type = "gateswitch";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 482 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 482 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 482 MovieClip Frame 103
gotoAndPlay (2);
Symbol 483 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 483 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 483 MovieClip Frame 103
gotoAndPlay (2);
Symbol 484 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 484 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 484 MovieClip Frame 103
gotoAndPlay (2);
Symbol 485 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:0, y:0};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (25 < dist) {
return(false);
}
return(true);
}
function turngate() {
rotnum = ((rotnum < (rotArray.length - 1)) ? (rotnum + 1) : 0);
dirdiff = rotArray[rotnum] - _rotation;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (12);
}
}
_root.addenemy(_name, this);
type = "gate";
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
var k = 0;
while (k < rotArray.length) {
if (rotArray[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
Symbol 485 MovieClip Frame 2
var fencedir = _root.getdir2(_rotation);
fence.pos = _root.getpos(_x + (50 * fencedir.dx), _y + (50 * fencedir.dy));
stop();
Symbol 485 MovieClip Frame 11
gotoAndStop (21);
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 485 MovieClip Frame 20
gotoAndStop (21);
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 486 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 486 MovieClip Frame 2
reset();
Symbol 486 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 486 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 486 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 486 MovieClip Frame 46
gotoAndStop (2);
Symbol 487 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "bullet") || (type == "mine")) || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (48);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
gotoAndPlay (29);
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
Symbol 487 MovieClip Frame 9
reset();
Symbol 487 MovieClip Frame 28
reset();
Symbol 487 MovieClip Frame 47
reset();
Symbol 488 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (15 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (47);
}
function getnewrot() {
rotnum = ((rotnum < (rotArr.length - 1)) ? (rotnum + 1) : 0);
return(rotArr[rotnum]);
}
function reset() {
if (!dead) {
rot = _rotation;
dirdiff = newrot - rot;
if (180 < dirdiff) {
dirdiff = dirdiff - 360;
} else if (dirdiff < -180) {
dirdiff = dirdiff + 360;
}
if (0 < dirdiff) {
gotoAndPlay (3);
} else if (dirdiff < 0) {
gotoAndPlay (10);
} else {
newrot = getnewrot();
gotoAndPlay (17);
}
} else {
gotoAndStop (47);
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
_rotation = (Math.round(_rotation / 90) * 90);
var k = 0;
while (k < rotArr.length) {
if (rotArr[k] == _rotation) {
rotnum = k;
break;
}
k++;
}
rot = _rotation;
newrot = _rotation;
dead = false;
Symbol 488 MovieClip Frame 2
reset();
Symbol 488 MovieClip Frame 9
_rotation = (_rotation + 90);
gotoAndStop (2);
Symbol 488 MovieClip Frame 16
_rotation = (_rotation - 90);
gotoAndStop (2);
Symbol 488 MovieClip Frame 22
num = _root.movieincr(1);
bulletdir = _root.getdir2(_rotation);
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * bulletdir.dx);
mc._y = _y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = _rotation - 90;
Symbol 488 MovieClip Frame 46
gotoAndStop (2);
Symbol 489 MovieClip Frame 1
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localtoGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (20 < dist) {
return(false);
}
if (((type == "mine") || (type == "supershot")) || (shieldgone && (type == "bullet"))) {
die();
} else if (type == "bullet") {
body.shield.gotoAndStop("blank");
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
shieldgone = true;
_root.changepoints(10);
}
return(true);
}
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function reset() {
if (!dead) {
_x = (_x + (50 * dir.dx));
_y = (_y + (50 * dir.dy));
pos.x = pos.x + dir.dx;
pos.y = pos.y + dir.dy;
newdir = _root.newdir(_name, dir, pos, {valley:true, hill:false, crater:false, ice:true, gateswitch:true, rock:false, end:true, start:true});
if ((newdir.dx != 0) || (newdir.dy != 0)) {
dir = newdir;
_rotation = _root.getrot(dir.dx, dir.dy);
if (shieldgone) {
gotoAndPlay (48);
} else {
gotoAndPlay (29);
}
} else {
gotoAndPlay (10);
}
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
shieldgone = false;
Symbol 489 MovieClip Frame 9
reset();
Symbol 489 MovieClip Frame 28
reset();
Symbol 489 MovieClip Frame 47
reset();
Symbol 489 MovieClip Frame 57
reset();
Symbol 490 MovieClip Frame 1
function die() {
if ((!dead) && (movedone)) {
attachMovie("explosion", "explosion", 1);
explosion._x = body._x;
explosion._y = body._y;
explosion._xscale = 150;
explosion._yscale = 150;
_root.game.playon = false;
dead = true;
gotoAndPlay (183);
return(true);
}
return(false);
}
function reset() {
moveon = true;
_x = (_x + (50 * dpos.dx));
_y = (_y + (50 * dpos.dy));
movedone = true;
if (dead) {
gotoAndPlay (183);
} else if (levelend) {
_root.endlevel();
gotoAndStop (183);
} else if (_root[(("grid" + pos.x) + ",") + pos.y].type == "end") {
_root.game.playon = false;
dirs = {right:0, up:1, left:2, down:3};
dirname = _root.getdirname(dir.dx, dir.dy);
dirdiff = dirs[_root[(("grid" + pos.x) + ",") + pos.y].dir] - dirs[dirname];
dirdiff = ((2 < Math.abs(dirdiff)) ? (-dirdiff) : (dirdiff));
if (dirdiff < 0) {
rotate("cw");
} else if (0 < dirdiff) {
rotate("ccw");
} else {
levelend = true;
gotoAndPlay("move " + dirname);
}
} else if ((((_root[(("grid" + pos.x) + ",") + pos.y].type == "ice") && ((dpos.dx != 0) || (dpos.dy != 0))) && (_root.checkpos(_name, pos.x + dpos.dx, pos.y + dpos.dy, terraintypes, true))) && (checkgates(pos.x + dpos.dx, pos.y + dpos.dy))) {
if (supertreads) {
supertreads = false;
} else {
moveon = false;
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
if ((dpos.dx != (-dir.dx)) || (dpos.dy != (-dir.dy))) {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
} else if ((_root[(("grid" + pos.x) + ",") + pos.y].type == "gateswitch") && ((dpos.dx != 0) || (dpos.dy != 0))) {
_root[(("grid" + pos.x) + ",") + pos.y].activate();
}
}
function checkgates(x, y) {
var bool = true;
for (j in /game/area/level:enemies) {
var mc = _root.game.area.level.enemies[j];
if (((mc.type == "gate") && (mc.pos.x == x)) && (mc.pos.y == y)) {
bool = false;
break;
}
}
return(bool);
}
function move(direction) {
if (moveon) {
dpos = ((direction == "forward") ? ({dx:dir.dx, dy:dir.dy}) : ({dx:-dir.dx, dy:-dir.dy}));
newpos = {x:pos.x + dpos.dx, y:pos.y + dpos.dy};
if (_root.checkpos(_name, newpos.x, newpos.y, terraintypes, true) && (checkgates(newpos.x, newpos.y))) {
moveon = false;
pos = newpos;
if (direction == "forward") {
gotoAndPlay("move " + _root.getdirname(dpos.dx, dpos.dy));
} else {
gotoAndPlay(("move " + _root.getdirname(dpos.dx, dpos.dy)) + " rev");
}
}
}
}
function rotate(direction) {
if (moveon) {
rotarr = ((direction == "cw") ? ({up:"right", right:"down", down:"left", left:"up"}) : ({up:"left", right:"up", down:"right", left:"down"}));
moveon = false;
dpos = {dx:0, dy:0};
dirname = _root.getdirname(dir.dx, dir.dy);
gotoAndPlay((dirname + " to ") + rotarr[dirname]);
dir = _root.getdir(rotarr[dirname]);
}
}
function keypressed(keynum) {
if (_root.game.playon && (moveon)) {
if (keynum == 39) {
rotate("cw");
} else if (keynum == 37) {
rotate("ccw");
} else if (keynum == 38) {
move("forward");
} else if (keynum == 40) {
move("backward");
} else if (keynum == 70) {
if (_root.changeammo(-1)) {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
}
} else if (keynum == 68) {
minelaid = true;
for (k in /levelfloor) {
if (((_root.levelfloor[k].type == "mine") && (_root.levelfloor[k]._x == _x)) && (_root.levelfloor[k]._y == _y)) {
minelaid = false;
break;
}
}
if (minelaid && (_root.changemines(-1))) {
dropmine.start();
num = _root.movieincr(1);
_root.levelfloor.attachMovie("mine", "mine" + num, num);
_root.levelfloor["mine" + num]._x = _x;
_root.levelfloor["mine" + num]._y = _y;
}
} else if (keynum == 83) {
var specialtype = _root.game.life.special.name;
if (specialtype == "supershot") {
turret.gotoAndPlay("fire");
num = _root.movieincr(1);
_root.leveltop.attachMovie("supershot", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = _x + (25 * dir.dx);
mc._y = _y + (25 * dir.dy);
mc.pos = {x:pos.x + dir.dx, y:pos.y + dir.dy};
mc.dir = {dx:dir.dx, dy:dir.dy};
mc._rotation = _root.getrot(dir.dx, dir.dy) - 90;
} else if (specialtype == "sonic drill") {
turret.gotoAndPlay("sonic drill");
mc = _root[(("grid" + (pos.x + dir.dx)) + ",") + (pos.y + dir.dy)];
if (mc.type == "rock") {
mc.explode();
}
} else if (specialtype == "nukes") {
num = _root.movieincr(1);
_root.leveltop.attachMovie("nuke", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = 75 + (50 * Math.round(7 * Math.random()));
mc._y = 75 + (50 * Math.round(3 * Math.random()));
} else if ((specialtype == "supertreads") && (!supertreads)) {
supertreads = true;
}
_root.game.life.special.fire();
}
}
}
movedone = true;
terraintypes = {valley:true, gateswitch:true, hill:false, crater:false, ice:true, rock:false, start:true, end:true};
dropmine = new Sound(this);
dropmine.attachSound("mine_sound");
dead = false;
supertreads = false;
levelend = false;
pos = _root.getpos(_x, _y);
dpos = _root.getdir(startdir);
dir = _root.getdir(startdir);
pos.x = pos.x + dpos.dx;
pos.y = pos.y + dpos.dy;
moveon = false;
gotoAndPlay("move " + startdir);
Instance of Symbol 123 MovieClip in Symbol 490 MovieClip Frame 1
onClipEvent (keyDown) {
_parent.keypressed(Key.getCode());
}
Symbol 490 MovieClip Frame 2
stop();
reset();
Symbol 490 MovieClip Frame 14
stop();
reset();
Symbol 490 MovieClip Frame 27
stop();
reset();
Symbol 490 MovieClip Frame 38
stop();
reset();
Symbol 490 MovieClip Frame 49
gotoAndStop (2);
Symbol 490 MovieClip Frame 58
gotoAndStop (27);
Symbol 490 MovieClip Frame 67
gotoAndStop (14);
Symbol 490 MovieClip Frame 76
gotoAndStop (2);
Symbol 490 MovieClip Frame 85
gotoAndStop (38);
Symbol 490 MovieClip Frame 97
movedone = false;
gotoAndStop (38);
Symbol 490 MovieClip Frame 109
movedone = false;
gotoAndStop (2);
Symbol 490 MovieClip Frame 121
movedone = false;
gotoAndStop (14);
Symbol 490 MovieClip Frame 133
movedone = false;
gotoAndStop (27);
Symbol 490 MovieClip Frame 145
movedone = false;
gotoAndStop (14);
Symbol 490 MovieClip Frame 157
movedone = false;
gotoAndStop (27);
Symbol 490 MovieClip Frame 169
movedone = false;
gotoAndStop (38);
Symbol 490 MovieClip Frame 181
movedone = false;
gotoAndStop (2);
Symbol 490 MovieClip Frame 206
stop();
_root.endlife();
Symbol 492 MovieClip Frame 1
type = "hill";
pos = _root.getpos(_x, _y);
_name = ((("grid" + pos.x) + ",") + pos.y);
Symbol 493 MovieClip Frame 1
gotoAndPlay(offset + 2);
Instance of Symbol 469 MovieClip in Symbol 493 MovieClip Frame 55
onClipEvent (enterFrame) {
if (hitTest(_root.probe)) {
_root.probe.die();
}
}
Symbol 493 MovieClip Frame 103
gotoAndPlay (2);
Symbol 494 MovieClip Frame 1
function die() {
dead = true;
attachMovie("explosion", "explosion", 1);
explosion._x = 0;
explosion._y = 0;
_root.changepoints(100);
if (bonus != "none") {
bonusnum = _root.movieincr(1);
_root.levelfloor.attachMovie("bonus", "bonus" + bonusnum, bonusnum);
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
_root.levelfloor["bonus" + bonusnum]._x = bodypoint.x;
_root.levelfloor["bonus" + bonusnum]._y = bodypoint.y;
_root.levelfloor["bonus" + bonusnum].type = bonus;
}
for (k in drones) {
if (typeof(drones[k]) == "movieclip") {
drones[k].die();
}
}
_root.deleteenemy(_name);
gotoAndStop (58);
}
function hit(x, y, type) {
bodypoint = {x:body._x, y:body._y};
localToGlobal(bodypoint);
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if (24 < dist) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function reset() {
if ((!dead) && (numdrones < 3)) {
drones.attachMovie("drone", "drone" + movienum, movienum);
mc = drones["drone" + movienum];
mc._x = 0;
mc._y = 0;
bonusnum = 0;
bonusArr = new Array("none", "none", "ammo", "ammo", "mines");
do {
bonusnum = Math.floor(Math.random() * bonusArr.length);
} while (bonusnum == bonusArr.length);
mc.bonus = bonusArr[bonusnum];
numdrones++;
movienum++;
}
}
pos = _root.getpos(_x, _y);
dir = {dx:0, dy:0};
_root.addenemy(_name, this);
dead = false;
numdrones = 0;
movienum = 0;
Instance of Symbol 426 MovieClip "body" in Symbol 494 MovieClip Frame 1
onClipEvent (load) {
if (hitTest(_root.probe) && (!_root.probe.dead)) {
_root.probe.die();
_parent.die();
}
}
Symbol 494 MovieClip Frame 2
reset();
Symbol 494 MovieClip Frame 57
gotoAndPlay (2);
Symbol 495 MovieClip Frame 1
gotoAndPlay(("area" + areanum) + "trail");
Symbol 495 MovieClip Frame 21
gotoAndPlay (1);
Symbol 495 MovieClip Frame 41
gotoAndPlay (1);
Symbol 495 MovieClip Frame 61
gotoAndPlay (1);
Symbol 495 MovieClip Frame 81
gotoAndPlay (1);
Symbol 495 MovieClip Frame 101
gotoAndPlay (1);
Symbol 495 MovieClip Frame 121
gotoAndPlay (1);
Symbol 502 MovieClip Frame 1
function hit(x, y, type) {
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if ((20 < dist) || (dead)) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
if (!dead) {
dead = true;
_parent.hit();
_root.changepoints(100);
gotoAndPlay (71);
}
}
function reset() {
if (!dead) {
gotoAndPlay (2);
} else {
gotoAndStop (84);
}
}
type = "gate";
bodypoint = {x:0, y:0};
localToGlobal(bodypoint);
pos = _root.getpos(bodypoint.x, bodypoint.y);
dir = {dx:0, dy:0};
_root.addenemy(_parent._name + _name, this);
_rotation = (Math.round(_rotation / 90) * 90);
dead = false;
reset();
Symbol 502 MovieClip Frame 12
num = _root.movieincr(1);
bulletdir = {dx:-1, dy:0};
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = bodypoint.x + (25 * bulletdir.dx);
mc._y = bodypoint.y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = 180;
Symbol 502 MovieClip Frame 70
reset();
Symbol 502 MovieClip Frame 84
stop();
Symbol 503 MovieClip Frame 1
function hit(x, y, type) {
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if ((20 < dist) || (dead)) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
if (!dead) {
dead = true;
_parent.hit();
_root.changepoints(100);
gotoAndPlay (71);
}
}
function reset() {
if (!dead) {
gotoAndPlay (2);
} else {
gotoAndStop (84);
}
}
type = "gate";
bodypoint = {x:0, y:0};
localToGlobal(bodypoint);
pos = _root.getpos(bodypoint.x, bodypoint.y);
dir = {dx:0, dy:0};
_root.addenemy(_parent._name + _name, this);
_rotation = (Math.round(_rotation / 90) * 90);
dead = false;
reset();
Symbol 503 MovieClip Frame 12
num = _root.movieincr(1);
bulletdir = {dx:-1, dy:0};
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = bodypoint.x + (25 * bulletdir.dx);
mc._y = bodypoint.y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = 180;
Symbol 503 MovieClip Frame 70
reset();
Symbol 503 MovieClip Frame 84
stop();
Symbol 506 MovieClip Frame 1
function hit(x, y, type) {
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if ((20 < dist) || (dead)) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
if (!dead) {
dead = true;
_parent.hit();
_root.changepoints(100);
gotoAndPlay (71);
}
}
function reset() {
if (!dead) {
gotoAndPlay (2);
} else {
gotoAndStop (84);
}
}
type = "gate";
bodypoint = {x:0, y:0};
localToGlobal(bodypoint);
pos = _root.getpos(bodypoint.x, bodypoint.y);
dir = {dx:0, dy:0};
_root.addenemy(_parent._name + _name, this);
_rotation = (Math.round(_rotation / 90) * 90);
dead = false;
if (stallcount == 0) {
reset();
} else if (stallcount == 1) {
gotoAndPlay (57);
} else {
gotoAndPlay (45);
}
Symbol 506 MovieClip Frame 12
num = _root.movieincr(1);
bulletdir = {dx:-1, dy:0};
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = bodypoint.x + (25 * bulletdir.dx);
mc._y = bodypoint.y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = 180;
Symbol 506 MovieClip Frame 70
reset();
Symbol 506 MovieClip Frame 84
stop();
Symbol 507 MovieClip Frame 1
function hit(x, y, type) {
dist = Math.sqrt(((x - bodypoint.x) * (x - bodypoint.x)) + ((y - bodypoint.y) * (y - bodypoint.y)));
if ((20 < dist) || (dead)) {
return(false);
}
if ((type == "bullet") || (type == "supershot")) {
die();
}
return(true);
}
function die() {
if (!dead) {
dead = true;
_parent.hit();
_root.changepoints(100);
gotoAndPlay (71);
}
}
function reset() {
if (!dead) {
gotoAndPlay (2);
} else {
gotoAndStop (84);
}
}
type = "gate";
bodypoint = {x:0, y:0};
localToGlobal(bodypoint);
pos = _root.getpos(bodypoint.x, bodypoint.y);
dir = {dx:0, dy:0};
_root.addenemy(_parent._name + _name, this);
_rotation = (Math.round(_rotation / 90) * 90);
dead = false;
if (stallcount == 0) {
reset();
} else if (stallcount == 1) {
gotoAndPlay (57);
} else {
gotoAndPlay (45);
}
Symbol 507 MovieClip Frame 12
num = _root.movieincr(1);
bulletdir = {dx:-1, dy:0};
_root.leveltop.attachMovie("gun turret bullet", "weapon" + num, num);
mc = _root.leveltop["weapon" + num];
mc._x = bodypoint.x + (25 * bulletdir.dx);
mc._y = bodypoint.y + (25 * bulletdir.dy);
mc.pos = {x:pos.x + bulletdir.dx, y:pos.y + bulletdir.dy};
mc.dir = bulletdir;
mc._rotation = 180;
Symbol 507 MovieClip Frame 70
reset();
Symbol 507 MovieClip Frame 84
stop();
Symbol 510 MovieClip Frame 1
function hit() {
if (0 >= hitsleft) {
_root.gotoAndPlay("level 6-1 clear");
gotoAndPlay (2);
} else {
hitsleft--;
}
}
stop();
hitsleft = 5;
Instance of Symbol 506 MovieClip "gun2" in Symbol 510 MovieClip Frame 1
onClipEvent (load) {
stallcount = 1;
}
Instance of Symbol 507 MovieClip "gun1" in Symbol 510 MovieClip Frame 1
onClipEvent (load) {
stallcount = 2;
}
Instance of Symbol 506 MovieClip "gun5" in Symbol 510 MovieClip Frame 1
onClipEvent (load) {
stallcount = 1;
}
Instance of Symbol 507 MovieClip "gun6" in Symbol 510 MovieClip Frame 1
onClipEvent (load) {
stallcount = 2;
}
Symbol 510 MovieClip Frame 34
stop();
Symbol 511 Button
on (release) {
gotoAndStop (12);
}