Frame 1
function saveData() {
trace("Saving Data");
myLocalSO.data.place_score_1 = place_score_1;
myLocalSO.data.place_score_2 = place_score_2;
myLocalSO.data.place_score_3 = place_score_3;
myLocalSO.data.place_name_1 = place_name_1;
myLocalSO.data.place_name_2 = place_name_2;
myLocalSO.data.place_name_3 = place_name_3;
myLocalSO.data.player_name = player_name;
myLocalSO.data.highScoreColor = highScoreColor;
}
function increaseScore(amt, x, y) {
_root.g_lvl_kills++;
_root.score = _root.score + amt;
}
function gameOver() {
return(_root.hero.hp <= 0);
}
function endGame() {
_root.paused = true;
updatedTopScores();
openGameOver();
}
function updatedTopScores() {
if (score > place_score_1) {
place_score_3 = place_score_2;
place_score_2 = place_score_1;
place_score_1 = score;
place_name_3 = place_name_2;
place_name_2 = place_name_1;
place_name_1 = player_name;
_root.end_text = "New high score! 1st Place";
} else if (score > place_score_2) {
place_score_3 = place_score_2;
place_score_2 = score;
place_name_3 = place_name_2;
place_name_2 = player_name;
_root.end_text = "New high score! 2nd Place";
} else if (score > place_score_3) {
place_score_3 = score;
place_name_3 = player_name;
_root.end_text = "New high score! 3rd Place";
} else if (score > 1000) {
_root.end_text = "Nice shooting.";
} else if (score > 700) {
_root.end_text = "Not bad. Keep Practicing";
} else if (score > 400) {
_root.end_text = "Ouch... better luck next time.";
} else {
_root.end_text = "Noob Tip: use mouse-left click to fire :P";
}
saveData();
}
function restartGame() {
cleanGameboard();
resetGame();
}
function cleanGameboard() {
for (i in enemies) {
enemies[i].unloadMovie();
}
enemies = new Array();
}
function resetGame() {
game_ended = false;
_root.level_ticker = 0;
_root.fps_ticks = 0;
_root.fps_total = 0;
_root.avg_fps = 0;
_root.max_fps = 0;
_root.min_fps = 9999;
_root.stepper.resetStepperVars();
_root.hero._alpha = 100;
_root.hero.hp = 100;
_root.hero.vx = 0;
_root.hero.vy = 0;
_root.score = 0;
_root.level = 1;
_root.ammo_grenades = 15;
_root.ammo_arrows = 25;
_root.ammo_bullets = 500;
_root.ammo_rockets = 10;
_root.ammo_prox_mines = 20;
_root.hero._x = (_root.g_width / 2) - 20;
_root.hero._y = _root.g_ground / 2;
_root.paused = false;
}
function showTopScores() {
paused = true;
temp = _root.upgrade_layer.attachMovie("top_scores", "top_scores_" + SCORES, SCORES);
temp._x = g_width / 2;
temp._y = g_ground / 2;
top_scores_screen = temp;
}
function showLevelDisplay() {
temp = _root.upgrade_layer.attachMovie("level_display", "level_display_" + LEVEL_DISPLAY, LEVEL_DISPLAY);
temp._x = g_width / 2;
temp._y = g_ground / 2;
}
function closeTopScores() {
top_scores_screen.unloadMovie();
}
function openNamer() {
trace("opening namer");
paused = true;
temp = _root.upgrade_layer.attachMovie("namer_screen", "namer" + NAMER, NAMER);
temp._x = g_width / 2;
temp._y = g_ground * 0.75;
namer_screen = temp;
}
function closeNamer() {
namer_screen.unloadMovie();
}
function openGameOver() {
trace("opening gameOver screen");
temp = _root.upgrade_layer.attachMovie("game_over_screen", "game_over_screen" + GAMEOVER_NUM, GAMEOVER_NUM);
temp._x = g_width / 2;
temp._y = g_ground / 2;
game_over_screen = temp;
}
function closeGameOver() {
game_over_screen.unloadMovie();
}
function openHelp() {
trace("opening help");
paused = true;
temp = _root.upgrade_layer.attachMovie("help_screen", "help_screen" + HELP_NUM, HELP_NUM);
temp._x = g_width / 2;
temp._y = g_ground / 2;
help_screen = temp;
}
function closeHelp() {
trace("closing help");
help_screen.unloadMovie();
}
function playHitEnemySound() {
playSound(hurtsounds[random(3)]);
}
function addRandomGoodie(x, y) {
bonus = powerups[random(powerups.length)];
if (bonus == "gas_can") {
obs = _root.addObj(bonus, _root.obstruct_layer, _root.getNextObstructionLevel());
obs._x = x;
obs._y = y;
} else {
obs = _root.addObj(bonus, _root.powerup_layer, _root.getNextPowerUpLevel());
obs._x = x;
obs._y = y;
}
}
function playSound(filename) {
mysound = new Sound();
mysound.attachSound(filename);
mysound.start(0, 1);
}
function shootArrow() {
ammo_arrows--;
_root.hero.sight.rifle_invert._x = _root.hero.sight.rifle_invert._x - 3;
_root.hero.sight.rifle._x = _root.hero.sight.rifle._x - 3;
dx = _root.hero._x - _root.bow_string._x;
dy = _root.hero._y - _root.bow_string._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
dist = dist * 0.08;
if (dist > 7) {
dist = 7;
}
power = -dist;
rads = ((_root.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _root.power * Math.cos(rads);
lvy = _root.power * Math.sin(rads);
lvl = getNextProjectileLevel();
proj = _root.addObj("hero_arrow", _root.projectile_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = (hero._x + hero.sight._x) + (lvx * 3);
proj._y = (hero._y + hero.sight._y) + (lvy * 3);
proj._rotation = _root.hero.sight._rotation;
}
function placeDebrisArrow(x, y, rot) {
temp = _root.addObj("arrow_debris", _root.debris_layer, _root.getNextDebrisLevel());
temp._x = x;
temp._y = y;
temp._rotation = rot;
}
function removeEnemy(ene) {
tempArray = new Array();
for (i in enemies) {
nextEn = enemies[i];
if (ene != nextEn) {
tempArray.push(nextEn);
}
}
ene.unloadMovie();
enemies = tempArray;
}
function removeMine(mi) {
tempArray = new Array();
for (i in mines) {
nextObj = mines[i];
if (mi != nextObj) {
tempArray.push(nextObj);
}
}
mi.unloadMovie();
mines = tempArray;
}
function removeObstruction(obs) {
tempArray = new Array();
for (i in obstructions) {
nextObs = obstructions[i];
if (obs != nextObs) {
tempArray.push(nextObs);
}
}
obs.unloadMovie();
obstructions = tempArray;
}
function shootHeroProjectile() {
playSound("tat2.wav");
ammo_bullets--;
_root.hero.sight.rifle_invert._x = _root.hero.sight.rifle_invert._x - 3;
_root.hero.sight.rifle._x = _root.hero.sight.rifle._x - 3;
shot_speed = 8;
variation = (random(Math.floor(_root.gun_wild * 100)) - random(Math.floor(_root.gun_wild * 100))) / 300;
trace(variation);
rads = ((_root.hero.sight._rotation + variation) * Math.PI) / 180;
xfactor = Math.cos(rads);
yfactor = Math.sin(rads);
lvx = _root.shot_speed * xfactor;
lvy = _root.shot_speed * yfactor;
lvl = getNextProjectileLevel();
proj = _root.addObj("hero_bullet", _root.projectile_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = (hero._x + hero.sight._x) + (xfactor * 20);
proj._y = (hero._y + hero.sight._y) + (yfactor * 20);
proj._rotation = _root.hero.sight._rotation;
}
function shootHeroRocket() {
playSound("shoot_rocket.wav");
rocket_smoke = 105;
rocket_flame = 130;
ammo_rockets--;
targ_ene = null;
targ_acq = false;
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_xmouse, _ymouse, 0)) {
targ_ene = _root.enemies[i];
targ_acq = true;
break;
}
}
_root.hero.sight.rifle_invert._x = _root.hero.sight.rifle_invert._x - 5;
_root.hero.sight.rifle._x = _root.hero.sight.rifle._x - 5;
shot_speed = 6;
rads = (_root.hero.sight._rotation * Math.PI) / 180;
lvx = _root.shot_speed * Math.cos(rads);
lvy = _root.shot_speed * Math.sin(rads);
lvl = getNextRocketLevel();
proj = _root.addObj("missile", _root.rocket_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = (hero._x + hero.sight._x) + (lvx * 1);
proj._y = (hero._y + hero.sight._y) + (lvy * 1);
proj._rotation = _root.hero.sight._rotation;
proj.target_enemy = targ_ene;
proj.target_acquired = targ_acq;
}
function shootGrenade() {
ammo_grenades--;
shot_speed = 4;
variation = 0;
rads = ((_root.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _root.shot_speed * Math.cos(rads);
lvy = _root.shot_speed * Math.sin(rads);
lvl = getNextProjectileLevel();
proj = _root.addObj("hero_grenade", _root.projectile_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = ((hero._x + hero.sight._x) + lvx) + _root.hero.vx;
proj._y = ((hero._y + hero.sight._y) + lvy) + _root.hero.vy;
}
function shootProximityMine() {
ammo_prox_mines--;
shot_speed = 4;
variation = 0;
rads = ((_root.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _root.shot_speed * Math.cos(rads);
lvy = _root.shot_speed * Math.sin(rads);
lvl = getNextMineLevel();
proj = _root.addObj("proximity_mine", _root.mine_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = ((hero._x + hero.sight._x) + lvx) + _root.hero.vx;
proj._y = ((hero._y + hero.sight._y) + lvy) + _root.hero.vy;
mines.push(proj);
}
function placeBlood(x, y) {
if (_root.age >= 17) {
playSound("blood_splat.wav");
lvl = getNextCraterLevel();
temp = _root.addObj("crater2", _root.ground.crater_layer, lvl);
temp._x = x;
temp._y = y;
temp._rotation = random(360);
}
}
function placeDeadBody(btype, x, y, vx) {
lvl = getNextDebrisLevel();
temp = _root.addObj(btype, _root.debris_layer, lvl);
temp._x = x;
temp._y = y;
if (vx > 0) {
temp._xscale = -100;
}
}
function placeEnemy(etype, x, y, vx, vy) {
trace("Placing enemy specific location!!!!!!!");
lvl = getNextEnemyLevel();
temp = _root.addObj(etype, _root.enemy_layer, lvl);
temp._x = x;
temp._y = y;
temp.vx = vx;
temp.vy = vy;
enemies.push(temp);
_root.enemy_count = _root.enemies.length;
return(temp);
}
function getNextMineLevel() {
if ((mine_lvl++) > 15) {
mine_lvl = 1;
}
return(mine_lvl);
}
function getNextRocketLevel() {
if ((rocket_lvl++) > 6) {
rocket_lvl = 1;
}
return(rocket_lvl);
}
function getNextProjectileLevel() {
if ((proj_lvl++) > 15) {
proj_lvl = 1;
}
return(proj_lvl);
}
function getNextPowerUpLevel() {
if ((powerup_lvl++) > 5) {
powerup_lvl = 1;
}
return(powerup_lvl);
}
function getNextObstructionLevel() {
if ((obs_lvl++) > 10) {
obs_lvl = 1;
}
return(obs_lvl);
}
function getNextDebrisLevel() {
if ((debris_lvl++) > 20) {
debris_lvl = 1;
}
return(debris_lvl);
}
function getNextBombLevel() {
if ((bomb_lvl++) > 10) {
bomb_lvl = 1;
}
return(bomb_lvl);
}
function getNextBloodLevel() {
if ((b_drop_lvl++) > 15) {
b_drop_lvl = 1;
}
return(b_drop_lvl);
}
function getNextSmokeLevel() {
if ((smoke_lvl++) > 50) {
smoke_lvl = 1;
}
return(smoke_lvl);
}
function getNextCraterLevel() {
if ((crater_lvl++) > 6) {
crater_lvl = 1;
}
return(crater_lvl);
}
function getNextEnemyLevel() {
if ((enemy_lvl++) > 40) {
enemy_lvl = 1;
}
return(enemy_lvl);
}
function getNextEnemyBulletLevel() {
if ((enemy_bullet_lvl++) > 15) {
enemy_bullet_lvl = 1;
}
return(enemy_bullet_lvl);
}
function placeSmoke(x, y) {
lvl = getNextSmokeLevel();
temp = _root.addObj("smoke", _root.smoke_layer, lvl);
temp._x = x;
temp._y = y;
}
function addGrenadeExplosion(x, y) {
dmg = 10;
radius = 60;
addExplosion(x, y, radius, dmg);
}
function getDist(x1, y1, x2, y2) {
dx = x1 - x2;
dy = y1 - y2;
return(Math.sqrt((dx * dx) + (dy * dy)));
}
function addExplosion(x, y, radius, dmg) {
playSound("bomb_hit.wav");
lvl = getNextCraterLevel();
temp = _root.addObj("crater1", _root.ground.crater_layer, lvl);
temp._x = x;
temp._y = y;
temp._rotation = random(360);
lvl = getNextDebrisLevel();
temp = _root.addObj("explosion", _root.debris_layer, lvl);
temp._x = x;
temp._y = y;
temp._xscale = (temp._yscale = radius);
deb = Math.ceil(radius / 20);
i = 0;
while (i < deb) {
lvl = getNextDebrisLevel();
temp = _root.addObj("debris1", _root.debris_layer, lvl);
temp._x = x;
temp._y = y;
temp.vx = (random(100) - random(100)) / 50;
temp.vy = ((-random(100)) / 50) - 2;
i++;
}
for (i in _root.enemies) {
ene = enemies[i];
dx = ene._x - x;
dy = (ene._y - 20) - y;
dist = getDist(x, y, ene._x, ene._y - 25);
if (dist < radius) {
ene.deathCode = "exploded";
impact = Math.ceil((dmg * (radius - dist)) / radius);
ene.explosion_impact = impact;
ene.explosion_dx = (((-dx) / dist) * impact) * 0.4;
ene.explosion_dy = (((-dy) / dist) * impact) * 0.4;
ene.takeDamage(impact, ene._x, ene._y, vx, vy);
}
}
for (i in _root.obstructions) {
obs = obstructions[i];
dist = getDist(x, y, obs._x, obs._y);
if (dist < radius) {
obs.leaking = obs.leaking + (random(10) / 10);
obs.deathCode = "exploded";
obs.explosion_dist = -dx;
}
}
for (i in _root.mines) {
obs = mines[i];
dist = getDist(x, y, obs._x, obs._y);
if (dist < radius) {
obs.leaking = obs.leaking + (2 + (random(10) / 10));
obs.deathCode = "exploded";
}
}
dx = _root.hero._x - x;
dy = (_root.hero._y - 20) - y;
dist = getDist(x, y, _root.hero._x, _root.hero._y - 20);
if (dist < radius) {
_root.hero._y = _root.hero._y - 2;
impact = Math.ceil((dmg * (radius - dist)) / radius);
fly = impact;
if (impact > 15) {
fly = 15;
}
_root.hero.vx = (((-dx) / dist) * fly) * 0.33;
_root.hero.vy = (((-dy) / dist) * fly) * 0.33;
_root.addBloodExplosion(_root.hero._x, _root.hero._y - 20);
_root.hero.takeDamage(impact);
}
}
function addBloodExplosion(x, y) {
if (_root.age >= 17) {
placeBlood(x, y + 20);
c = 0;
while (c < 10) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
dx = (random(10) - random(10)) + 1;
dy = (random(10) - random(10)) + 1;
dist = Math.sqrt((dx * dx) + (dy * dy));
power = (random(150) + 25) / 50;
blood._x = x;
blood._y = y;
blood.vx = (dx / dist) * power;
blood.vy = (dy / dist) * power;
blood._xscale = (blood._yscale = 200 + random(200));
c++;
}
}
}
function addBloodyStump(x, y, vx, vy) {
lvl = getNextDebrisLevel();
temp = _root.addObj("blood_stump", _root.debris_layer, lvl);
temp._x = x;
temp._y = y;
temp.vx = vx;
temp.vy = vy;
}
function addFemBloodyStump(x, y, vx, vy) {
lvl = getNextDebrisLevel();
temp = _root.addObj("blood_stump_fem", _root.debris_layer, lvl);
temp._x = x;
temp._y = y;
temp.vx = vx;
temp.vy = vy;
}
function addObj(obj, layer, lvl) {
temp = layer.attachMovie(obj, (obj + "_id_") + lvl, lvl);
return(temp);
}
KEY_W = 87;
KEY_E = 69;
KEY_Q = 81;
KEY_A = 65;
KEY_S = 83;
KEY_D = 68;
KEY_X = 67;
KEY_C = 88;
KEY_J = 74;
KEY_K = 75;
KEY_L = 76;
KEY_U = 85;
KEY_UP = 38;
KEY_RIGHT = 39;
KEY_DOWN = 40;
KEY_LEFT = 37;
KEY_R = 82;
KEY_SPACEBAR = 32;
KEY_LEFTCONTROL = 17;
g_width = 728;
g_ground = 400;
paused = false;
_root.age = 2;
end_text = "Nice shooting!";
LEVEL_DISPLAY = 7;
HELP_NUM = 6;
SCORES = 4;
NAMER = 5;
GAMEOVER_NUM = 3;
UG_LAYER = 1;
top_scores_screen = null;
help_screen = null;
namer_screen = null;
game_over_screen1 = null;
_root.place_score_1 = 300;
_root.place_score_2 = 200;
_root.place_score_3 = 100;
_root.place_name_1 = "Jax";
_root.place_name_2 = "Matrox";
_root.place_name_3 = "Razor";
_root.player_name = "noob";
myLocalSO = sharedobject.getLocal("gm02");
if (myLocalSO.data.place_score_1 != null) {
trace("Shared Object Data Found... loading data");
place_score_1 = myLocalSO.data.highScore;
_root.place_score_1 = myLocalSO.data.place_score_1;
_root.place_score_2 = myLocalSO.data.place_score_2;
_root.place_score_3 = myLocalSO.data.place_score_3;
_root.place_name_1 = myLocalSO.data.place_name_1;
_root.place_name_2 = myLocalSO.data.place_name_2;
_root.place_name_3 = myLocalSO.data.place_name_3;
_root.player_name = myLocalSO.data.player_name;
paused = false;
} else {
trace("no object found... loading default data");
_root.first_time_playing = true;
_root.place_score_1 = 300;
_root.place_score_2 = 200;
_root.place_score_3 = 100;
_root.place_name_1 = "Jax";
_root.place_name_2 = "Matrox";
_root.place_name_3 = "Razor";
_root.player_name = "noob";
_root.paused = true;
openNamer();
openHelp();
}
g_lvl_kills = 0;
ammo_grenades = 15;
ammo_arrows = 25;
ammo_bullets = 500;
ammo_rockets = 10;
ammo_prox_mines = 20;
score = 0;
level = 1;
game_ended = false;
resetGame();
gravity = 0.05;
gun_wild = 0;
aim_rate = 0;
shooting_mode = "gun";
obstructions = new Array();
structures = new Array();
mines = new Array();
max_enemies_on_screen = 4;
enemy_count = 0;
rocket_smoke = 0;
rocket_flame = 0;
last_throw = false;
enemies = new Array();
someListener = new Object();
someListener.onMouseDown = function () {
_root.firing = true;
};
Mouse.addListener(someListener);
someListener2 = new Object();
someListener2.onMouseUp = function () {
_root.firing = false;
};
Mouse.addListener(someListener2);
powerups = new Array("ammo_health", "gas_can", "ammo_gun", "ammo_arrow", "ammo_grenade", "ammo_rocket", "ammo_prox_mine");
hurtsounds = new Array("oreh.wav", "uh.wav", "oof.wav");
mine_lvl = 1;
rocket_lvl = 1;
proj_lvl = 1;
powerup_lvl = 1;
obs_lvl = 1;
debris_lvl = 1;
bomb_lvl = 1;
b_drop_lvl = 1;
smoke_lvl = 1;
crater_lvl = 1;
enemy_lvl = 1;
enemy_bullet_lvl = 1;
Instance of Symbol 359 MovieClip "bow_string" in Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "bow") {
if (_root.holding_string) {
_x = _root._xmouse;
_y = _root._ymouse;
} else {
_x = _root.hero._x;
_y = (_root.hero._y - 10);
}
} else {
_x = -999;
}
}
Instance of Symbol 336 MovieClip [debris1] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 335 MovieClip [blood_stump] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 330 MovieClip [hero_arrow] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 329 MovieClip [enemy_bullet] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 326 MovieClip [missile] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 415 MovieClip in Frame 1
onClipEvent (enterFrame) {
frame = 1;
if (_root.hero.hp < 0) {
frame = 100;
} else {
frame = (100 - _root.hero.hp) + 1;
}
gotoAndStop(frame);
}
Instance of Symbol 456 MovieClip in Frame 1
onClipEvent (load) {
midx = _root.g_width / 2;
midy = _root.g_ground / 2;
}
onClipEvent (enterFrame) {
if (_root.paused) {
_x = midx;
_y = midy;
} else {
_x = -999;
}
}
Instance of Symbol 325 MovieClip [game_over_screen] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 307 MovieClip [help_screen] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 285 MovieClip [namer_screen] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 280 MovieClip [top_scores] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 476 MovieClip "stepper" in Frame 1
onClipEvent (load) {
function getNextEnemy() {
lvl = (_root.level - 1) % game_levels.length;
game_set = game_levels[lvl];
return(game_set[random(game_set.length)]);
}
function resetStepperVars() {
timeToNextEnemy = 100 + random(100);
timeToNextBomber = 200 + random(100);
timeToNextChopper = 300 + random(100);
timeToNextSniper = 400 + random(100);
wave_count = 0;
bomber_wave_count = 0;
chopper_wave_count = 0;
sniper_wave_count = 0;
timeToNextDrop = 0;
}
timeToNextEnemy = 0;
timeToNextBomber = 0;
timeToNextChopper = 0;
timeToNextSniper = 0;
sniper_wave_count = 0;
wave_count = 0;
bomber_wave_count = 0;
chopper_wave_count = 0;
level01 = new Array("enemy1");
level02 = new Array();
i = 0;
while (i < 80) {
level02.push("enemy1");
i++;
}
i = 0;
while (i < 10) {
level02.push("enemy_drop");
i++;
}
i = 0;
while (i < 8) {
level02.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level02.push("enemy_bomber");
i++;
}
level03 = new Array();
i = 0;
while (i < 70) {
level03.push("enemy1");
i++;
}
i = 0;
while (i < 20) {
level03.push("enemy_drop");
i++;
}
i = 0;
while (i < 8) {
level03.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level03.push("enemy_bomber");
i++;
}
level04 = new Array();
i = 0;
while (i < 60) {
level04.push("enemy1");
i++;
}
i = 0;
while (i < 30) {
level04.push("enemy_drop");
i++;
}
i = 0;
while (i < 20) {
level04.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 10) {
level04.push("enemy_chopper");
i++;
}
i = 0;
while (i < 5) {
level04.push("enemy_bomber");
i++;
}
level05 = new Array();
i = 0;
while (i < 6) {
level05.push("enemy1");
i++;
}
i = 0;
while (i < 6) {
level05.push("enemy_drop");
i++;
}
i = 0;
while (i < 3) {
level05.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 2) {
level05.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level05.push("enemy_bomber");
i++;
}
level06 = new Array();
i = 0;
while (i < 3) {
level06.push("enemy1");
i++;
}
i = 0;
while (i < 10) {
level06.push("enemy_drop");
i++;
}
i = 0;
while (i < 5) {
level06.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 2) {
level06.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level06.push("enemy_bomber");
i++;
}
level07 = new Array();
i = 0;
while (i < 2) {
level07.push("enemy1");
i++;
}
i = 0;
while (i < 10) {
level07.push("enemy_drop");
i++;
}
i = 0;
while (i < 10) {
level07.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 5) {
level07.push("enemy_chopper");
i++;
}
i = 0;
while (i < 3) {
level07.push("enemy_bomber");
i++;
}
level08 = new Array();
i = 0;
while (i < 1) {
level08.push("enemy1");
i++;
}
i = 0;
while (i < 1) {
level08.push("enemy_drop");
i++;
}
i = 0;
while (i < 1) {
level08.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 5) {
level08.push("enemy_chopper");
i++;
}
i = 0;
while (i < 2) {
level08.push("enemy_bomber");
i++;
}
level09 = new Array();
i = 0;
while (i < 1) {
level09.push("enemy1");
i++;
}
i = 0;
while (i < 1) {
level09.push("enemy_drop");
i++;
}
i = 0;
while (i < 1) {
level09.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 6) {
level09.push("enemy_chopper");
i++;
}
i = 0;
while (i < 3) {
level09.push("enemy_bomber");
i++;
}
level10 = new Array();
i = 0;
while (i < 1) {
level10.push("enemy1");
i++;
}
i = 0;
while (i < 1) {
level10.push("enemy_drop");
i++;
}
i = 0;
while (i < 1) {
level10.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 6) {
level10.push("enemy_chopper");
i++;
}
i = 0;
while (i < 5) {
level10.push("enemy_bomber");
i++;
}
level11 = new Array();
i = 0;
while (i < 1) {
level11.push("enemy1");
i++;
}
i = 0;
while (i < 1) {
level11.push("enemy_drop");
i++;
}
i = 0;
while (i < 1) {
level11.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level11.push("enemy_chopper");
i++;
}
i = 0;
while (i < 5) {
level11.push("enemy_bomber");
i++;
}
level12 = new Array();
i = 0;
while (i < 0) {
level12.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level12.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level12.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 0) {
level12.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level12.push("enemy_bomber");
i++;
}
level13 = new Array();
i = 0;
while (i < 0) {
level13.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level13.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level13.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level13.push("enemy_chopper");
i++;
}
i = 0;
while (i < 0) {
level13.push("enemy_bomber");
i++;
}
level14 = new Array();
i = 0;
while (i < 1) {
level14.push("enemy1");
i++;
}
i = 0;
while (i < 1) {
level14.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level14.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 0) {
level14.push("enemy_chopper");
i++;
}
i = 0;
while (i < 0) {
level14.push("enemy_bomber");
i++;
}
level15 = new Array();
i = 0;
while (i < 0) {
level15.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level15.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level15.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level15.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level15.push("enemy_bomber");
i++;
}
level16 = new Array();
i = 0;
while (i < 1) {
level16.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level16.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level16.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 0) {
level16.push("enemy_chopper");
i++;
}
i = 0;
while (i < 0) {
level16.push("enemy_bomber");
i++;
}
level17 = new Array();
i = 0;
while (i < 1) {
level17.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level17.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level17.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 1) {
level17.push("enemy_chopper");
i++;
}
i = 0;
while (i < 0) {
level17.push("enemy_bomber");
i++;
}
level18 = new Array();
i = 0;
while (i < 1) {
level18.push("enemy1");
i++;
}
i = 0;
while (i < 0) {
level18.push("enemy_drop");
i++;
}
i = 0;
while (i < 0) {
level18.push("enemy_drop_sniper");
i++;
}
i = 0;
while (i < 0) {
level18.push("enemy_chopper");
i++;
}
i = 0;
while (i < 1) {
level18.push("enemy_bomber");
i++;
}
game_levels = new Array(level01, level02, level03, level04, level05, level06, level07, level08, level09, level10, level11, level12, level13, level14, level15, level16, level17, level18);
timeToNextDrop = 0;
resetStepperVars();
}
onClipEvent (enterFrame) {
_root.elapsed = getTimer() - _root.prev_time;
_root.time_count = _root.time_count + _root.elapsed;
_root.prev_time = getTimer();
_root.frame_count++;
if (_root.time_count > 333) {
_root.time_count = 0;
_root.fps = _root.frame_count * 3;
_root.frame_count = 0;
}
if (((!_root.paused) && (_root.enemy_count < _root.max_enemies_on_screen)) && ((timeToNextDrop--) <= 0)) {
ene_type = getNextEnemy();
trace(("\n\n+++++++++++++++++++++++++++++++++++++ Next Enemy: " + ene_type) + "\n\n");
if (ene_type == "enemy_bomber") {
if (random(2) == 0) {
_root.placeEnemy("enemy_bomber", -44, random(100) + 20, 1 + (_root.level * 0.02), 0);
} else {
_root.placeEnemy("enemy_bomber", _root.g_width + 44, random(100) + 20, -1 - (_root.level * 0.02), 0);
}
timeToNextDrop = random(200) + 200;
}
if (ene_type == "enemy_chopper") {
if (random(2) == 0) {
ene = _root.placeEnemy("enemy_chopper", -20, -10, 0, 0);
ene._xscale = -100;
} else {
ene = _root.placeEnemy("enemy_chopper", _root.g_width + 20, -10, 0, 0);
ene._xscale = 100;
}
timeToNextDrop = random(200) + 100;
} else if (ene_type == "enemy_drop_sniper") {
if (random(2) == 0) {
_root.placeEnemy("enemy_drop_sniper", _root.tower_left._x, -10, 0, 0);
} else {
_root.placeEnemy("enemy_drop_sniper", _root.tower_right._x, -10, 0, 0);
}
timeToNextDrop = random(100) + 50;
} else if (ene_type == "enemy_drop") {
_root.placeEnemy("enemy_drop", ((_root.g_width / 2) + random(300)) - random(300), -10, 0, 0);
timeToNextDrop = random(200) + 25;
} else {
if (random(2) == 0) {
_root.placeEnemy("enemy1", -20, _root.g_ground - 50, 0, 0);
} else {
_root.placeEnemy("enemy1", _root.g_width + 20, _root.g_ground - 50, 0, 0);
}
timeToNextDrop = random(100) + 50;
}
}
if (_root.g_lvl_kills >= 20) {
_root.g_lvl_kills = 0;
trace("hit!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
_root.level++;
_root.showLevelDisplay();
}
if ((_root.fps_ticker++) > 50) {
if (_root.fps < _root.min_fps) {
_root.min_fps = _root.fps;
}
if (_root.fps > _root.max_fps) {
_root.max_fps = _root.fps;
}
_root.fps_ticks++;
_root.fps_total = _root.fps_total + _root.fps;
_root.avg_fps = _root.fps_total / _root.fps_ticks;
}
if ((_root.gameOver() && (!_root.game_ended)) && ((endDelay++) > 100)) {
_root.game_ended = true;
_root.endGame();
}
_root.enemy_count = _root.enemies.length;
_root.mine_count = _root.mines.length;
updateAfterEvent();
}
Instance of Symbol 266 MovieClip [hero_grenade] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 265 MovieClip [explosion] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 263 MovieClip [enemy_chopper] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 252 MovieClip [arrow_debris] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 251 MovieClip [enemy_bomb_drop] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 484 MovieClip "cross_hair" in Frame 1
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 248 MovieClip [chopper_dead] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 245 MovieClip [enemy_bomber] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 237 MovieClip [bomber_dead] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 234 MovieClip [enemy_rocket] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 507 MovieClip in Frame 1
onClipEvent (load) {
_root.paused = true;
_x = (_root.g_width / 2);
_y = (_root.g_ground / 2);
}
Instance of Symbol 228 MovieClip [enemy1] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 226 MovieClip [hero_bullet] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 223 MovieClip [blood_drop] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 220 MovieClip [proximity_mine] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 219 MovieClip [enemy_drop] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 217 MovieClip [blood_splat] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 214 MovieClip [crater2] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 211 MovieClip [enemy_sniper] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 200 MovieClip [enemy_drop_sniper] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 196 MovieClip [enemy_sniper_death] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 192 MovieClip [blood_stump_fem] in Frame 1
onClipEvent (load) {
this.unloadMovie();
}
Symbol 26 MovieClip Frame 20
this.unloadMovie();
Instance of Symbol 52 MovieClip [helm] in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
}
Instance of Symbol 55 MovieClip in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
Symbol 57 MovieClip Frame 65
stop();
Symbol 58 MovieClip [body_dieing] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 57 MovieClip in Symbol 58 MovieClip [body_dieing] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 61 MovieClip Frame 24
this.unloadMovie();
Instance of Symbol 61 MovieClip in Symbol 62 MovieClip [smoke] Frame 1
onClipEvent (load) {
_rotation = random(360);
rate = (random(100) - 50) / 10;
}
onClipEvent (enterFrame) {
_rotation = (_rotation + rate);
}
Symbol 65 MovieClip [debris2] Frame 1
function step() {
if (vx > 0) {
_rotation = (_rotation + rot_rate);
} else {
_rotation = (_rotation - rot_rate);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if (timer < 15) {
_alpha = (_alpha - 5);
}
if ((timer--) < 0) {
this.unloadMovie();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
for (i in _root.obstructions) {
top = _root.obstructions[i].hitTest(_x, _y - 1, 1);
bottom = _root.obstructions[i].hitTest(_x, _y + 1, 1);
left = _root.obstructions[i].hitTest(_x - 1, _y, 1);
right = _root.obstructions[i].hitTest(_x + 1, _y, 1);
b_right = _root.obstructions[i].hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _root.obstructions[i].hitTest(_x - 0.7071, _y + 0.7071, 1);
if (top || (bottom)) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * 0.5;
rot_rate = rot_rate * 0.5;
} else if (bottom && (b_right || (b_left))) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
} else if (b_right || (b_left)) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
} else if (left || (right)) {
_x = xprev;
_y = yprev;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
timer = 50 + random(20);
rot_rate = 6;
timeToSmoke = 10;
Instance of Symbol 64 MovieClip in Symbol 65 MovieClip [debris2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 68 MovieClip [parachute_fade] Frame 20
this.unloadMovie();
Symbol 72 MovieClip [gas_can] Frame 1
function step() {
frame = maxhp - hp;
if (frame < 1) {
frame = 1;
}
frame = Math.floor(frame);
can_animation.gotoAndStop(frame);
if (hp <= 0) {
_root.addExplosion(_x, _y, 100, 50);
_root.removeObstruction(this);
}
hp = hp - leaking;
}
function takeDamage(amt, x, y, vx, vy) {
hp = hp - amt;
}
hp = 5;
maxhp = 5;
placed = false;
_root.obstructions.push(this);
Instance of Symbol 71 MovieClip "can_animation" in Symbol 72 MovieClip [gas_can] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 77 MovieClip [ammo_prox_mine] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.ammo_prox_mines = _root.ammo_prox_mines + 10;
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 76 MovieClip in Symbol 77 MovieClip [ammo_prox_mine] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 82 MovieClip [ammo_grenade] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.ammo_grenades = _root.ammo_grenades + 10;
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 81 MovieClip in Symbol 82 MovieClip [ammo_grenade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 85 MovieClip [ammo_health] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.hero.hp = _root.hero.hp + 10;
if (_root.hero.hp > 100) {
_root.hero.hp = 100;
}
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip [ammo_health] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 90 MovieClip [ammo_arrow] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.ammo_arrows = _root.ammo_arrows + 20;
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 89 MovieClip in Symbol 90 MovieClip [ammo_arrow] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 95 MovieClip [ammo_gun] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.ammo_bullets = _root.ammo_bullets + 400;
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 94 MovieClip in Symbol 95 MovieClip [ammo_gun] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 98 MovieClip [ammo_rocket] Frame 1
function step() {
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_root.addGrenadeExplosion(_x, _y);
_root.removeObstruction(this);
} else if (_alpha <= 0) {
_root.removeObstruction(this);
} else if (hitTest(_root.hero._x, _root.hero._y, 0)) {
_root.ammo_rockets = _root.ammo_rockets + 10;
_root.removeObstruction(this);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip [ammo_rocket] Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Instance of Symbol 100 MovieClip in Symbol 103 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 103 MovieClip Frame 33
stop();
Symbol 104 MovieClip [bullet_hole] Frame 1
function step() {
if ((count++) > 200) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 103 MovieClip in Symbol 104 MovieClip [bullet_hole] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 164 MovieClip Frame 1
stop();
alpha_change = 0.5;
rate = 0.5;
gravity = -0.5;
bounceHeight = 200;
friction = 0.3;
Instance of Symbol 109 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 111 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 113 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 115 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 117 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 119 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 121 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 123 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 125 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 127 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 129 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 131 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 133 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 135 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 137 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
if (_alpha < 1) {
_parent.unloadMovie();
}
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > _parent.bounceHeight) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 139 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 141 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 143 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > _parent.bounceHeight) {
vy = vy * (-_parent.friction);
vx = vx * (-_parent.friction);
}
}
Instance of Symbol 145 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 147 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 149 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 153 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 155 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 157 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 159 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 161 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Instance of Symbol 163 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
vx = ((_x * _parent.rate) * random(100)) / 100;
vy = ((_y * _parent.rate) * random(100)) / 100;
rotRate = random(10) - 5;
}
onClipEvent (enterFrame) {
_x = (_x + vx);
_y = (_y + vy);
_alpha = (_alpha - _parent.alpha_change);
_rotation = (_rotation + rotRate);
vy = vy - _parent.gravity;
if (_y > (_parent.bounceHeight + random(50))) {
vy = vy * (-_parent.friction);
vx = vx * _parent.friction;
}
}
Symbol 165 MovieClip Frame 65
stop();
Symbol 166 MovieClip [body_dieing2] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 165 MovieClip in Symbol 166 MovieClip [body_dieing2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 70
gotoAndPlay (10);
Symbol 192 MovieClip [blood_stump_fem] Frame 1
function step() {
if (vx > 0) {
_rotation = (_rotation + rot_rate);
} else {
_rotation = (_rotation - rot_rate);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((timer--) < 0) {
this.unloadMovie();
}
testHitObstructions();
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
if (Math.abs(vy) > 4) {
_root.placeBlood(_x, _y);
}
_root.placeDeadBody("enemy_sniper_death", _x, _y, vx);
this.unloadMovie();
}
}
if (_root.ground.ground_body.hitTest(_x, _y + 2, 1)) {
if (Math.abs(vy) > 4) {
_root.placeBlood(_x, _y);
}
_root.placeDeadBody("enemy_sniper_death", _x, _y, vx);
this.unloadMovie();
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
timer = 500 + random(50);
rot_rate = random(3) + 3;
timeToSplat = 10;
blood_count = 0;
if (vx < 0) {
_xscale = -100;
}
testHitObstructions();
Instance of Symbol 191 MovieClip in Symbol 192 MovieClip [blood_stump_fem] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 195 MovieClip Frame 54
stop();
Symbol 196 MovieClip [enemy_sniper_death] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 195 MovieClip in Symbol 196 MovieClip [enemy_sniper_death] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 199 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 70
gotoAndPlay (10);
Symbol 200 MovieClip [enemy_drop_sniper] Frame 1
function step() {
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + (2 + extra_fall));
_x = (_x + vx);
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 1)) {
hitstruct = true;
break;
}
}
bottom = _root.ground.ground_body.hitTest(_x, _y, 1);
if (bottom || (hitstruct)) {
chute = _root.addObj("parachute_fade", _root.debris_layer, _root.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
dx = _root.hero._x - _x;
dir = Math.abs(dx) / dx;
_root.placeEnemy("enemy_sniper", _x, _y, 0, 0);
_root.removeEnemy(this);
}
if (hp <= 0) {
_root.increaseScore(10, _x, _y);
chute = _root.addObj("parachute_fade", _root.debris_layer, _root.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
if (explosion_impact > 12) {
_root.addBloodExplosion(_x, _y - 20);
} else {
_root.addFemBloodyStump(_x, _y, vx, 0);
}
_root.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
timeToShoot = 200 + random(100);
}
}
function shoot() {
bullet = _root.addObj("enemy_bullet", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 1000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
bullet.vy = Math.sin(radians) * shot_speed;
bullet.vx = Math.cos(radians) * shot_speed;
bullet._x = _x;
bullet._y = _y - half_height;
bullet._rotation = (radians * 180) / Math.PI;
}
function throwNade() {
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
lvx = dx / 100;
lvy = -2 + (dy / 100);
lvl = _root.getNextEnemyBulletLevel();
proj = _root.addObj("hero_grenade", _root.enemy_bullet_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = _x;
proj._y = _y - half_height;
}
function takeDamage(dmg, x, y, vx, vy) {
_root.playHitEnemySound();
if (weakspot.hitTest(x, y, 0)) {
_root.increaseScore(20, _x, _y);
hp = 0;
c = 0;
while (c < 3) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
} else {
hp = hp - dmg;
c = 0;
while (c < 1) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
}
}
hp = 5;
xpos = 0;
ypos = 0;
timeToShoot = 50;
half_height = _height / 2;
extra_fall = _root.level * 0.1;
Instance of Symbol 198 MovieClip "hitbox" in Symbol 200 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 199 MovieClip in Symbol 200 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 200 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 70
gotoAndPlay (10);
Instance of Symbol 208 MovieClip "sniper_flame" in Symbol 209 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 30);
}
}
Symbol 211 MovieClip [enemy_sniper] Frame 1
function step() {
xpos = _x;
ypos = _y;
if (vx < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if ((timeToAim++) > 15) {
timeToAim = 0;
dx = -((_root.hero._x - _x) - 2.6);
dy = -((_root.hero._y - _y) - 11.8);
radians = Math.atan(dy / dx);
if (dx > 0) {
vx = -speed;
shoot_angle = ((-radians) * 180) / Math.PI;
} else {
vx = speed;
shoot_angle = (radians * 180) / Math.PI;
}
sniper_gun._rotation = shoot_angle;
head._rotation = shoot_angle;
left_arm._rotation = shoot_angle;
}
if (hp <= 0) {
trace(("DEATH CODE: " + deathCode) + " !!!!!!!!!!!!!!!");
if (deathCode == "exploded") {
_root.increaseScore(5, _x, _y);
if (explosion_impact > 12) {
_root.addBloodExplosion(_x, _y - 20);
} else {
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("blood_stump_fem", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y - 5;
temp.vx = explosion_dx;
temp.vy = explosion_dy;
temp._rotation = random(360);
}
} else if (deathCode == "head_shot") {
_root.increaseScore(15, _x, _y);
_alpha = 0;
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("enemy_sniper_death", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
if (vx > 0) {
temp._xscale = -100;
}
} else {
_root.increaseScore(10, _x, _y);
_alpha = 0;
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("blood_stump_fem", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
}
_root.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
if ((shot_count++) >= 0) {
shot_count = 1;
timeToShoot = (300 + random(200)) - (_root.level * 5);
if (timeToShoot < 100) {
timeToShoot = 100;
}
} else {
timeToShoot = 10;
}
}
if ((timeToNade--) <= 0) {
dist = Math.abs(_root.hero._x - _x);
if ((dist < 300) && (dist > 100)) {
throwNade();
}
timeToNade = 600 + random(600);
}
}
function shoot() {
sniper_gun.sniper_flame._alpha = 100;
_root.playSound("sniper_rifle.wav");
bullet = _root.addObj("enemy_bullet", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 3.5 * (1 + (_root.level * 0.02));
if (shot_speed > 8) {
shot_speed = 8;
}
wild_factor = 2;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 2000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
bullet.vy = Math.sin(radians) * shot_speed;
bullet.vx = Math.cos(radians) * shot_speed;
bullet._x = _x + bullet.vx;
bullet._y = (_y - half_height) + bullet.vy;
bullet._rotation = (radians * 180) / Math.PI;
}
function throwNade() {
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
lvx = dx / 130;
lvy = -3 + (dy / 100);
lvl = _root.getNextEnemyBulletLevel();
proj = _root.addObj("hero_grenade", _root.enemy_bullet_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = _x;
proj._y = _y - half_height;
}
function takeDamage(dmg, x, y, vx, vy) {
_root.playHitEnemySound();
if (weakspot.hitTest(x, y, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
} else {
hp = hp - dmg;
c = 0;
while (c < 1) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
}
}
hp = 5 + Math.floor(_root.level * 0.25);
half_height = _height / 2;
timeToNade = 600 + random(600);
timeToShoot = 100;
shot_count = 0;
speed = 0.5;
xpos = 0;
ypos = 0;
shootCount = 0;
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 210 MovieClip "head" in Symbol 211 MovieClip [enemy_sniper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "hitbox" in Symbol 211 MovieClip [enemy_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 211 MovieClip [enemy_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 214 MovieClip [crater2] Frame 1
function step() {
if ((count++) > 500) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 213 MovieClip in Symbol 214 MovieClip [crater2] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 217 MovieClip [blood_splat] Frame 1
function step() {
if ((count++) > 500) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 216 MovieClip in Symbol 217 MovieClip [blood_splat] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 70
gotoAndPlay (10);
Symbol 219 MovieClip [enemy_drop] Frame 1
function step() {
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + (1.5 + extra_fall));
_x = (_x + vx);
bottom = _root.ground.ground_body.hitTest(_x, _y, 1);
if (bottom) {
chute = _root.addObj("parachute_fade", _root.debris_layer, _root.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
dx = _root.hero._x - _x;
dir = Math.abs(dx) / dx;
_root.placeEnemy("enemy1", _x, _y, 0.5 * dir, vy);
_root.removeEnemy(this);
}
if (hp <= 0) {
_root.increaseScore(10, _x, _y);
chute = _root.addObj("parachute_fade", _root.debris_layer, _root.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
if (explosion_impact > 12) {
_root.addBloodExplosion(_x, _y - 20);
} else {
_root.addBloodyStump(_x, _y, vx, 0);
}
_root.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
timeToShoot = 200 + random(100);
}
}
function shoot() {
_root.playSound("tat3.wav");
bullet = _root.addObj("enemy_bullet", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 1000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
bullet.vy = Math.sin(radians) * shot_speed;
bullet.vx = Math.cos(radians) * shot_speed;
bullet._x = _x;
bullet._y = _y - half_height;
bullet._rotation = (radians * 180) / Math.PI;
}
function throwNade() {
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
lvx = dx / 100;
lvy = -2 + (dy / 100);
lvl = _root.getNextEnemyBulletLevel();
proj = _root.addObj("hero_grenade", _root.enemy_bullet_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = _x;
proj._y = _y - half_height;
}
function takeDamage(dmg, x, y, vx, vy) {
_root.playHitEnemySound();
if (weakspot.hitTest(x, y, 0)) {
_root.increaseScore(20, _x, _y);
hp = 0;
c = 0;
while (c < 3) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
} else {
hp = hp - dmg;
c = 0;
while (c < 1) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
}
}
hp = 5;
xpos = 0;
ypos = 0;
timeToShoot = 50;
half_height = _height / 2;
extra_fall = _root.level * 0.1;
Instance of Symbol 198 MovieClip "hitbox" in Symbol 219 MovieClip [enemy_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 218 MovieClip in Symbol 219 MovieClip [enemy_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 219 MovieClip [enemy_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 220 MovieClip [proximity_mine] Frame 1
function step() {
if (placed) {
vx = 0;
vy = 0;
hp = hp - leaking;
if (hp <= 0) {
_root.addExplosion(_x, _y, range, dmg);
_root.removeMine(this);
}
if ((timeToScan++) > 50) {
timeToScan = 0;
scan();
}
} else {
if (vx > 0) {
_rotation = (_rotation + 3);
} else {
_rotation = (_rotation - 3);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitObstructions();
}
}
function scan() {
trace("Scanning");
for (i in _root.enemies) {
ene = _root.enemies[i];
dx = ene._x - _x;
dy = ene._y - _y;
if ((Math.abs(dx) < detection_range) && (Math.abs(dy) < detection_range)) {
leaking = 1;
break;
}
}
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
placed = false;
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_root.ground.ground_body.hitTest(_x, _y, 1))) {
placed = true;
} else {
do {
if ((in _root.obstructions) == null) {
break;
}
i = in _root.obstructions;
placed = _root.obstructions[i].hitTest(_x, _y, 0);
} while (!placed);
do {
} while (() != null);
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
hp = 25;
timeToScan = 0;
leaking = 0;
placed = false;
range = 50;
detection_range = 20;
dmg = 100;
Instance of Symbol 75 MovieClip in Symbol 220 MovieClip [proximity_mine] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 223 MovieClip [blood_drop] Frame 1
function step() {
vy = vy + mygrav;
_x = (_x + vx);
_y = (_y + vy);
if (_root.ground.ground_body.hitTest(_x, _y, 1)) {
lvl = _root.getNextBloodLevel();
temp = _root.addObj("blood_splat", _root.ground.blood_layer, lvl);
temp._x = _x;
temp._y = _y;
temp._rotation = random(360);
temp._xscale = (temp._yscale = _xscale);
this.unloadMovie();
} else if (((_x > xmax) || (_x < -10)) || (_y > ymax)) {
this.unloadMovie();
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
mygrav = _root.gravity * 2;
Instance of Symbol 222 MovieClip in Symbol 223 MovieClip [blood_drop] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 226 MovieClip [hero_bullet] Frame 1
function step() {
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
testHitObstructions();
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitbox.hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
}
}
}
function testHitObstructions() {
if (_root.ground.ground_body.hitTest(_x, _y, 1)) {
_root.playSound("bomb.wav");
temp = _root.addObj("bullet_hole", _root.ground.blood_layer, _root.getNextBloodLevel());
temp._x = _x;
temp._y = _y;
this.unloadMovie();
}
for (i in _root.obstructions) {
if (_root.obstructions[i].hitTest(_x, _y, 0)) {
_root.obstructions[i].takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark_dust", _x, _y, 3);
_root.playSound("bomb.wav");
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 225 MovieClip in Symbol 226 MovieClip [hero_bullet] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 70
gotoAndPlay (10);
Symbol 227 MovieClip Frame 142
gotoAndPlay (135);
Symbol 228 MovieClip [enemy1] Frame 1
function step() {
xpos = _x;
ypos = _y;
if (vx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if ((timeToCheckDirection++) > 100) {
timeToCheckDirection = 0;
dx = _x - _root.hero._x;
if (dx > 0) {
vx = -speed;
} else {
vx = speed;
}
}
bottom = _root.ground.ground_body.hitTest(_x, _y, 1);
grounded = _root.ground.ground_body.hitTest(_x, _y + 2, 1);
if (bottom) {
if (delta > 0) {
delta = 0;
}
delta = delta - 0.1;
vy = delta;
} else if (delta < 0) {
delta = 0;
vy = 0;
}
if (!shooting) {
count = count + 1;
if (count > 60) {
count = 0;
}
vy = vy + _root.gravity;
_x = (_x + vx);
_y = (_y + vy);
body.gotoAndStop(count + mode);
} else {
shooting = (shootCount++) < 10;
}
if (((_x < -40) || (_x > xmax)) || (_y > ymax)) {
_root.removeEnemy(this);
}
if (hp <= 0) {
trace(("DEATH CODE: " + deathCode) + " !!!!!!!!!!!!!!!");
if (deathCode == "exploded") {
_root.increaseScore(5, _x, _y);
if (explosion_impact > 25) {
_root.addBloodExplosion(_x, _y - 20);
} else {
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("blood_stump", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y - 5;
temp.vx = explosion_dx;
temp.vy = explosion_dy;
temp._rotation = random(360);
}
} else if (deathCode == "head_shot") {
_root.increaseScore(15, _x, _y);
_alpha = 0;
_root.placeDeadBody("body_dieing2", _x, _y, vx);
} else {
_root.increaseScore(10, _x, _y);
_alpha = 0;
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("blood_stump", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
}
_root.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
if ((shot_count++) >= clip_size) {
shot_count = 0;
timeToShoot = (200 + random(100)) - (_root.level * 5);
if (timeToShoot < 100) {
timeToShoot = 100;
}
} else {
timeToShoot = 10;
}
}
if ((timeToNade--) <= 0) {
dist = Math.abs(_root.hero._x - _x);
if ((dist < 300) && (dist > 100)) {
throwNade();
}
timeToNade = 600 + random(600);
}
}
function shoot() {
_root.playSound("tat3.wav");
shootCount = 1;
shooting = true;
body.gotoAndPlay("shooting");
bullet = _root.addObj("enemy_bullet", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 2 * (1 + (_root.level * 0.02));
if (shot_speed > 8) {
shot_speed = 8;
}
wild_factor = 4;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 2000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
bullet.vy = Math.sin(radians) * shot_speed;
bullet.vx = Math.cos(radians) * shot_speed;
bullet._x = _x;
bullet._y = _y - half_height;
bullet._rotation = (radians * 180) / Math.PI;
}
function throwNade() {
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
lvx = dx / 120;
lvy = -3 + (dy / 100);
lvl = _root.getNextEnemyBulletLevel();
proj = _root.addObj("hero_grenade", _root.enemy_bullet_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = _x;
proj._y = _y - half_height;
}
function takeDamage(dmg, x, y, vx, vy) {
_root.playHitEnemySound();
if (weakspot.hitTest(x, y, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
} else {
hp = hp - dmg;
c = 0;
while (c < 1) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
}
}
stop();
mode = 71;
count = random(100);
animFactor = 0.1;
speed = _root.g_enSpeed;
helmAlpha = random(2) * 100;
hp = 5 + Math.floor(_root.level * 0.25);
timeToCheckDirection = 0;
half_height = _height / 2;
explosion_dist = 0;
timeToShoot = 300 + random(300);
timeToNade = 400 + random(600);
shot_count = 0;
speed = 0.5;
xpos = 0;
ypos = 0;
shootCount = 0;
shooting = false;
xmax = _root.g_width + 40;
ymax = _root.g_ground + 40;
clip_size = Math.floor(_root.level / 6);
if (clip_size > 5) {
clip_size = 5;
}
Instance of Symbol 198 MovieClip "hitbox" in Symbol 228 MovieClip [enemy1] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 227 MovieClip "body" in Symbol 228 MovieClip [enemy1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 228 MovieClip [enemy1] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 233 MovieClip [level_display] Frame 1
function step() {
_alpha = (_alpha - 10);
if (_alpha < 0) {
this.unloadMovie();
}
}
_alpha = 1000;
Instance of Symbol 232 MovieClip in Symbol 233 MovieClip [level_display] Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Symbol 234 MovieClip [enemy_rocket] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
placeSmoke();
if ((((_x < xmin) || (_x > xmax)) || (_y < ymin)) || (_y > ymax)) {
this.unloadMovie();
}
testHitObstructions();
testHitHero();
}
function testHitObstructions() {
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_root.ground.ground_body.hitTest(_x, _y, 1))) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
for (i in _root.obstructions) {
if (_root.obstructions[i].hitTest(_x, _y, 1)) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
}
function testHitHero() {
if (_root.hero.hitbox.hitTest(_x, _y, 0)) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
function placeSmoke() {
lvl = _root.getNextSmokeLevel();
temp = _root.smoke_layer.attachMovie("segment", "segment_id_" + lvl, lvl);
temp._x = _x;
temp._y = _y;
temp._width = Math.sqrt((vx * vx) + (vy * vy));
temp._rotation = _rotation;
}
xmax = _root.g_width + 20;
xmin = -20;
ymax = _root.g_ground + 20;
ymin = -20;
radius = 40;
dmg = 30;
xmark = _x;
ymark = _y;
timeToMark = 0;
Instance of Symbol 22 MovieClip "rocket" in Symbol 234 MovieClip [enemy_rocket] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 237 MovieClip [bomber_dead] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 236 MovieClip in Symbol 237 MovieClip [bomber_dead] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 243 MovieClip in Symbol 244 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 245 MovieClip [enemy_bomber] Frame 1
function step() {
if (vx < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
xpos = _x;
ypos = _y;
if (hp > 0) {
bomber_anim.gotoAndStop(101 - Math.floor((100 * hp) / maxhp));
_x = (_x + vx);
_y = (_y + vy);
if (((timeToBomb--) <= 0) && (ammo > 0)) {
timeToBomb = 120;
dropBomb();
}
} else {
if (!scored_kill) {
scored_kill = true;
_root.increaseScore(10, _x, _y);
}
if (vx > 0) {
_rotation = (_rotation + 0.1);
} else {
_rotation = (_rotation - 0.1);
}
vy = vy + half_grav;
_x = (_x + vx);
_y = (_y + vy);
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 1)) {
hitstruct = true;
break;
}
}
bottom = _root.ground.ground_body.hitTest(_x, _y + 2, 1) || (hitstruct);
if (bottom) {
_root.addExplosion(_x, _y, 70, 40);
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("bomber_dead", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp._xscale = _xscale;
_root.removeEnemy(this);
}
}
if ((_x > xmax) || (_x < -60)) {
_root.removeEnemy(this);
}
}
function getNextBulletHoleLevel() {
if ((b_level++) > 8) {
b_level = 1;
}
return(b_level);
}
function takeDamage(dmg, x, y, vx, vy) {
dmg_amt = dmg;
spark_amt = random(2);
if (weakspot.hitTest(x, y, 0)) {
dmg_amt = dmg_amt + 10;
spark_amt = spark_amt + random(2);
}
trace("Taking Damage!!!!!!!!!!!!!!!!!!");
trace("Damage: " + dmg);
_root.playSound("ching1.wav");
hp = hp - dmg_amt;
c = 0;
while (c < spark_amt) {
blood = _root.addObj("debris2", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 50 + random(100));
c++;
}
xnew = x - _x;
ynew = y - _y;
if (_xscale < 0) {
xnew = xnew * -1;
}
temp = _root.addObj("bullet_hole", bullet_hole_layer, getNextBulletHoleLevel());
temp._x = xnew;
temp._y = ynew;
}
function dropBomb() {
_root.playSound("firecat3.wav");
temp = _root.addObj("enemy_bomb_drop", _root.bomb_layer, _root.getNextBombLevel());
temp._x = _x;
temp._y = _y + 5;
temp.vx = vx;
_root.enemies.push(temp);
}
maxhp = 100;
hp = 100;
xmax = _root.g_width + 60;
ymax = _root.g_ground + 60;
xpos = 0;
ypos = 0;
timeToBomb = 100;
half_grav = _root.gravity / 2;
ammo = 3;
b_level = 1;
Instance of Symbol 240 MovieClip "bomber_anim" in Symbol 245 MovieClip [enemy_bomber] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "hitbox" in Symbol 245 MovieClip [enemy_bomber] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 245 MovieClip [enemy_bomber] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 248 MovieClip [chopper_dead] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 247 MovieClip in Symbol 248 MovieClip [chopper_dead] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 251 MovieClip [enemy_bomb_drop] Frame 1
function step() {
vy = vy + (_root.gravity / 5);
_x = (_x + vx);
_y = (_y + vy);
xpos = _x;
ypos = _y;
if (vx > 0) {
_rotation = (_rotation + 0.3);
} else {
_rotation = (_rotation - 0.3);
}
if ((((_x < xmin) || (_x > xmax)) || (_y < ymin)) || (_y > ymax)) {
_root.removeEnemy(this);
}
if ((_y > 200) || (hp <= 0)) {
hitstruct = false;
if ((_y > 200) && (_y < 260)) {
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
}
if (((hitstruct || (hp <= 0)) || (_root.ground.ground_body.hitTest(_x, _y, 1))) || (_y > _root.g_ground)) {
_root.addExplosion(_x, _y, 110, 50);
_root.removeEnemy(this);
}
}
}
function takeDamage(amt, x, y, vx, vy) {
hp = hp - amt;
}
hp = 1;
xpos = _x;
ypos = _y;
xmax = _root.g_width + 100;
ymax = _root.g_ground + 50;
xmin = -100;
ymin = -10;
etype = "bomb";
if (vx < 0) {
_xscale = -100;
}
Instance of Symbol 250 MovieClip in Symbol 251 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "hitbox" in Symbol 251 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 252 MovieClip [arrow_debris] Frame 1
function step() {
if ((count++) > 200) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 88 MovieClip in Symbol 252 MovieClip [arrow_debris] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 254 MovieClip in Symbol 255 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 61);
}
Symbol 263 MovieClip [enemy_chopper] Frame 1
function step() {
xpos = _x;
ypos = _y;
if ((move_count++) > 100) {
move_count = 0;
if (_root.hero._x < _x) {
vx = -0.25;
} else {
vx = 0.25;
}
}
vy = vy + _root.gravity;
frame = 20 - hp;
if (frame < 1) {
frame = 1;
}
frame = Math.floor(frame);
chopper_anim.gotoAndStop(frame);
if (_y > target_elev) {
ydelt = lift;
} else {
ydelt = 0;
}
if (vy < -0.5) {
ydelt = -lift;
}
if (vy > 0.5) {
ydelt = lift;
}
vy = vy + ydelt;
_x = (_x + vx);
_y = (_y + vy);
if (hp < 5) {
lift = -0.02;
hitstruct = false;
if ((_y > 200) && (_y < 260)) {
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
}
bottom = _root.ground.ground_body.hitTest(_x, _y, 1) || (hitstruct);
}
hp = hp - leaking;
if (bottom) {
_root.increaseScore(10, _x, _y);
_root.addExplosion(_x, _y, 60, 30);
lvl = _root.getNextDebrisLevel();
temp = _root.addObj("chopper_dead", _root.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp._xscale = _xscale;
_root.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
if (shots >= (1 + clip_size)) {
shots = 0;
timeToShoot = (400 + random(300)) - (_root.level * 5);
if (timeToShootRocket < 300) {
timeToShootRocket = 300;
}
} else {
shots++;
timeToShoot = 5;
}
shoot();
}
if (((timeToShootRocket--) <= 0) && (Math.abs(_root.hero._x - _x) > 200)) {
if (rocket_shots >= 1) {
rocket_shots = 0;
timeToShootRocket = (800 + random(400)) - (_root.level * 5);
if (timeToShootRocket < 500) {
timeToShootRocket = 500;
}
} else {
rocket_shots++;
timeToShootRocket = 10;
}
shootRocket();
}
}
function takeDamage(dmg, x, y, vx, vy) {
if (leaking <= 0) {
if (weakspot.hitTest(x, y, 0)) {
_root.increaseScore(10, _x, _y);
leaking = 0.05;
_root.addExplosion(x, y, 15, 5);
}
}
trace("Taking Damage!!!!!!!!!!!!!!!!!!");
trace("Damage: " + dmg);
hp = hp - dmg;
_root.playSound("ching1.wav");
spark_amt = random(2);
c = 0;
while (c < spark_amt) {
blood = _root.addObj("debris2", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = x;
blood._y = y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 50 + random(100));
c++;
}
xnew = x - _x;
ynew = y - _y;
if (_xscale < 0) {
xnew = xnew * -1;
}
temp = _root.addObj("bullet_hole", bullet_hole_layer, getNextBulletHoleLevel());
temp._x = xnew;
temp._y = ynew;
}
function getNextBulletHoleLevel() {
if ((b_level++) > 8) {
b_level = 1;
}
return(b_level);
}
function shoot() {
_root.playSound("tat3.wav");
bullet = _root.addObj("enemy_bullet", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 2.5 * (1 + (_root.level * 0.02));
if (shot_speed > 8) {
shot_speed = 8;
}
wild_factor = 1.5;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 2000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
bullet.vy = Math.sin(radians) * shot_speed;
bullet.vx = Math.cos(radians) * shot_speed;
bullet._x = _x;
bullet._y = _y;
bullet._rotation = (radians * 180) / Math.PI;
}
function shootRocket() {
_root.playSound("shoot_rocket4.wav");
rocket = _root.addObj("enemy_rocket", _root.enemy_bullet_layer, _root.getNextEnemyBulletLevel());
shot_speed = 3.5 * (1 + (_root.level * 0.01));
if (shot_speed > 8) {
shot_speed = 8;
}
wild_factor = 1.5;
dx = _root.hero._x - _x;
dy = _root.hero._y - _y;
variation = (random(Math.floor(wild_factor * 100)) - random(Math.floor(wild_factor * 100))) / 2000;
radians = Math.atan(dy / dx) + variation;
if (dx < 0) {
radians = radians + Math.PI;
}
rocket.vy = Math.sin(radians) * shot_speed;
rocket.vx = Math.cos(radians) * shot_speed;
rocket._x = _x;
rocket._y = _y;
rocket._rotation = (radians * 180) / Math.PI;
}
target_elev = 50 + random(200);
hp = 20;
leaking = 0;
lift = -0.06;
shots = 0;
rocket_shots = 0;
timeToShoot = 400;
timeToShootRocket = 600;
xpos = 0;
ypos = 0;
clip_size = Math.floor(_root.level * 0.2);
if (clip_size > 5) {
clip_size = 5;
}
b_level = 1;
Instance of Symbol 261 MovieClip "chopper_anim" in Symbol 263 MovieClip [enemy_chopper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 198 MovieClip "hitbox" in Symbol 263 MovieClip [enemy_chopper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 198 MovieClip "weakspot" in Symbol 263 MovieClip [enemy_chopper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 265 MovieClip [explosion] Frame 10
this.unloadMovie();
Symbol 266 MovieClip [hero_grenade] Frame 1
function step() {
if (vx > 0) {
_rotation = (_rotation + 3);
} else {
_rotation = (_rotation - 3);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((timer--) < 0) {
_root.addExplosion(_x, _y, 60, 20);
this.unloadMovie();
}
testHitObstructions();
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
if (_y > max_obs_elevation) {
top = _root.ground.ground_body.hitTest(_x, _y - 1, 1);
bottom = _root.ground.ground_body.hitTest(_x, _y + 1, 1);
left = _root.ground.ground_body.hitTest(_x - 1, _y, 1);
right = _root.ground.ground_body.hitTest(_x + 1, _y, 1);
b_right = _root.ground.ground_body.hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _root.ground.ground_body.hitTest(_x - 0.7071, _y + 0.7071, 1);
if (top || (bottom)) {
_x = xprev;
_y = yprev;
vy = vy * -0.3;
vx = vx * 0.3;
} else if (bottom && (b_right || (b_left))) {
_x = xprev;
_y = yprev;
vy = vy * -0.3;
vx = vx * -0.3;
} else if (b_right || (b_left)) {
_x = xprev;
_y = yprev;
vy = vy * -0.3;
vx = vx * -0.3;
} else if (left || (right)) {
_x = xprev;
_y = yprev;
vx = vx * -0.3;
}
}
if (_y > max_obs_elevation) {
for (i in _root.obstructions) {
bottom = _root.obstructions[i].hitTest(_x, _y, 0);
if (bottom) {
_x = xprev;
_y = yprev;
vy = vy * -0.3;
vx = vx * -0.3;
}
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
timer = 150;
max_obs_elevation = 275;
Instance of Symbol 80 MovieClip in Symbol 266 MovieClip [hero_grenade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 279 Button
on (release) {
_root.closeTopScores();
}
Symbol 284 Button
on (release) {
_root.closeNamer();
_root.paused = false;
}
Symbol 287 Button
on (release) {
_root.closeHelp();
}
Symbol 291 Button
on (release) {
_root.help_text = "Stay alive as long as possible.\nDestroy the enemies to earn points.\nGather the crates to get ammo and health.\nAvoid explosions and enemy bullets.";
}
Symbol 294 Button
on (release) {
_root.help_text = "There are three types of enemies... Soldiers, bombers, and helicopters. Hint: every enemy has a weak spot.";
}
Symbol 296 Button
on (release) {
_root.help_text = "Tap Left CTRL to crouch; while crouched your aiming with the gun is a lot better and you are a smaller target. If you start to move while crouched your guy stands up. You can stand on tower platforms but the platform floors do not block enemy fire. Falling aircraft cause explosions that do hurt you. EVERY explosion hurts you.";
}
Symbol 298 Button
on (release) {
_root.help_text = "Rockets are fired by clicking the left mouse button. Rockets will follow your mouse cursor to the best of their ability. Sharp turns may cause them to collide with other objects.";
}
Symbol 301 Button
on (release) {
_root.help_text = "The bow is fired the same was as bowmaster... If you don't know what I'm talking about go play BowMaster at lostvectors.com. The arrows fired from the bow explode on impact.";
}
Symbol 303 Button
on (release) {
_root.help_text = "The gun is a fully automatic rifle that does not need to reload via clips (lucky you) but can run out of ammo. The longer you fire the more wild your shots get. If you are crouched you can aim better. Notice your cross-hair icon change shape as you fire. The further the red-lines are from the center-mouse-possition the wilder your gun aiming is.";
}
Symbol 305 Button
on (release) {
_root.help_text = "Controls:\n";
_root.help_text = _root.help_text + "A (hold): Move Left\n";
_root.help_text = _root.help_text + "D (hold): Move Right\n";
_root.help_text = _root.help_text + "W (hold): Climb Up ladder\n";
_root.help_text = _root.help_text + "S (hold): Climb Down ladder\n";
_root.help_text = _root.help_text + "E: Throw Grenade\n";
_root.help_text = _root.help_text + "R: Throw Proximity Mine\n";
_root.help_text = _root.help_text + "SPACE BAR: Jump (Double tap to double jump)\n";
_root.help_text = _root.help_text + "Left CTRL: (Tap once) Crouch (provides better aiming but you cannot move while crouched)\n";
_root.help_text = _root.help_text + "#1-3 Change Firing Modes (Gun, Bow, Rocket)\n";
}
Symbol 307 MovieClip [help_screen] Frame 1
_root.help_text = "Controls:\n";
_root.help_text = _root.help_text + "A (hold): Move Left\n";
_root.help_text = _root.help_text + "D (hold): Move Right\n";
_root.help_text = _root.help_text + "W (hold): Climb Up ladder\n";
_root.help_text = _root.help_text + "S (hold): Climb Down ladder\n";
_root.help_text = _root.help_text + "E: Throw Grenade\n";
_root.help_text = _root.help_text + "R: Throw Proximity Mine\n";
_root.help_text = _root.help_text + "SPACE BAR: Jump (Double tap to double jump)\n";
_root.help_text = _root.help_text + "Left CTRL: (Tap once) Crouch (provides better aiming but you cannot move while crouched)\n";
_root.help_text = _root.help_text + "#1-3 Change Firing Modes (Gun, Bow, Rocket)\n";
Symbol 316 Button
on (release) {
_root.closeGameOver();
_root.restartGame();
}
Symbol 326 MovieClip [missile] Frame 1
function getTarget() {
minDist = 99999 /* 0x01869F */;
for (i in _root.enemies) {
temp_distx = _root.enemies[i].xpos - _x;
temp_disty = _root.enemies[i].ypos - _y;
temp_dist = Math.sqrt((temp_distx * temp_distx) + (temp_disty * temp_disty));
if ((temp_dist < minDist) && (_root.enemies[i].ypos > 0)) {
distx = temp_distx;
disty = temp_disty;
dist = temp_dist;
minDist = temp_dist;
target_enemy = _root.enemies[i];
target_enemy.locked_on = true;
}
}
_root.testball.targ = target_enemy;
target_acquired = true;
}
function step() {
placeSmoke();
dx = _root._xmouse - _x;
dy = _root._ymouse - _y;
dist = Math.sqrt((dx * dx) + (dy * dy));
vx = vx + ((g_missile_turn_rate * dx) / dist);
vy = vy + ((g_missile_turn_rate * dy) / dist);
normDist = Math.sqrt((vx * vx) + (vy * vy));
vx = (g_missile_speed * vx) / normDist;
vy = (g_missile_speed * vy) / normDist;
if (!flying) {
flying = true;
rocket.flame._alpha = 100;
}
prevDist = newDist;
newDist = dist;
if ((prevDist < newDist) && (!change_course)) {
change_course = true;
pass_count = 20;
} else if ((prevDist > newDist) && (change_course)) {
change_course = false;
}
trace("Pass count: " + pass_count);
radians = Math.atan(vy / vx);
if (vx == 0) {
radians = radians + Math.PI;
}
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
xprev = _x;
yprev = _y;
_x = (_x + vx);
_y = (_y + vy);
xcur = _x;
ycur = _y;
target_acquired = target_enemy.hp > 0;
testHitEnemies();
testHitObstructions();
if ((fuel--) < 0) {
_root.addSpark("spark", _x, _y, 10);
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 1)) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
}
function testHitObstructions() {
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_root.ground.ground_body.hitTest(_x, _y, 1))) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
for (i in _root.obstructions) {
if (_root.obstructions[i].hitTest(_x, _y, 1)) {
_root.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
}
function testBlastRadius() {
hitCount = 0;
temp = _root.addObj("blast_animation", _root.debris_layer, _root.getNextDebrisLvl);
temp._x = _x;
temp._y = _y;
temp._xscale = (temp._yscale = 50);
_root.playSound("bomb.wav");
for (ndx in _root.enemies) {
distx = _root.enemies[ndx].xpos - _x;
disty = _root.enemies[ndx].ypos - _y;
range = Math.sqrt((distx * distx) + (disty * disty));
trace("Distance: " + range);
if (range < g_missile_blast_range) {
_root.enemies[ndx].takeDamage(g_missile_damage);
if ((hitCount++) > 2) {
break;
}
}
}
}
function placeSmoke() {
lvl = _root.getNextSmokeLevel();
temp = _root.smoke_layer.attachMovie("segment", "segment_id_" + lvl, lvl);
temp._x = _x;
temp._y = _y;
temp._width = Math.sqrt((vx * vx) + (vy * vy));
temp._rotation = _rotation;
}
function scan() {
minDist = 99999 /* 0x01869F */;
ndx = 0;
while ((ndx < _root.enemies.length) && (!blownUp)) {
if ((blownUp = _root.enemies[ndx].hitTest(_x, _y, 1))) {
trace("Boom");
}
ndx++;
}
}
fy = 40;
scan_time = 5;
blownUp = false;
flying = false;
adjustmentTime = 20;
g_missile_turn_rate = 0.6;
g_missile_speed = 6;
g_missile_blast_range = 50;
g_missile_damage = 200;
fuel = 600;
prevDist = 9999;
newDist = 9999;
dist = 0;
change_course = false;
pass_count = 0;
radius = 50;
dmg = 45;
xmark = _x;
ymark = _y;
timeToMark = 9999;
nextTarget = 5;
Instance of Symbol 22 MovieClip "rocket" in Symbol 326 MovieClip [missile] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 329 MovieClip [enemy_bullet] Frame 1
function step() {
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitHero();
testHitObstructions();
}
function testHitHero() {
if (_root.hero.hitbox.hitTest(_x, _y, 0)) {
_root.hero.takeDamage(3);
c = 0;
while (c < 3) {
blood = _root.addObj("blood_drop", _root.debris_layer, _root.getNextDebrisLevel());
blood._x = _x;
blood._y = _y;
blood.vx = (vx / 3) + ((random(10) - random(10)) / 10);
blood.vy = (vy / 3) + ((random(10) - random(10)) / 10);
blood._xscale = (blood._yscale = 100 + random(200));
c++;
}
this.unloadMovie();
}
}
function testHitObstructions() {
if (_root.ground.ground_body.hitTest(_x, _y, 1)) {
_root.playSound("bomb.wav");
temp = _root.addObj("bullet_hole", _root.ground.blood_layer, _root.getNextBloodLevel());
temp._x = _x;
temp._y = _y;
this.unloadMovie();
}
for (i in _root.obstructions) {
if (_root.obstructions[i].hitTest(_x, _y, 0)) {
_root.obstructions[i].takeDamage(3);
_root.addSpark("spark_dust", _x, _y, 3);
_root.playSound("bomb.wav");
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 328 MovieClip in Symbol 329 MovieClip [enemy_bullet] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 330 MovieClip [hero_arrow] Frame 1
function setVelocity(xdelta, ydelta) {
trace((("setting x and y: " + xdelta) + " ") + ydelta);
vx = xdelta;
vy = ydelta;
}
function step() {
vy = vy + (_root.gravity * 2);
_y = (_y + vy);
_x = (_x + vx);
radians = Math.atan(vy / vx);
if (vx > 0) {
_rotation = ((radians * 180) / 3.14159);
} else {
_rotation = (((radians * 180) / 3.14159) + 180);
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
testHitEnemies();
testHitObstructions();
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitbox.hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
_root.addExplosion(_x, _y, range, dmg);
this.unloadMovie();
}
}
}
function testHitObstructions() {
if (_root.ground.ground_body.hitTest(_x, _y, 1)) {
_root.addExplosion(_x, _y, range, dmg);
_root.placeDebrisArrow(_x, _y, _rotation);
this.unloadMovie();
}
for (i in _root.obstructions) {
if (_root.obstructions[i].hitTest(_x, _y, 1)) {
_root.obstructions[i].takeDamage(3, _x, _y, vx, vy);
_root.addExplosion(_x, _y, range, dmg);
_root.placeDebrisArrow(_x, _y, _rotation);
this.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
range = 40;
dmg = 10;
Instance of Symbol 88 MovieClip in Symbol 330 MovieClip [hero_arrow] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 333 MovieClip [crater1] Frame 1
function step() {
if ((count++) > 200) {
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 332 MovieClip in Symbol 333 MovieClip [crater1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 334 MovieClip [anim_dead_body] Frame 1
stop();
Symbol 334 MovieClip [anim_dead_body] Frame 75
stop();
Symbol 335 MovieClip [blood_stump] Frame 1
function step() {
if (vx > 0) {
_rotation = (_rotation + rot_rate);
} else {
_rotation = (_rotation - rot_rate);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if ((timer--) < 0) {
this.unloadMovie();
}
testHitObstructions();
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
if (_root.ground.ground_body.hitTest(_x, _y + 2, 1)) {
if (Math.abs(vy) > 4) {
_root.placeBlood(_x, _y);
}
_root.placeDeadBody("body_dieing", _x, _y, vx);
this.unloadMovie();
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
timer = 500 + random(50);
rot_rate = random(3) + 3;
timeToSplat = 10;
blood_count = 0;
if (vx < 0) {
_xscale = -100;
}
testHitObstructions();
Instance of Symbol 334 MovieClip [anim_dead_body] "body" in Symbol 335 MovieClip [blood_stump] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 336 MovieClip [debris1] Frame 1
function step() {
if (vx > 0) {
_rotation = (_rotation + rot_rate);
} else {
_rotation = (_rotation - rot_rate);
}
vy = vy + _root.gravity;
xprev = _x;
yprev = _y;
_y = (_y + vy);
_x = (_x + vx);
if ((((_y < -10) || (_x < -10)) || (_x > xmax)) || (_y > ymax)) {
this.unloadMovie();
}
if (timer < 20) {
_alpha = (_alpha - 5);
}
if ((timer--) < 0) {
this.unloadMovie();
}
if ((smoke_count++) < 20) {
_root.placeSmoke(_x, _y);
}
}
function testHitEnemies() {
for (i in _root.enemies) {
if (_root.enemies[i].hitTest(_x, _y, 0)) {
_root.enemies[i].takeDamage(dmg);
_root.addSpark("spark", _x, _y, 3);
_root.playHitEnemySound();
this.unloadMovie();
}
}
}
function testHitObstructions() {
for (i in _root.obstructions) {
top = _root.obstructions[i].hitTest(_x, _y - 1, 1);
bottom = _root.obstructions[i].hitTest(_x, _y + 1, 1);
left = _root.obstructions[i].hitTest(_x - 1, _y, 1);
right = _root.obstructions[i].hitTest(_x + 1, _y, 1);
b_right = _root.obstructions[i].hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _root.obstructions[i].hitTest(_x - 0.7071, _y + 0.7071, 1);
if (top || (bottom)) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * 0.5;
rot_rate = rot_rate * 0.5;
} else if (bottom && (b_right || (b_left))) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
} else if (b_right || (b_left)) {
_x = xprev;
_y = yprev;
vy = vy * -0.5;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
} else if (left || (right)) {
_x = xprev;
_y = yprev;
vx = vx * -0.5;
rot_rate = rot_rate * 0.5;
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
timer = 50 + random(20);
rot_rate = 6;
timeToSmoke = 10;
Instance of Symbol 64 MovieClip in Symbol 336 MovieClip [debris1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 354 MovieClip Frame 1
function step() {
hitladder = ladder.hitTest(_root.hero._x, _root.hero._y, 0);
if (Key.isDown(_root.KEY_W)) {
if (hitladder) {
_root.hero.vx = 0;
_root.hero.vy = 0;
_root.hero._y = _root.hero._y - 1;
}
} else if (Key.isDown(_root.KEY_S)) {
if (hitladder) {
_root.hero.vx = 0;
_root.hero.vy = 0;
_root.hero._y = _root.hero._y + 1;
}
}
}
Instance of Symbol 351 MovieClip "mark_b" in Symbol 354 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Instance of Symbol 353 MovieClip in Symbol 354 MovieClip Frame 1
onClipEvent (load) {
_root.structures.push(this);
}
Instance of Symbol 198 MovieClip "ladder" in Symbol 354 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 356 MovieClip in Symbol 357 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = _root.bow._rotation;
}
Symbol 358 Button
on (press) {
startDrag (this);
_root.holding_string = true;
}
on (releaseOutside) {
stopDrag();
if (!_root.paused) {
_root.holding_string = false;
if (_root.ammo_arrows > 0) {
_root.shootArrow();
}
}
}
on (release) {
stopDrag();
if (!_root.paused) {
_root.holding_string = false;
if (_root.ammo_arrows > 0) {
_root.shootArrow();
}
}
}
Symbol 369 MovieClip Frame 1
stop();
Instance of Symbol 88 MovieClip in Symbol 369 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ammo_arrows > 0) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 369 MovieClip "bow_bod" in Symbol 370 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "bow") {
_alpha = 100;
} else {
_alpha = 0;
}
if (_root.holding_string) {
dx = _root.hero._x - _root.bow_string._x;
dy = _root.hero._y - _root.bow_string._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
dist = dist * 0.1;
if (dist > 10) {
dist = 10;
}
frame = Math.ceil(dist);
gotoAndStop(frame);
} else {
gotoAndStop (1);
}
}
Symbol 415 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 1
stop();
Instance of Symbol 416 MovieClip in Symbol 417 MovieClip Frame 1
onClipEvent (load) {
count = 1;
stopped = false;
gotoAndStop (75);
}
onClipEvent (enterFrame) {
pvx = Math.abs(_parent._parent.vx);
if (pvx > 0.5) {
stopped = false;
trace("Parent vx: " + _parent._parent.vx);
count = count + pvx;
if (count >= 60) {
count = 1;
}
gotoAndStop(Math.floor(count));
} else if (!stopped) {
if (count < 70) {
count = 75;
}
if (count <= 75) {
count = count + 0.2;
gotoAndStop(Math.floor(count));
} else {
stopped = true;
}
}
}
Instance of Symbol 416 MovieClip in Symbol 417 MovieClip Frame 3
onClipEvent (enterFrame) {
gotoAndStop (23);
}
Instance of Symbol 416 MovieClip in Symbol 417 MovieClip Frame 5
onClipEvent (load) {
frame = 76;
gotoAndStop(frame);
}
onClipEvent (enterFrame) {
count = _parent._parent.crouch_count;
trace("Count: " + count);
gotoAndStop(frame + count);
}
Instance of Symbol 369 MovieClip "bow_bod" in Symbol 418 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "bow") {
_alpha = 100;
} else {
_alpha = 0;
}
if (_root.holding_string) {
dx = _root.hero._x - _root.bow_string._x;
dy = _root.hero._y - _root.bow_string._y;
dist = Math.sqrt((dx * dx) + (dy * dy));
dist = dist * 0.1;
if (dist > 10) {
dist = 10;
}
frame = Math.ceil(dist);
gotoAndStop(frame);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 424 MovieClip in Symbol 425 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "gun") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 203 MovieClip in Symbol 425 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.shooting_mode == "gun") || (_root.shooting_mode == "bow")) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 427 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.rocket_smoke > -10) {
_root.rocket_smoke = _root.rocket_smoke - 5;
_alpha = _root.rocket_smoke;
}
}
Instance of Symbol 208 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_root.rocket_flame > -10) {
_root.rocket_flame = _root.rocket_flame - 10;
_alpha = _root.rocket_flame;
}
}
Instance of Symbol 429 MovieClip "launcher2" in Symbol 430 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 203 MovieClip in Symbol 430 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 424 MovieClip in Symbol 431 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "gun") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 203 MovieClip in Symbol 431 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.shooting_mode == "gun") || (_root.shooting_mode == "bow")) {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 429 MovieClip "launcher" in Symbol 431 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 203 MovieClip in Symbol 431 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 208 MovieClip "f2" in Symbol 433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 30);
}
}
Instance of Symbol 208 MovieClip "f3" in Symbol 433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 30);
}
}
Instance of Symbol 208 MovieClip "f1" in Symbol 433 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 30);
}
}
Instance of Symbol 430 MovieClip "rifle_invert" in Symbol 433 MovieClip Frame 1
onClipEvent (load) {
orig_x = _x;
}
onClipEvent (enterFrame) {
if (_x < orig_x) {
_x = (_x + ((orig_x - _x) / 2));
}
}
Instance of Symbol 432 MovieClip "rifle" in Symbol 433 MovieClip Frame 1
onClipEvent (load) {
orig_x = _x;
}
onClipEvent (enterFrame) {
if (_x < orig_x) {
_x = (_x + ((orig_x - _x) / 2));
}
}
Symbol 435 MovieClip Frame 1
function step() {
right_foot = _root.ground.ground_body.hitTest(_x + 6, _y, 1);
left_foot = _root.ground.ground_body.hitTest(_x - 6, _y, 1);
right_hand = _root.ground.ground_body.hitTest(_x + 6, _y - 8, 1);
left_hand = _root.ground.ground_body.hitTest(_x - 6, _y - 8, 1);
bottom = _root.ground.ground_body.hitTest(_x, _y, 1);
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 1)) {
struct_on = _root.structures[ndx];
hitstruct = true;
break;
}
}
bottom = bottom || (hitstruct);
grounded = _root.ground.hitTest(_x, _y + 5, 1) || (struct_on.hitTest(_x, _y + 5, 1));
if (grounded) {
jump_count = 0;
} else if (jump_count < 1) {
jump_count++;
}
if (right_hand) {
trace("Right hand hitting");
if (vx > 0) {
vx = 0;
}
vx = vx - 0.1;
} else if (left_hand) {
trace("Left hand hitting");
if (vx < 0) {
vx = 0;
}
vx = vx + 0.1;
}
if (bottom) {
if (vy > 3) {
crouch_count = 20;
crouching = true;
}
if (delta > 0) {
delta = 0;
}
delta = delta - 0.04;
vy = delta;
vx = vx * 0.85;
} else if (delta < 0) {
delta = 0;
}
if (_x < half_width) {
_x = half_width;
} else if (_x > (_root.g_width - half_width)) {
_x = (_root.g_width - half_width);
}
if (_y < half_height) {
_y = half_height;
} else if (_y > (_root.g_ground - half_height)) {
_y = (_root.g_ground - half_height);
}
if (!crouching) {
if (Key.isDown(_root.KEY_D) && (!right_hand)) {
body_dir = 1;
if (vx < 1.5) {
vx = vx + 0.2;
}
aim_error = 8;
max_spread = 20;
} else if (Key.isDown(_root.KEY_A) && (!left_hand)) {
body_dir = -1;
if (vx > -1.5) {
vx = vx - 0.2;
}
aim_error = 8;
max_spread = 20;
} else {
if ((vx < 0.01) && (vx > -0.01)) {
vx = 0;
} else {
vx = vx * 0.99;
}
if (grounded) {
aim_error = 5;
max_spread = 15;
} else {
aim_error = 15;
max_spread = 25;
}
}
} else {
max_spread = 5;
aim_error = 0;
}
if ((!wants_to_crouch) && (Key.isDown(_root.KEY_LEFTCONTROL))) {
wants_to_crouch = true;
}
if (wants_to_crouch && (grounded)) {
if ((vx > -0.01) && (vx < 0.01)) {
if (vx < 0) {
body_dir = -1;
} else if (vx > 0) {
body_dir = 1;
}
vx = 0;
crouching = true;
if (crouch_count < 20) {
crouch_count = crouch_count + 2;
}
} else {
vx = vx * 0.85;
}
} else if (crouch_count >= 1) {
crouch_count = crouch_count - 2;
} else {
crouching = false;
}
crouch_factor = crouch_count * 0.3;
if (((Key.isDown(_root.KEY_SPACEBAR) && (jump_count < 2)) && (space_released)) && (!crouching)) {
jump_count++;
space_released = false;
grounded = false;
vy = -2;
}
if (!Key.isDown(_root.KEY_SPACEBAR)) {
space_released = true;
holdcount = 0;
} else {
holdcount++;
wants_to_crouch = false;
}
if ((Key.isDown(_root.KEY_A) || (Key.isDown(_root.KEY_D))) || (Key.isDown(_root.KEY_W))) {
wants_to_crouch = false;
}
xprev = _x;
yprev = _y;
vy = vy + gravity;
animate();
_x = (_x + vx);
_y = (_y + vy);
checkFiring();
}
function checkFiring() {
if (_root.shooting_mode == "gun") {
if (timeToShoot > 0) {
timeToShoot--;
}
}
if (_root.shooting_mode == "rocket") {
if (timeToShootRocket > 0) {
timeToShootRocket--;
}
}
if (timeToThrow > 0) {
timeToThrow--;
}
if ((_root.firing && (_root.shooting_mode == "gun")) && (_root.ammo_bullets > 0)) {
if (timeToShoot <= 0) {
_root.shootHeroProjectile();
sight.f1._alpha = 100;
sight.f2._alpha = 100;
sight.f3._alpha = 100;
_root.aim_rate = 0;
if (_root.gun_wild < max_spread) {
_root.gun_wild = _root.gun_wild + 4;
}
timeToShoot = 7;
}
}
if ((_root.firing && (_root.shooting_mode == "rocket")) && (_root.ammo_rockets > 0)) {
if (timeToShootRocket <= 0) {
_root.shootHeroRocket();
timeToShootRocket = 100;
}
}
if (_root.gun_wild > aim_error) {
if (_root.aim_rate > 0) {
_root.aim_rate = 0;
}
_root.aim_rate = _root.aim_rate - 0.05;
} else {
if (_root.aim_rate < 0) {
_root.aim_rate = 0;
}
_root.aim_rate = _root.aim_rate + 0.05;
}
_root.gun_wild = _root.gun_wild + _root.aim_rate;
if ((Key.isDown(_root.KEY_E) && (timeToThrow <= 0)) && (_root.ammo_grenades > 0)) {
timeToThrow = 60;
_root.shootGrenade();
}
if ((Key.isDown(_root.KEY_R) && (timeToThrow <= 0)) && (_root.ammo_prox_mines > 0)) {
timeToThrow = 60;
_root.shootProximityMine();
}
}
function takeDamage(dmg) {
hp = hp - dmg;
}
function animate() {
if ((body_dir > 0) && (crouching)) {
body.gotoAndStop("crouch_right");
} else if ((body_dir < 0) && (crouching)) {
body.gotoAndStop("crouch_left");
} else if ((body_dir > 0) && (grounded)) {
body.gotoAndStop("run_right");
} else if ((body_dir < 0) && (grounded)) {
body.gotoAndStop("run_left");
} else if ((body_dir > 0) && (!grounded)) {
body.gotoAndStop("fly_right");
} else if ((body_dir < 0) && (!grounded)) {
body.gotoAndStop("fly_left");
}
}
delta = 0;
half_width = 5;
half_height = 13;
gravity = 0.08;
grounded = false;
vx = 0;
space_released = true;
holding = false;
xprev = 0;
yprev = 0;
holdcount = 0;
crouch_count = 1;
crouching = false;
body_dir = 1;
crouch_factor = 0;
timeToThrow = 10;
timeToShoot = 10;
timeToShootRocket = 10;
jump_count = 0;
aim_error = 0;
struct_on = null;
wants_to_crouch = false;
Instance of Symbol 370 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
yorig = _y;
}
onClipEvent (enterFrame) {
_y = (yorig + _parent.crouch_factor);
if (_parent.body_dir > 0) {
_alpha = 100;
} else {
_alpha = 0;
}
if (_root.holding_string) {
_rotation = (_parent.sight._rotation + 180);
}
}
Instance of Symbol 417 MovieClip "body" in Symbol 435 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 418 MovieClip in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
yorig = _y;
}
onClipEvent (enterFrame) {
_y = (yorig + _parent.crouch_factor);
if (_parent.body_dir < 0) {
_alpha = 100;
} else {
_alpha = 0;
}
if (_root.holding_string) {
_rotation = (_parent.sight._rotation + 180);
}
}
Instance of Symbol 433 MovieClip "sight" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
yorig = _y;
}
onClipEvent (enterFrame) {
_y = (yorig + _parent.crouch_factor);
dx = -((_root._xmouse - _root.hero._x) + 3.5);
dy = -(((_root._ymouse - _root.hero._y) + 15.8) - _parent.crouch_factor);
_root.hero.mdx = dx;
_root.hero.mdy = dy;
radians = Math.atan(dy / dx);
if (dx > 0) {
rifle._alpha = 0;
rifle_invert._alpha = 100;
_rotation = (((radians * 180) / Math.PI) + 180);
} else {
rifle._alpha = 100;
rifle_invert._alpha = 0;
_rotation = ((radians * 180) / Math.PI);
}
}
Instance of Symbol 434 MovieClip "hitbox" in Symbol 435 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
yorig = _y;
h_orig = _height;
}
onClipEvent (enterFrame) {
_height = (h_orig - _parent.crouch_factor);
}
Symbol 441 Button
on (keyPress "1") {
_root.shooting_mode = "gun";
_root.cross_hair.ch_gun._alpha = 100;
_root.cross_hair.ch_rocket._alpha = 0;
}
on (keyPress "2") {
_root.shooting_mode = "bow";
_root.cross_hair.ch_gun._alpha = 0;
_root.cross_hair.ch_rocket._alpha = 0;
}
on (keyPress "3") {
_root.shooting_mode = "rocket";
_root.cross_hair.ch_gun._alpha = 0;
_root.cross_hair.ch_rocket._alpha = 100;
}
on (keyPress "p") {
if (!_root.game_ended) {
_root.paused = !_root.paused;
}
}
Symbol 445 MovieClip Frame 1
function step() {
if (timeToWait > 0) {
timeToWait--;
} else {
_y = (_y + 1);
hitstruct = false;
for (ndx in _root.structures) {
if (_root.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_root.ground.ground_body.hitTest(_x, _y, 1))) {
_root.addRandomGoodie(_x, _y);
chute = _root.addObj("parachute_fade", _root.debris_layer, _root.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 23.8;
timeToWait = random(500) + 1000;
_y = -20;
_x = (random(_root.g_width - 30) + 15);
}
}
}
timeToWait = 0;
Instance of Symbol 444 MovieClip in Symbol 445 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 464 MovieClip Frame 1
function step() {
if (_root.paused) {
pause_text = "unpause";
} else {
pause_text = "pause";
}
}
pause_text = "pause";
Instance of Symbol 462 MovieClip in Symbol 464 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Symbol 465 Button
on (release) {
if (!_root.game_ended) {
_root.paused = !_root.paused;
}
}
on (keyPress "p") {
if (!_root.game_ended) {
_root.paused = !_root.paused;
}
}
Symbol 466 Button
on (release) {
if (!_root.game_ended) {
_root.openNamer();
}
}
Symbol 467 Button
on (release) {
_root.openHelp();
}
Symbol 468 Button
on (release) {
if (!_root.game_ended) {
_root.showTopScores();
}
}
Instance of Symbol 480 MovieClip in Symbol 481 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = _root.gun_wild;
}
Instance of Symbol 480 MovieClip in Symbol 481 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (-_root.gun_wild);
}
Instance of Symbol 480 MovieClip in Symbol 481 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = _root.gun_wild;
}
Instance of Symbol 480 MovieClip in Symbol 481 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (-_root.gun_wild);
}
Instance of Symbol 483 MovieClip "ch_rocket" in Symbol 484 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 490 Button
on (release) {
getURL ("http://www.lostvectors.com", "_self");
}
Instance of Symbol 359 MovieClip "string" in Symbol 495 MovieClip Frame 1
onClipEvent (load) {
time = 0;
}
onClipEvent (enterFrame) {
if (!_root.pause) {
if (!_root.holding) {
time = time + _root.elapsed;
}
if ((time > _root.g_bow_cooldown) && (!_root.holding)) {
_x = _root.bow._x;
_y = _root.bow._y;
_root.holding = true;
time = 0;
_alpha = 100;
}
}
}
Symbol 496 Button
on (release) {
_root.age = 18;
if (!_root.first_time_playing) {
_root.paused = false;
}
this.unloadMovie();
}
Symbol 497 Button
on (release) {
_root.age = 1;
if (!_root.first_time_playing) {
_root.paused = false;
}
this.unloadMovie();
}
Instance of Symbol 495 MovieClip in Symbol 507 MovieClip Frame 1
on (release) {
getURL ("http://www.lostvectors.com", "_self");
}
Instance of Symbol 506 MovieClip in Symbol 507 MovieClip Frame 1
on (release) {
getURL ("http://www.lostvectors.com", "_self");
}
onClipEvent (load) {
_alpha = 0;
}