Frame 1
totalBytes = Math.round(getBytesTotal() / 1024);
loadedBytes = Math.round(getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
percentone = totalBytes / 100;
percent = Math.round(loadedBytes / percentone);
if (_root._framesloaded >= _root._totalframes) {
gotoAndStop (5);
}
Instance of Symbol 345 MovieClip in Frame 1
onClipEvent (enterFrame) {
_xscale = (_root.percentDone * 4);
}
Frame 2
gotoAndPlay (1);
Frame 5
fscommand ("allowscale", false);
Frame 6
fscommand ("allowscale", false);
Frame 15
fscommand ("allowscale", false);
function saveData() {
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.score = _root.score + amt;
}
function gameOver() {
return(_root.hero.hp <= 0);
}
function endGame() {
_root.paused = true;
updatedTopScores();
openGameOver();
}
function updatedTopScores() {
var _local1 = _root;
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;
_local1.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;
_local1.end_text = "New high score! 2nd Place";
} else if (score > place_score_3) {
place_score_3 = score;
place_name_3 = player_name;
_local1.end_text = "New high score! 3rd Place";
} else if (score > 1000) {
_local1.end_text = "Nice shooting.";
} else if (score > 700) {
_local1.end_text = "Not bad. Keep Practicing";
} else if (score > 400) {
_local1.end_text = "Ouch... better luck next time.";
} else {
_local1.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() {
var _local1 = _root;
game_ended = false;
_local1.level_ticker = 0;
_local1.fps_ticks = 0;
_local1.fps_total = 0;
_local1.avg_fps = 0;
_local1.max_fps = 0;
_local1.min_fps = 9999;
_local1.stepper.resetStepperVars();
_local1.hero.hp = 100;
_local1.hero.vx = 0;
_local1.hero.vy = 0;
_local1.score = 0;
_local1.level = 1;
_local1.ammo_grenades = 15;
_local1.ammo_arrows = 25;
_local1.ammo_bullets = 500;
_local1.ammo_rockets = 10;
_local1.ammo_prox_mines = 20;
_local1.hero._x = _local1.g_width / 2;
_local1.hero._y = _local1.g_ground / 2;
_local1.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 closeTopScores() {
top_scores_screen.unloadMovie();
}
function openNamer() {
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() {
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() {
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() {
help_screen.unloadMovie();
}
function playHitEnemySound() {
playSound(hurtsounds[random(3)]);
}
function addRandomGoodie(x, y) {
var _local1 = _root;
bonus = powerups[random(powerups.length)];
if (bonus == "gas_can") {
obs = _local1.addObj(bonus, _local1.obstruct_layer, _local1.getNextObstructionLevel());
obs._x = x;
obs._y = y;
} else {
obs = _local1.addObj(bonus, _local1.powerup_layer, _local1.getNextPowerUpLevel());
obs._x = x;
obs._y = y;
}
}
function playSound(filename) {
mysound = new Sound();
mysound.attachSound(filename);
mysound.start(0, 1);
}
function removeEnemy(ene) {
var _local1 = ene;
tempArray = new Array();
for (i in enemies) {
nextEn = enemies[i];
if (_local1 != nextEn) {
tempArray.push(nextEn);
}
}
_local1.unloadMovie();
enemies = tempArray;
}
function removeMine(mi) {
var _local1 = mi;
tempArray = new Array();
for (i in mines) {
nextObj = mines[i];
if (_local1 != nextObj) {
tempArray.push(nextObj);
}
}
_local1.unloadMovie();
mines = tempArray;
}
function removeObstruction(obs) {
var _local1 = obs;
tempArray = new Array();
for (i in obstructions) {
nextObs = obstructions[i];
if (_local1 != nextObs) {
tempArray.push(nextObs);
}
}
_local1.unloadMovie();
obstructions = tempArray;
}
function shootHeroProjectile() {
var _local1 = _root;
playSound("tat2.wav");
ammo_bullets--;
_local1.hero.sight.rifle_invert._x = _local1.hero.sight.rifle_invert._x - 3;
_local1.hero.sight.rifle._x = _local1.hero.sight.rifle._x - 3;
shot_speed = 7;
variation = (random(Math.floor(_local1.gun_wild * 100)) - random(Math.floor(_local1.gun_wild * 100))) / 300;
rads = ((_local1.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _local1.shot_speed * Math.cos(rads);
lvy = _local1.shot_speed * Math.sin(rads);
lvl = getNextProjectileLevel();
proj = _local1.addObj("hero_bullet", _local1.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 = _local1.hero.sight._rotation;
}
function shootHeroRocket() {
var _local1 = _root;
playSound("shoot_rocket.wav");
rocket_smoke = 105;
rocket_flame = 130;
ammo_rockets--;
targ_ene = null;
targ_acq = false;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_xmouse, _ymouse, 0)) {
targ_ene = _local1.enemies[i];
targ_acq = true;
break;
}
}
_local1.hero.sight.rifle_invert._x = _local1.hero.sight.rifle_invert._x - 5;
_local1.hero.sight.rifle._x = _local1.hero.sight.rifle._x - 5;
shot_speed = 6;
rads = (_local1.hero.sight._rotation * Math.PI) / 180;
lvx = _local1.shot_speed * Math.cos(rads);
lvy = _local1.shot_speed * Math.sin(rads);
lvl = getNextRocketLevel();
proj = _local1.addObj("missile", _local1.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 = _local1.hero.sight._rotation;
proj.target_enemy = targ_ene;
proj.target_acquired = targ_acq;
}
function shootGrenade() {
var _local1 = _root;
ammo_grenades--;
shot_speed = 3.3;
variation = 0;
rads = ((_local1.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _local1.shot_speed * Math.cos(rads);
lvy = _local1.shot_speed * Math.sin(rads);
lvl = getNextProjectileLevel();
proj = _local1.addObj("hero_grenade", _local1.projectile_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = ((hero._x + hero.sight._x) + lvx) + _local1.hero.vx;
proj._y = ((hero._y + hero.sight._y) + lvy) + _local1.hero.vy;
}
function shootProximityMine() {
var _local1 = _root;
ammo_prox_mines--;
shot_speed = 3.3;
variation = 0;
rads = ((_local1.hero.sight._rotation + variation) * Math.PI) / 180;
lvx = _local1.shot_speed * Math.cos(rads);
lvy = _local1.shot_speed * Math.sin(rads);
lvl = getNextMineLevel();
proj = _local1.addObj("proximity_mine", _local1.mine_layer, lvl);
proj.vx = lvx;
proj.vy = lvy;
proj._x = ((hero._x + hero.sight._x) + lvx) + _local1.hero.vx;
proj._y = ((hero._y + hero.sight._y) + lvy) + _local1.hero.vy;
mines.push(proj);
}
function placeBlood(x, y) {
var _local1 = _root;
if (_local1.age >= 17) {
playSound("blood_splat.wav");
lvl = getNextCraterLevel();
temp = _local1.addObj("crater2", _local1.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) {
var _local1 = _root;
lvl = getNextEnemyLevel();
temp = _local1.addObj(etype, _local1.enemy_layer, lvl);
temp._x = x;
temp._y = y;
temp.vx = vx;
temp.vy = vy;
enemies.push(temp);
_local1.enemy_count = _local1.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 addVanhit(x, y, radius, dmg) {
var _local1 = _root;
var _local2 = radius;
playSound("bomb_hit.wav");
dx = _local1.hero._x - x;
dy = (_local1.hero._y - 20) - y;
dist = getDist(x, y, _local1.hero._x, _local1.hero._y - 20);
if (dist < _local2) {
_local1.hero._y = _local1.hero._y - 60;
impact = Math.ceil((dmg * (_local2 - dist)) / _local2);
fly = impact;
if (impact > 20) {
fly = 20;
}
_local1.hero.vx = (((-dx) / dist) * fly) * 0.39;
_local1.hero.vy = (((-dy) / dist) * fly) * 0.39;
_local1.hero.takeDamage(impact);
}
}
function addExplosion(x, y, radius, dmg) {
var _local1 = _root;
var _local2 = radius;
var _local3 = y;
playSound("bomb_hit.wav");
lvl = getNextCraterLevel();
temp = _local1.addObj("crater1", _local1.ground.crater_layer, lvl);
temp._x = x;
temp._y = _local3;
temp._rotation = random(360);
lvl = getNextDebrisLevel();
temp = _local1.addObj("explosion", _local1.debris_layer, lvl);
temp._x = x;
temp._y = _local3;
temp._xscale = (temp._yscale = _local2);
deb = Math.ceil(_local2 / 20);
i = 0;
while (i < deb) {
lvl = getNextDebrisLevel();
temp = _local1.addObj("debris1", _local1.debris_layer, lvl);
temp._x = x;
temp._y = _local3;
temp.vx = (random(100) - random(100)) / 50;
temp.vy = ((-random(100)) / 50) - 2;
i++;
}
for (i in _local1.enemies) {
ene = enemies[i];
dx = ene._x - x;
dy = (ene._y - 20) - _local3;
dist = getDist(x, _local3, ene._x, ene._y - 20);
if (dist < _local2) {
ene.deathCode = "exploded";
impact = Math.ceil((dmg * (_local2 - dist)) / _local2);
ene.explosion_impact = impact;
ene.explosion_dx = (((-dx) / dist) * impact) * 0.4;
ene.explosion_dy = (((-dy) / dist) * impact) * 2;
ene.takeDamage(impact, ene._x, ene._y, vx, vy);
}
}
for (i in _local1.obstructions) {
obs = obstructions[i];
dist = getDist(x, _local3, obs._x, obs._y);
if (dist < _local2) {
obs.leaking = obs.leaking + (random(10) / 10);
obs.deathCode = "exploded";
obs.explosion_dist = -dx;
}
}
for (i in _local1.mines) {
obs = mines[i];
dist = getDist(x, _local3, obs._x, obs._y);
if (dist < _local2) {
obs.leaking = obs.leaking + (2 + (random(10) / 10));
obs.deathCode = "exploded";
}
}
dx = _local1.hero._x - x;
dy = (_local1.hero._y - 20) - _local3;
dist = getDist(x, _local3, _local1.hero._x, _local1.hero._y - 20);
if (dist < _local2) {
_local1.hero._y = _local1.hero._y - 2;
impact = Math.ceil((dmg * (_local2 - dist)) / _local2);
fly = impact;
if (impact > 15) {
fly = 15;
}
_local1.hero.vx = (((-dx) / dist) * fly) * 0.33;
_local1.hero.vy = (((-dy) / dist) * fly) * 0.33;
_local1.hero.takeDamage(impact);
}
}
function addBloodExplosion(x, y) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
if (_local1.age >= 17) {
placeBlood(_local3, _local2 + 20);
c = 0;
while (c < 10) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.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 = _local3;
blood._y = _local2;
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);
}
var amitavaland = false;
var amitavasolnum = 3;
var amitavaenemyland = 0;
this.attachMovie("ff", "ff", 2);
this.attachMovie("cl", "cl", 6);
KEY_W = 87;
KEY_E = 83;
KEY_Q = 81;
KEY_A = 90;
KEY_S = 88;
KEY_D = 67;
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 = 68;
KEY_SPACEBAR = 32;
KEY_LEFTCONTROL = 17;
g_width = 750;
g_ground = 375;
paused = false;
_root.age = 2;
end_text = "Nice shooting!";
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;
myLocalSO = sharedobject.getLocal("gm02");
if (myLocalSO.data.place_score_1 != null) {
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 {
_root.place_score_1 = 300;
_root.place_score_2 = 200;
_root.place_score_3 = 100;
_root.paused = true;
openHelp();
}
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 = 3;
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;
openHelp();
Instance of Symbol 404 MovieClip "hb" in Frame 15
onClipEvent (load) {
}
onClipEvent (enterFrame) {
this._width = _root.hero.hp;
}
Instance of Symbol 108 MovieClip "gm" in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 447 MovieClip "cross_hair" in Frame 15
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 453 MovieClip in Frame 15
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 335 MovieClip [help_screen] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 456 MovieClip "stepper" in Frame 15
onClipEvent (load) {
function resetStepperVars() {
timeToNextEnemy = 100 + random(100);
timeToNextBomber = 200 + random(50);
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;
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;
}
ene_type = random(4);
if (((!_root.paused) && (_root.enemy_count < _root.max_enemies_on_screen)) && ((timeToNextDrop--) <= 0)) {
timeToNextDrop = random(200) + 100;
if (ene_type == 0) {
_root.placeEnemy("enemy_drop", ((_root.g_width / 2) + random(500)) - random(100), -10, 0, 0);
}
if (ene_type == 1) {
if (random(2) == 0) {
_root.placeEnemy("enemy_drop_sniper", _root.tower_left._x, 100, 0, 0);
} else {
_root.placeEnemy("enemy_drop_sniper", _root.tower_right._x, 100, 0, 0);
}
}
if (ene_type == 2) {
if (random(2) == 0) {
ene = _root.placeEnemy("enemy_chopper", -200, 50, 0, 0);
ene._xscale = -100;
} else {
ene = _root.placeEnemy("enemy_chopper", _root.g_width - 50, -10, 0, 0);
ene._xscale = 100;
}
}
if (ene_type == 3) {
if (random(2) == 0) {
_root.placeEnemy("enemy_bomber", -44, random(100) + 20, 1, 0);
} else {
_root.placeEnemy("enemy_bomber", _root.g_width + 44, random(100) + 20, -1, 0);
}
}
if ((_root.level_ticker++) > 3000) {
_root.level_ticker = 0;
_root.level++;
}
}
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)) {
_root.game_ended = true;
_root.endGame();
}
_root.enemy_count = _root.enemies.length;
_root.mine_count = _root.mines.length;
updateAfterEvent();
}
Instance of Symbol 326 MovieClip [enemy_chopper] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 315 MovieClip [chopper_dead] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 308 MovieClip [enemy_bomber] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 252 MovieClip [bomber_dead] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 470 MovieClip in Frame 15
onClipEvent (load) {
this.unloadMovie();
_root.paused = true;
_x = (_root.g_width / 2);
_y = (_root.g_ground / 2);
}
Instance of Symbol 504 MovieClip "van" in Frame 15
onClipEvent (load) {
function testHitHero() {
var _local1 = _root;
if (_local1.hero.hitbox.hitTest(this)) {
_local1.hero.takeDamage(2);
_local1.addVanhit(_x, _y, 1000, 10);
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.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++;
}
}
}
mov = false;
wait = 0;
bmov = false;
comback = 1;
life = 16;
die = false;
inj = false;
counter = 0;
radcount = random(1000);
}
onClipEvent (enterFrame) {
testHitHero();
if (_root.hero.hp < 0) {
this.unloadMovie();
}
if (_root.paused == false) {
if (_root.amitavasolnum == 3) {
counter++;
if (counter >= radcount) {
if (comback == 1) {
_root.amitavaland = false;
life = 16;
bmov = false;
_x = -200;
mov = true;
comback = 0;
}
}
}
if (die == false) {
if ((mov == true) && (inj == false)) {
_x = (_x + 1);
this.gotoAndStop(1);
}
if ((bmov == true) && (inj == false)) {
_x = (_x - 2);
this.gotoAndStop(6);
}
if ((_x > 200) && (inj == false)) {
_root.amitavasolnum = 0;
wait++;
mov = false;
this.gotoAndStop(2);
}
if ((wait > 100) && (die == false)) {
wait = 0;
bmov = true;
_root.sol1._x = 214;
_root.sol2._x = 120;
_root.sol3._x = 30;
_root.sol1.die = false;
_root.sol2.die = false;
_root.sol3.die = false;
_root.sol1.pl = 1;
_root.sol2.pl = 1;
_root.sol3.pl = 1;
_root.sol1.life = 5;
_root.sol2.life = 5;
_root.sol3.life = 5;
_root.sol1.step();
_root.sol2.step();
_root.sol3.step();
_root.amitavaland = true;
_root.amitavaenemyland = 0;
comback = 1;
counter = 0;
radcount = random(1000);
}
}
}
}
Instance of Symbol 513 MovieClip "sol3" in Frame 15
onClipEvent (load) {
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + 1.5);
_x = (_x + vx);
bottom = _local1.ground.ground_body.hitTest(_x, _y + 20, 1);
if (bottom) {
chute._x = _x;
chute._y = _y - 32.3;
dx = _local1.hero._x - _x;
dir = Math.abs(dx) / dx;
_local1.placeEnemy("groundsol", _x, _y, 0.5 * dir, vy);
this._x = -200;
_local1.amitavaenemyland = _local1.amitavaenemyland + 1;
if (_local1.amitavaenemyland == 3) {
_local1.amitavaland = false;
}
}
}
function takeDamage(dmg, x, y, vx, vy) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (this.weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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++;
}
}
}
ri = 1;
lef = 0;
die = false;
pl = 1;
life = 5;
hp = 5;
half_height = _height / 2;
timeToNade = 200 + random(100);
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 513 MovieClip "sol2" in Frame 15
onClipEvent (load) {
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + 1.5);
_x = (_x + vx);
bottom = _local1.ground.ground_body.hitTest(_x, _y + 20, 1);
if (bottom) {
chute._x = _x;
chute._y = _y - 32.3;
dx = _local1.hero._x - _x;
dir = Math.abs(dx) / dx;
_local1.placeEnemy("groundsol", _x, _y, 0.5 * dir, vy);
this._x = -200;
_local1.amitavaenemyland = _local1.amitavaenemyland + 1;
if (_local1.amitavaenemyland == 3) {
_local1.amitavaland = false;
}
}
}
function takeDamage(dmg, x, y, vx, vy) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (this.weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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++;
}
}
}
ri = 1;
lef = 0;
die = false;
pl = 1;
life = 5;
hp = 5;
half_height = _height / 2;
timeToNade = 200 + random(100);
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 513 MovieClip "sol1" in Frame 15
onClipEvent (load) {
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + 1.5);
_x = (_x + vx);
bottom = _local1.ground.ground_body.hitTest(_x, _y + 20, 1);
if (bottom) {
chute._x = _x;
chute._y = _y - 32.3;
dx = _local1.hero._x - _x;
dir = Math.abs(dx) / dx;
_local1.placeEnemy("groundsol", _x, _y, 0.5 * dir, vy);
this._x = -200;
_local1.amitavaenemyland = _local1.amitavaenemyland + 1;
if (_local1.amitavaenemyland == 3) {
_local1.amitavaland = false;
}
}
}
function takeDamage(dmg, x, y, vx, vy) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (this.weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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++;
}
}
}
ri = 1;
lef = 0;
die = false;
pl = 1;
life = 5;
hp = 5;
half_height = _height / 2;
timeToNade = 200 + random(100);
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 245 MovieClip [enemy_sniper] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 238 MovieClip [enemy_drop_sniper] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 236 MovieClip [enemy_sniper_death] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 234 MovieClip [blood_stump_fem] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 231 MovieClip [enemy1] in Frame 15
onClipEvent (load) {
}
Instance of Symbol 227 MovieClip [enemy_drop] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 223 MovieClip [blood_stump] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 204 MovieClip [debris1] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 203 MovieClip [groundsol] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Instance of Symbol 176 MovieClip [game_over_screen] in Frame 15
onClipEvent (load) {
this.unloadMovie();
}
Symbol 13 MovieClip [am] Frame 1
var ssc = "amitavagame";
Symbol 14 MovieClip [ff] Frame 1
if (((((_root.cl.ais == true) && (_root.cl.bis == true)) && (_root.cl.mis == true)) && (_root.cl.pis == true)) && (_root.cl.gis == true)) {
this.attachMovie("am", "am", 3);
} else {
removeMovieClip("am");
}
Symbol 15 MovieClip [cl] Frame 1
_root.chkload = true;
var ais = false;
var bis = false;
var mis = false;
var pis = false;
var gis = false;
var listener = new Object();
listener.onKeyDown = function () {
var _local1 = Key.getCode();
if (_local1 == 65) {
ais = true;
}
if (_local1 == 66) {
bis = true;
}
if (_local1 == 77) {
mis = true;
}
if (_local1 == 71) {
pis = true;
}
if (_local1 == 73) {
gis = true;
}
};
Key.addListener(listener);
listener.onKeyUp = function () {
var _local1 = Key.getCode();
if (_local1 == 65) {
ais = false;
}
if (_local1 == 66) {
bis = false;
}
if (_local1 == 77) {
mis = false;
}
if (_local1 == 71) {
pis = false;
}
if (_local1 == 73) {
gis = false;
} else {
ais = false;
bis = false;
mis = false;
pis = false;
gis = false;
}
};
Key.addListener(listener);
Symbol 21 MovieClip Frame 20
this.unloadMovie();
Symbol 26 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 1
stop();
Instance of Symbol 40 MovieClip in Symbol 41 MovieClip Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
Symbol 42 MovieClip Frame 65
stop();
Symbol 43 MovieClip [body_dieing] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 42 MovieClip in Symbol 43 MovieClip [body_dieing] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 46 MovieClip Frame 24
this.unloadMovie();
Instance of Symbol 46 MovieClip in Symbol 47 MovieClip [smoke] Frame 1
onClipEvent (load) {
_rotation = random(360);
rate = (random(100) - 50) / 10;
}
onClipEvent (enterFrame) {
_rotation = (_rotation + rate);
}
Symbol 50 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
for (i in _local1.obstructions) {
top = _local1.obstructions[i].hitTest(_x, _y - 1, 1);
bottom = _local1.obstructions[i].hitTest(_x, _y + 1, 1);
left = _local1.obstructions[i].hitTest(_x - 1, _y, 1);
right = _local1.obstructions[i].hitTest(_x + 1, _y, 1);
b_right = _local1.obstructions[i].hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _local1.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 49 MovieClip in Symbol 50 MovieClip [debris2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 54 MovieClip [parachute_fade] Frame 20
this.unloadMovie();
Symbol 58 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 57 MovieClip "can_animation" in Symbol 58 MovieClip [gas_can] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 79 MovieClip Frame 1
stop();
Symbol 81 MovieClip [ammo_prox_mine] Frame 1
function step() {
var _local1 = _root;
var _local2 = this;
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_local1.addGrenadeExplosion(_x, _y);
_local1.removeObstruction(_local2);
} else if (_alpha <= 0) {
_local1.removeObstruction(_local2);
} else if (hitTest(_local1.hero._x, _local1.hero._y, 0)) {
_local1.ammo_prox_mines = _local1.ammo_prox_mines + 10;
_local1.removeObstruction(_local2);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 80 MovieClip in Symbol 81 MovieClip [ammo_prox_mine] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 84 MovieClip [ammo_grenade] Frame 1
function step() {
var _local1 = _root;
var _local2 = this;
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_local1.addGrenadeExplosion(_x, _y);
_local1.removeObstruction(_local2);
} else if (_alpha <= 0) {
_local1.removeObstruction(_local2);
} else if (hitTest(_local1.hero._x, _local1.hero._y, 0)) {
_local1.ammo_grenades = _local1.ammo_grenades + 10;
_local1.removeObstruction(_local2);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 83 MovieClip in Symbol 84 MovieClip [ammo_grenade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 87 MovieClip [ammo_health] Frame 1
function step() {
var _local1 = _root;
var _local2 = this;
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_local1.addGrenadeExplosion(_x, _y);
_local1.removeObstruction(_local2);
} else if (_alpha <= 0) {
_local1.removeObstruction(_local2);
} else if (hitTest(_local1.hero._x, _local1.hero._y, 0)) {
_local1.hero.hp = _local1.hero.hp + 20;
if (_local1.hero.hp > 100) {
_local1.hero.hp = 100;
}
_local1.removeObstruction(_local2);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 86 MovieClip in Symbol 87 MovieClip [ammo_health] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 90 MovieClip [ammo_gun] Frame 1
function step() {
var _local1 = _root;
var _local2 = this;
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_local1.addGrenadeExplosion(_x, _y);
_local1.removeObstruction(_local2);
} else if (_alpha <= 0) {
_local1.removeObstruction(_local2);
} else if (hitTest(_local1.hero._x, _local1.hero._y, 0)) {
_local1.ammo_bullets = _local1.ammo_bullets + 200;
_local1.removeObstruction(_local2);
}
}
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_gun] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 93 MovieClip [ammo_rocket] Frame 1
function step() {
var _local1 = _root;
var _local2 = this;
if ((count++) > 1000) {
_alpha = (_alpha - 5);
}
if (hp <= 0) {
_local1.addGrenadeExplosion(_x, _y);
_local1.removeObstruction(_local2);
} else if (_alpha <= 0) {
_local1.removeObstruction(_local2);
} else if (hitTest(_local1.hero._x, _local1.hero._y, 0)) {
_local1.ammo_rockets = _local1.ammo_rockets + 10;
_local1.removeObstruction(_local2);
}
}
function takeDamage(amt, _x, _y, vx, vy) {
hp = hp - amt;
}
_root.obstructions.push(this);
hp = 20;
Instance of Symbol 92 MovieClip in Symbol 93 MovieClip [ammo_rocket] Frame 1
onClipEvent (enterFrame) {
_parent.step();
}
Symbol 97 MovieClip Frame 1
stop();
Symbol 98 MovieClip [bullet_hole] Frame 1
function step() {
if ((count++) > 200) {
_alpha = (_alpha - 1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip [bullet_hole] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 99 MovieClip Frame 27
stop();
Symbol 100 MovieClip [body_dieing2] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 99 MovieClip in Symbol 100 MovieClip [body_dieing2] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 103 MovieClip [crater2] Frame 1
function step() {
if ((count++) > 20) {
_alpha = (_alpha - 1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 102 MovieClip in Symbol 103 MovieClip [crater2] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 106 MovieClip [blood_splat] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 105 MovieClip in Symbol 106 MovieClip [blood_splat] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 109 MovieClip [proximity_mine] Frame 1
function step() {
var _local1 = _root;
if (placed) {
vx = 0;
vy = 0;
hp = hp - leaking;
if (hp <= 0) {
_local1.addExplosion(_x, _y, range, dmg);
_local1.removeMine(this);
}
if ((timeToScan++) > 50) {
timeToScan = 0;
scan();
}
} else {
if (vx > 0) {
_rotation = (_rotation + 3);
} else {
_rotation = (_rotation - 3);
}
vy = vy + _local1.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() {
var _local1 = _root;
for (i in _local1.enemies) {
ene = _local1.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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
placed = false;
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_local1.ground.ground_body.hitTest(_x, _y, 1))) {
placed = true;
} else {
do {
if ((in _local1.obstructions) == null) {
break;
}
i = in _local1.obstructions;
placed = _local1.obstructions[i].hitTest(_x, _y, 0);
} while (!placed);
do {
} while (_local1 != 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 108 MovieClip "gm" in Symbol 109 MovieClip [proximity_mine] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 111 MovieClip [blood_drop] Frame 1
function step() {
var _local1 = _root;
vy = vy + mygrav;
_x = (_x + vx);
_y = (_y + vy);
if (_local1.ground.ground_body.hitTest(_x, _y, 1)) {
lvl = _local1.getNextBloodLevel();
temp = _local1.addObj("blood_splat", _local1.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 110 MovieClip in Symbol 111 MovieClip [blood_drop] Frame 1
onClipEvent (load) {
if (_root.age < 17) {
this.unloadMovie();
}
}
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 116 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitbox.hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(3, _x, _y, vx, vy);
_local1.addSpark("spark", _x, _y, 3);
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
var _local2 = this;
if (_local1.ground.ground_body.hitTest(_x, _y, 1)) {
_local1.playSound("bomb.wav");
temp = _local1.addObj("bullet_hole", _local1.ground.blood_layer, _local1.getNextBloodLevel());
temp._x = _x;
temp._y = _y;
_local2.unloadMovie();
}
for (i in _local1.obstructions) {
if (_local1.obstructions[i].hitTest(_x, _y, 0)) {
_local1.obstructions[i].takeDamage(3, _x, _y, vx, vy);
_local1.addSpark("spark_dust", _x, _y, 3);
_local1.playSound("bomb.wav");
_local2.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 115 MovieClip in Symbol 116 MovieClip [hero_bullet] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.sol1) && (_root.sol1.die == false)) {
if (_root.sol1.life > 0) {
_root.sol1.life = _root.sol1.life - 1;
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
} else {
_root.sol1.die = true;
_root.sol1.gotoAndPlay(7);
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
}
}
if (this.hitTest(_root.sol2) && (_root.sol2.die == false)) {
if (_root.sol2.life > 0) {
_root.sol2.life = _root.sol2.life - 1;
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
} else {
_root.sol2.die = true;
_root.sol2.gotoAndPlay(7);
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
}
}
if (this.hitTest(_root.sol3) && (_root.sol3.die == false)) {
if (_root.sol3.life > 0) {
_root.sol3.life = _root.sol3.life - 1;
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
} else {
_root.sol3.die = true;
_root.sol3.gotoAndPlay(7);
_root.sol1.takeDamage(3, _x, _y, vx, vy);
_root.addSpark("spark", _x, _y, 3);
this.unloadMovie();
}
}
if (this.hitTest(_root.van) && (_root.van.inj == false)) {
if (_root.van.life > 0) {
_root.van.inj = true;
_root.van.life = _root.van.life - 1;
_root.van.gotoAndStop(3);
this.unloadMovie();
} else {
_root.van.gotoAndStop(5);
_root.van.inj = true;
_root.van.die = true;
this.unloadMovie();
}
}
}
Symbol 120 MovieClip [enemy_rocket] Frame 1
function step() {
_x = (_x + vx);
_y = (_y + vy);
if ((((_x < xmin) || (_x > xmax)) || (_y < ymin)) || (_y > ymax)) {
this.unloadMovie();
}
placeSmoke();
testHitObstructions();
testHitHero();
}
function testHitObstructions() {
var _local1 = _root;
var _local2 = this;
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_local1.ground.ground_body.hitTest(_x, _y, 1))) {
_local1.addExplosion(_x, _y, radius, dmg);
_local2.unloadMovie();
}
for (i in _local1.obstructions) {
if (_local1.obstructions[i].hitTest(_x, _y, 1)) {
_local1.addExplosion(_x, _y, radius, dmg);
_local2.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;
Instance of Symbol 119 MovieClip in Symbol 120 MovieClip [enemy_rocket] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 125 MovieClip [enemy_bomb_drop] Frame 1
function step() {
var _local1 = _root;
vy = vy + (_local1.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)) {
_local1.removeEnemy(this);
}
if ((_y > 200) || (hp <= 0)) {
hitstruct = false;
if ((_y > 200) && (_y < 260)) {
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
}
if (((hitstruct || (hp <= 0)) || (_local1.ground.ground_body.hitTest(_x, _y, 1))) || (_y > _local1.g_ground)) {
_local1.addExplosion(_x, _y, 110, 50);
_local1.removeEnemy(this);
}
}
}
function takeDamage(amt, x, y, vx, vy) {
hp = hp - amt;
}
hp = 1;
xpos = _x;
ypos = _y;
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
xmin = -10;
ymin = -10;
etype = "bomb";
if (vx < 0) {
_xscale = -100;
}
Instance of Symbol 122 MovieClip in Symbol 125 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "hitbox" in Symbol 125 MovieClip [enemy_bomb_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 126 MovieClip [arrow_debris] Frame 1
function step() {
if ((count++) > 200) {
_alpha = (_alpha - 1);
if (_alpha <= 0) {
this.unloadMovie();
}
}
}
Symbol 129 MovieClip [explosion] Frame 10
if (this.hitTest(_root.van) && (_root.van.inj == false)) {
if (_root.van.life > 0) {
_root.van.inj = true;
_root.van.life = _root.van.life - 16;
_root.addExplosion(_x, _y, radius, dmg);
_root.van.gotoAndStop(3);
this.unloadMovie();
} else {
_root.addExplosion(_x, _y, radius, dmg);
_root.van.gotoAndStop(5);
_root.van.inj = true;
_root.van.die = true;
this.unloadMovie();
}
}
this.unloadMovie();
Symbol 131 MovieClip Frame 1
stop();
Symbol 132 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
if (_y > max_obs_elevation) {
top = _local1.ground.ground_body.hitTest(_x, _y - 1, 1);
bottom = _local1.ground.ground_body.hitTest(_x, _y + 1, 1);
left = _local1.ground.ground_body.hitTest(_x - 1, _y, 1);
right = _local1.ground.ground_body.hitTest(_x + 1, _y, 1);
b_right = _local1.ground.ground_body.hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _local1.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 _local1.obstructions) {
bottom = _local1.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 131 MovieClip in Symbol 132 MovieClip [hero_grenade] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 136 MovieClip [missile] Frame 1
function getTarget() {
var _local1 = _root;
minDist = 99999 /* 0x01869F */;
for (i in _local1.enemies) {
temp_distx = _local1.enemies[i].xpos - _x;
temp_disty = _local1.enemies[i].ypos - _y;
temp_dist = Math.sqrt((temp_distx * temp_distx) + (temp_disty * temp_disty));
if ((temp_dist < minDist) && (_local1.enemies[i].ypos > 0)) {
distx = temp_distx;
disty = temp_disty;
dist = temp_dist;
minDist = temp_dist;
target_enemy = _local1.enemies[i];
target_enemy.locked_on = true;
}
}
_local1.testball.targ = target_enemy;
target_acquired = true;
}
function step() {
var _local1 = _root;
dx = _local1._xmouse - _x;
dy = _local1._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;
}
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;
placeSmoke();
target_acquired = target_enemy.hp > 0;
testHitEnemies();
testHitObstructions();
if ((fuel--) < 0) {
_local1.addSpark("spark", _x, _y, 10);
_local1.addExplosion(_x, _y, radius, dmg);
this.unloadMovie();
}
}
function testHitEnemies() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 1)) {
_local1.addExplosion(_x, _y, radius, dmg);
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
var _local2 = this;
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_local1.ground.ground_body.hitTest(_x, _y, 1))) {
_local1.addExplosion(_x, _y, radius, dmg);
_local2.unloadMovie();
}
for (i in _local1.obstructions) {
if (_local1.obstructions[i].hitTest(_x, _y, 1)) {
_local1.addExplosion(_x, _y, radius, dmg);
_local2.unloadMovie();
}
}
}
function testBlastRadius() {
var _local1 = _root;
hitCount = 0;
temp = _local1.addObj("blast_animation", _local1.debris_layer, _local1.getNextDebrisLvl);
temp._x = _x;
temp._y = _y;
temp._xscale = (temp._yscale = 50);
_local1.playSound("bomb.wav");
for (ndx in _local1.enemies) {
distx = _local1.enemies[ndx].xpos - _x;
disty = _local1.enemies[ndx].ypos - _y;
range = Math.sqrt((distx * distx) + (disty * disty));
if (range < g_missile_blast_range) {
_local1.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() {
var _local1 = _root;
minDist = 99999 /* 0x01869F */;
ndx = 0;
while ((ndx < _local1.enemies.length) && (!blownUp)) {
if ((blownUp = _local1.enemies[ndx].hitTest(_x, _y, 1))) {
}
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;
nextTarget = 5;
Instance of Symbol 135 MovieClip "rocket" in Symbol 136 MovieClip [missile] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
if (this.hitTest(_root.van) && (_root.van.inj == false)) {
if (_root.van.life > 0) {
_root.van.inj = true;
_root.van.life = _root.van.life - 16;
_root.addExplosion(_x, _y, radius, dmg);
_root.van.gotoAndStop(3);
this.unloadMovie();
} else {
_root.addExplosion(_x, _y, radius, dmg);
_root.van.gotoAndStop(5);
_root.van.inj = true;
_root.van.die = true;
this.unloadMovie();
}
}
}
Symbol 140 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() {
var _local1 = _root;
if (_local1.hero.hitbox.hitTest(_x, _y, 0)) {
_local1.hero.takeDamage(3);
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.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() {
var _local1 = _root;
var _local2 = this;
if (_local1.ground.ground_body.hitTest(_x, _y, 1)) {
_local1.playSound("bomb.wav");
temp = _local1.addObj("bullet_hole", _local1.ground.blood_layer, _local1.getNextBloodLevel());
temp._x = _x;
temp._y = _y;
_local2.unloadMovie();
}
for (i in _local1.obstructions) {
if (_local1.obstructions[i].hitTest(_x, _y, 0)) {
_local1.obstructions[i].takeDamage(3);
_local1.addSpark("spark_dust", _x, _y, 3);
_local1.playSound("bomb.wav");
_local2.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 139 MovieClip in Symbol 140 MovieClip [enemy_bullet] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 141 MovieClip [hero_arrow] Frame 1
function setVelocity(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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitbox.hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(3, _x, _y, vx, vy);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local1.addExplosion(_x, _y, range, dmg);
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
var _local2 = this;
if (_local1.ground.ground_body.hitTest(_x, _y, 1)) {
_local1.addExplosion(_x, _y, range, dmg);
_local1.placeDebrisArrow(_x, _y, _rotation);
_local2.unloadMovie();
}
for (i in _local1.obstructions) {
if (_local1.obstructions[i].hitTest(_x, _y, 1)) {
_local1.obstructions[i].takeDamage(3, _x, _y, vx, vy);
_local1.addExplosion(_x, _y, range, dmg);
_local1.placeDebrisArrow(_x, _y, _rotation);
_local2.unloadMovie();
}
}
}
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
range = 40;
dmg = 10;
Symbol 150 Button
on (release) {
_root.closeGameOver();
_root.restartGame();
_root.gotoAndStop(5);
}
Symbol 162 Button
on (press) {
userid = _root.id;
var myVars = new LoadVars();
myVars.username = username;
myVars.gameid = 1033;
myVars.score = _root.score;
myVars.send("http://www.dailyfreegames.com/highscore/highscore.php", "_blank", "POST");
_root.gotoAndStop(5);
}
Symbol 174 MovieClip Frame 12
stop();
Symbol 175 Button
on (release) {
getURL ("http://www.dailyfreegames.com", "_blank");
}
Symbol 176 MovieClip [game_over_screen] Frame 1
var ssc = _root.score;
var username = "";
Symbol 178 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 1
stop();
Symbol 196 MovieClip [anim_dead_body] Frame 1
stop();
Symbol 196 MovieClip [anim_dead_body] Frame 75
stop();
Instance of Symbol 193 MovieClip in Symbol 196 MovieClip [anim_dead_body] Frame 81
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 197 MovieClip [blood_stumpgr] 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
if (_local1.ground.ground_body.hitTest(_x, _y + 2, 1)) {
if (Math.abs(vy) > 4) {
_local1.placeBlood(_x, _y);
}
_local1.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 196 MovieClip [anim_dead_body] "body" in Symbol 197 MovieClip [blood_stumpgr] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 198 MovieClip Frame 27
stop();
Instance of Symbol 193 MovieClip in Symbol 198 MovieClip Frame 28
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 199 MovieClip [body_dieinggr] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 198 MovieClip in Symbol 199 MovieClip [body_dieinggr] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 70
gotoAndPlay (10);
Symbol 202 MovieClip Frame 135
stop();
Symbol 203 MovieClip [groundsol] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
if (vx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if ((timeToCheckDirection++) > 100) {
timeToCheckDirection = 0;
dx = _x - _local1.hero._x;
if (dx > 0) {
vx = -speed;
} else {
vx = speed;
}
}
bottom = _local1.ground.ground_body.hitTest(_x, _y, 1);
grounded = _local1.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 = 10;
}
vy = vy + _local1.gravity;
_x = (_x + vx);
_y = (_y + vy);
body.gotoAndStop(count + mode);
} else {
shooting = (shootCount++) < 10;
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
_local1.removeEnemy(this);
}
if (hp <= 0) {
if (deathCode == "exploded") {
_local1.amitavasolnum = _local1.amitavasolnum + 1;
_local1.increaseScore(5, _x, _y);
if (explosion_impact > 12) {
_local1.addBloodExplosion(_x, _y - 20);
} else {
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stumpgr", _local1.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") {
_local1.amitavasolnum = _local1.amitavasolnum + 1;
_local1.increaseScore(15, _x, _y);
_alpha = 0;
_local1.placeDeadBody("body_dieinggr", _x, _y, vx);
} else {
_local1.amitavasolnum = _local1.amitavasolnum + 1;
_local1.increaseScore(10, _x, _y);
_alpha = 0;
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stumpgr", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
}
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
if ((shot_count++) > 0) {
shot_count = 0;
timeToShoot = 200 + random(100);
} else {
timeToShoot = 10;
}
}
if ((timeToNade--) <= 0) {
throwNade();
timeToNade = 200 + random(100);
}
}
function shoot() {
var _local1 = _root;
_local1.playSound("tat3.wav");
shootCount = 1;
shooting = true;
body.gotoAndPlay("shooting");
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
dx = _local1.hero._x - _x;
dy = _local1.hero._y - _y;
lvx = dx / 120;
lvy = -3 + (dy / 100);
lvl = _local1.getNextEnemyBulletLevel();
proj = _local1.addObj("hero_grenade", _local1.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) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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;
timeToCheckDirection = 0;
half_height = _height / 2;
explosion_dist = 0;
timeToShoot = 100;
timeToNade = 50 + random(100);
shot_count = 0;
speed = 0.5;
xpos = 0;
ypos = 0;
shootCount = 0;
shooting = false;
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 124 MovieClip "hitbox" in Symbol 203 MovieClip [groundsol] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 202 MovieClip "body" in Symbol 203 MovieClip [groundsol] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 203 MovieClip [groundsol] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 204 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
for (i in _local1.obstructions) {
top = _local1.obstructions[i].hitTest(_x, _y - 1, 1);
bottom = _local1.obstructions[i].hitTest(_x, _y + 1, 1);
left = _local1.obstructions[i].hitTest(_x - 1, _y, 1);
right = _local1.obstructions[i].hitTest(_x + 1, _y, 1);
b_right = _local1.obstructions[i].hitTest(_x + 0.7071, _y + 0.7071, 1);
b_left = _local1.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 49 MovieClip in Symbol 204 MovieClip [debris1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 206 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 1
stop();
Symbol 222 MovieClip [anim_dead_body] Frame 1
stop();
Symbol 222 MovieClip [anim_dead_body] Frame 75
stop();
Symbol 223 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
if (_local1.ground.ground_body.hitTest(_x, _y + 2, 1)) {
if (Math.abs(vy) > 4) {
_local1.placeBlood(_x, _y);
}
_local1.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 222 MovieClip [anim_dead_body] "body" in Symbol 223 MovieClip [blood_stump] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 226 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 70
gotoAndPlay (10);
Symbol 227 MovieClip [enemy_drop] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + 1.5);
_x = (_x + vx);
bottom = _local1.ground.ground_body.hitTest(_x, _y + 20, 1);
if (bottom) {
chute = _local1.addObj("parachute_fade", _local1.debris_layer, _local1.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
dx = _local1.hero._x - _x;
dir = Math.abs(dx) / dx;
_local1.placeEnemy("enemy1", _x, _y, 0.5 * dir, vy);
_local1.removeEnemy(this);
}
if (hp <= 0) {
_local1.increaseScore(10, _x, _y);
chute = _local1.addObj("parachute_fade", _local1.debris_layer, _local1.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
if (explosion_impact > 12) {
_local1.addBloodExplosion(_x, _y - 20);
} else {
_local1.addBloodyStump(_x, _y, vx, 0);
}
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
timeToShoot = 200 + random(100);
}
}
function shoot() {
var _local1 = _root;
_local1.playSound("tat3.wav");
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
dx = _local1.hero._x - _x;
dy = _local1.hero._y - _y;
lvx = dx / 100;
lvy = -2 + (dy / 100);
lvl = _local1.getNextEnemyBulletLevel();
proj = _local1.addObj("hero_grenade", _local1.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) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (weakspot.hitTest(_local3, _local2, 0)) {
_local1.increaseScore(20, _x, _y);
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = 40;
ypos = 40;
timeToShoot = 50;
half_height = _height / 2;
Instance of Symbol 124 MovieClip "hitbox" in Symbol 227 MovieClip [enemy_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 226 MovieClip in Symbol 227 MovieClip [enemy_drop] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 227 MovieClip [enemy_drop] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 70
gotoAndPlay (10);
Symbol 231 MovieClip [enemy1] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
if (vx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if ((timeToCheckDirection++) > 100) {
timeToCheckDirection = 0;
dx = _x - _local1.hero._x;
if (dx > 0) {
vx = -speed;
} else {
vx = speed;
}
}
bottom = _local1.ground.ground_body.hitTest(_x, _y, 1);
grounded = _local1.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 = 10;
}
vy = vy + _local1.gravity;
_x = (_x + vx);
_y = (_y + vy);
body.gotoAndStop(count + mode);
} else {
shooting = (shootCount++) < 10;
}
if (((_x < -10) || (_x > xmax)) || (_y > ymax)) {
_local1.removeEnemy(this);
}
if (hp <= 0) {
if (deathCode == "exploded") {
_local1.increaseScore(5, _x, _y);
if (explosion_impact > 12) {
_local1.addBloodExplosion(_x, _y - 20);
} else {
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stump", _local1.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") {
_local1.increaseScore(15, _x, _y);
_alpha = 0;
_local1.placeDeadBody("body_dieing2", _x, _y, vx);
} else {
_local1.increaseScore(10, _x, _y);
_alpha = 0;
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stump", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
}
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
if ((shot_count++) > 0) {
shot_count = 0;
timeToShoot = 200 + random(100);
} else {
timeToShoot = 10;
}
}
if ((timeToNade--) <= 0) {
throwNade();
timeToNade = 200 + random(100);
}
}
function shoot() {
var _local1 = _root;
_local1.playSound("tat3.wav");
shootCount = 1;
shooting = true;
body.gotoAndPlay("shooting");
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
dx = _local1.hero._x - _x;
dy = _local1.hero._y - _y;
lvx = dx / 120;
lvy = -3 + (dy / 100);
lvl = _local1.getNextEnemyBulletLevel();
proj = _local1.addObj("hero_grenade", _local1.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) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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;
timeToCheckDirection = 0;
half_height = _height / 2;
explosion_dist = 0;
timeToShoot = 100;
timeToNade = 50 + random(100);
shot_count = 0;
speed = 0.5;
xpos = 0;
ypos = 0;
shootCount = 0;
shooting = false;
xmax = _root.g_width + 10;
ymax = _root.g_ground + 10;
Instance of Symbol 124 MovieClip "hitbox" in Symbol 231 MovieClip [enemy1] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 230 MovieClip "body" in Symbol 231 MovieClip [enemy1] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 231 MovieClip [enemy1] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 233 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 70
gotoAndPlay (10);
Symbol 234 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() {
var _local1 = _root;
var _local2 = this;
for (i in _local1.enemies) {
if (_local1.enemies[i].hitTest(_x, _y, 0)) {
_local1.enemies[i].takeDamage(dmg);
_local1.addSpark("spark", _x, _y, 3);
_local1.playHitEnemySound();
_local2.unloadMovie();
}
}
}
function testHitObstructions() {
var _local1 = _root;
var _local2 = this;
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
if (Math.abs(vy) > 4) {
_local1.placeBlood(_x, _y);
}
_local1.placeDeadBody("enemy_sniper_death", _x, _y, vx);
_local2.unloadMovie();
}
}
if (_local1.ground.ground_body.hitTest(_x, _y + 2, 1)) {
if (Math.abs(vy) > 4) {
_local1.placeBlood(_x, _y);
}
_local1.placeDeadBody("enemy_sniper_death", _x, _y, vx);
_local2.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 233 MovieClip in Symbol 234 MovieClip [blood_stump_fem] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 235 MovieClip Frame 27
stop();
Symbol 236 MovieClip [enemy_sniper_death] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 235 MovieClip in Symbol 236 MovieClip [enemy_sniper_death] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 237 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 70
gotoAndPlay (10);
Symbol 238 MovieClip [enemy_drop_sniper] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
vx = vx + ((random(100) - 50) / 2000);
_y = (_y + 2);
_x = (_x + vx);
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 1)) {
hitstruct = true;
break;
}
}
bottom = _local1.ground.ground_body.hitTest(_x, _y, 1);
if (bottom || (hitstruct)) {
chute = _local1.addObj("parachute_fade", _local1.debris_layer, _local1.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
dx = _local1.hero._x - _x;
dir = Math.abs(dx) / dx;
_local1.placeEnemy("enemy_sniper", _x, _y, 0, 0);
_local1.removeEnemy(this);
}
if (hp <= 0) {
_local1.increaseScore(10, _x, _y);
chute = _local1.addObj("parachute_fade", _local1.debris_layer, _local1.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 32.3;
if (explosion_impact > 12) {
_local1.addBloodExplosion(_x, _y - 20);
} else {
_local1.addFemBloodyStump(_x, _y, vx, 0);
}
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
timeToShoot = 200 + random(100);
}
}
function shoot() {
var _local1 = _root;
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 2;
wild_factor = 4;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
dx = _local1.hero._x - _x;
dy = _local1.hero._y - _y;
lvx = dx / 100;
lvy = -2 + (dy / 100);
lvl = _local1.getNextEnemyBulletLevel();
proj = _local1.addObj("hero_grenade", _local1.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) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (weakspot.hitTest(_local3, _local2, 0)) {
_local1.increaseScore(20, _x, _y);
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = 50;
ypos = 50;
timeToShoot = 50;
half_height = _height / 2;
Instance of Symbol 124 MovieClip "hitbox" in Symbol 238 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 237 MovieClip in Symbol 238 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 238 MovieClip [enemy_drop_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 70
gotoAndPlay (10);
Symbol 244 MovieClip Frame 1
stop();
Instance of Symbol 241 MovieClip "sniper_flame" in Symbol 244 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha > 0) {
_alpha = (_alpha - 30);
}
}
Symbol 245 MovieClip [enemy_sniper] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
if (vx < 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if ((timeToAim++) > 15) {
timeToAim = 0;
dx = -((_local1.hero._x - _x) - 2.6);
dy = -((_local1.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) {
if (deathCode == "exploded") {
_local1.increaseScore(5, _x, _y);
if (explosion_impact > 12) {
_local1.addBloodExplosion(_x, _y - 20);
} else {
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stump_fem", _local1.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") {
_local1.increaseScore(15, _x, _y);
_alpha = 0;
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("enemy_sniper_death", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
if (vx > 0) {
temp._xscale = -100;
}
} else {
_local1.increaseScore(10, _x, _y);
_alpha = 0;
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("blood_stump_fem", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp.vx = vx;
temp.vy = vy;
}
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
shoot();
if ((shot_count++) >= 0) {
shot_count = 1;
timeToShoot = 200 + random(100);
} else {
timeToShoot = 10;
}
}
if ((timeToNade--) <= 0) {
throwNade();
timeToNade = 200 + random(100);
}
}
function shoot() {
var _local1 = _root;
sniper_gun.sniper_flame._alpha = 100;
_local1.playSound("sniper_rifle.wav");
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 8;
wild_factor = 2;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
dx = _local1.hero._x - _x;
dy = _local1.hero._y - _y;
lvx = dx / 130;
lvy = -3 + (dy / 100);
lvl = _local1.getNextEnemyBulletLevel();
proj = _local1.addObj("hero_grenade", _local1.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) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
_local1.playHitEnemySound();
if (weakspot.hitTest(_local3, _local2, 0)) {
deathCode = "head_shot";
hp = 0;
c = 0;
while (c < 3) {
blood = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local1.addObj("blood_drop", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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;
half_height = _height / 2;
timeToNade = 200 + random(100);
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 34 MovieClip "head" in Symbol 245 MovieClip [enemy_sniper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "hitbox" in Symbol 245 MovieClip [enemy_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 245 MovieClip [enemy_sniper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 252 MovieClip [bomber_dead] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Instance of Symbol 251 MovieClip in Symbol 252 MovieClip [bomber_dead] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 280 MovieClip Frame 13
stop();
Symbol 302 MovieClip Frame 26
stop();
Symbol 303 MovieClip Frame 1
stop();
Instance of Symbol 306 MovieClip in Symbol 307 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 308 MovieClip [enemy_bomber] Frame 1
function step() {
var _local1 = _root;
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;
_local1.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 _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 1)) {
hitstruct = true;
break;
}
}
bottom = _local1.ground.ground_body.hitTest(_x, _y + 2, 1) || (hitstruct);
if (bottom) {
_local1.addExplosion(_x, _y, 70, 40);
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("bomber_dead", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp._xscale = _xscale;
_local1.removeEnemy(this);
}
}
if ((_x > xmax) || (_x < -60)) {
_local1.removeEnemy(this);
}
}
function getNextBulletHoleLevel() {
if ((b_level++) > 8) {
b_level = 1;
}
return(b_level);
}
function takeDamage(dmg, x, y, vx, vy) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
dmg_amt = dmg;
spark_amt = random(2);
if (weakspot.hitTest(_local3, _local2, 0)) {
dmg_amt = dmg_amt + 10;
spark_amt = spark_amt + random(2);
}
_local1.playSound("ching1.wav");
hp = hp - dmg_amt;
c = 0;
while (c < spark_amt) {
blood = _local1.addObj("debris2", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local3 - _x;
ynew = _local2 - _y;
if (_xscale < 0) {
xnew = xnew * -1;
}
temp = _local1.addObj("bullet_hole", bullet_hole_layer, getNextBulletHoleLevel());
temp._x = xnew;
temp._y = ynew;
}
function dropBomb() {
var _local1 = _root;
_local1.playSound("firecat3.wav");
temp = _local1.addObj("enemy_bomb_drop", _local1.bomb_layer, _local1.getNextBombLevel());
temp._x = _x;
temp._y = _y + 5;
temp.vx = vx;
_local1.enemies.push(temp);
}
maxhp = 100;
hp = 100;
xmax = _root.g_width + 60;
ymax = _root.g_ground + 60;
xpos = 0;
ypos = 0;
timeToBomb = 200;
half_grav = _root.gravity / 2;
ammo = 3;
b_level = 1;
Instance of Symbol 303 MovieClip "bomber_anim" in Symbol 308 MovieClip [enemy_bomber] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "hitbox" in Symbol 308 MovieClip [enemy_bomber] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 308 MovieClip [enemy_bomber] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 314 MovieClip Frame 1
stop();
Symbol 315 MovieClip [chopper_dead] Frame 1
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this.unloadMovie();
}
}
}
Symbol 323 MovieClip Frame 28
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 326 MovieClip [enemy_chopper] Frame 1
function step() {
var _local1 = _root;
xpos = _x;
ypos = _y;
if ((move_count++) > 100) {
move_count = 0;
if (_local1.hero._x < _x) {
vx = -0.25;
} else {
vx = 0.25;
}
}
vy = vy + _local1.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 _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
}
bottom = _local1.ground.ground_body.hitTest(_x, _y, 1) || (hitstruct);
}
hp = hp - leaking;
if (bottom) {
_local1.increaseScore(10, _x, _y);
_local1.addExplosion(_x, _y, 60, 30);
lvl = _local1.getNextDebrisLevel();
temp = _local1.addObj("chopper_dead", _local1.debris_layer, lvl);
temp._x = _x;
temp._y = _y;
temp._xscale = _xscale;
_local1.removeEnemy(this);
}
if ((timeToShoot--) <= 0) {
if (shots >= 2) {
shots = 0;
timeToShoot = 800;
} else {
shots++;
timeToShoot = 5;
}
shoot();
}
if (((timeToShootRocket--) <= 0) && (Math.abs(_local1.hero._x - _x) > 200)) {
if (rocket_shots >= 1) {
rocket_shots = 0;
timeToShootRocket = 2600;
} else {
rocket_shots++;
timeToShootRocket = 10;
}
shootRocket();
}
}
function takeDamage(dmg, x, y, vx, vy) {
var _local1 = _root;
var _local2 = y;
var _local3 = x;
if (leaking <= 0) {
if (weakspot.hitTest(_local3, _local2, 0)) {
_local1.increaseScore(10, _x, _y);
leaking = 0.05;
_local1.addExplosion(_local3, _local2, 15, 5);
}
}
hp = hp - dmg;
_local1.playSound("ching1.wav");
spark_amt = random(2);
c = 0;
while (c < spark_amt) {
blood = _local1.addObj("debris2", _local1.debris_layer, _local1.getNextDebrisLevel());
blood._x = _local3;
blood._y = _local2;
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 = _local3 - _x;
ynew = _local2 - _y;
if (_xscale < 0) {
xnew = xnew * -1;
}
temp = _local1.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() {
var _local1 = _root;
_local1.playSound("tat3.wav");
bullet = _local1.addObj("enemy_bullet", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 5;
wild_factor = 3;
dx = _local1.hero._x - _x;
dy = _local1.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() {
var _local1 = _root;
_local1.playSound("shoot_rocket4.wav");
rocket = _local1.addObj("enemy_rocket", _local1.enemy_bullet_layer, _local1.getNextEnemyBulletLevel());
shot_speed = 7;
wild_factor = 1.5;
dx = _local1.hero._x - _x;
dy = _local1.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 = 800;
timeToShootRocket = 2600;
xpos = -200;
ypos = -200;
b_level = 1;
Instance of Symbol 324 MovieClip "chopper_anim" in Symbol 326 MovieClip [enemy_chopper] Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 124 MovieClip "hitbox" in Symbol 326 MovieClip [enemy_chopper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 326 MovieClip [enemy_chopper] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 332 Button
on (release) {
_root.age = 18;
_root.paused = false;
_root.closeHelp();
}
Symbol 350 Button
on (release) {
getURL ("http://www.dailyfreegames.com", "_blank");
}
Symbol 351 MovieClip Frame 22
stop();
Symbol 356 Button
on (press) {
gotoAndStop (6);
}
Symbol 358 Button
on (release) {
getURL ("http://www.dailyfreegames.com/free-games.html", "_blank");
}
Symbol 366 Button
on (press) {
gotoAndStop (15);
}
Symbol 378 Button
on (press) {
gotoAndStop (5);
}
Instance of Symbol 408 MovieClip in Symbol 409 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 412 MovieClip Frame 1
stop();
Symbol 418 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 1
stop();
Instance of Symbol 419 MovieClip in Symbol 420 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;
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 419 MovieClip in Symbol 420 MovieClip Frame 3
onClipEvent (enterFrame) {
gotoAndStop (23);
}
Instance of Symbol 419 MovieClip in Symbol 420 MovieClip Frame 5
onClipEvent (load) {
frame = 76;
gotoAndStop(frame);
}
onClipEvent (enterFrame) {
count = _parent._parent.crouch_count;
gotoAndStop(frame + count);
}
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 427 MovieClip in Symbol 433 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 429 MovieClip in Symbol 433 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 425 MovieClip in Symbol 434 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "gun") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 433 MovieClip "launcher2" in Symbol 434 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 424 MovieClip in Symbol 437 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "gun") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 433 MovieClip "launcher" in Symbol 437 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.shooting_mode == "rocket") {
_alpha = 100;
} else {
_alpha = 0;
}
}
Instance of Symbol 434 MovieClip "rifle_invert" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
orig_x = _x;
}
onClipEvent (enterFrame) {
if (_x < orig_x) {
_x = (_x + ((orig_x - _x) / 2));
}
}
Instance of Symbol 438 MovieClip "rifle" in Symbol 439 MovieClip Frame 1
onClipEvent (load) {
orig_x = _x;
}
onClipEvent (enterFrame) {
if (_x < orig_x) {
_x = (_x + ((orig_x - _x) / 2));
}
}
Symbol 441 MovieClip Frame 1
function step() {
var _local1 = _root;
right_foot = _local1.ground.ground_body.hitTest(_x + 6, _y, 1);
left_foot = _local1.ground.ground_body.hitTest(_x - 6, _y, 1);
right_hand = _local1.ground.ground_body.hitTest(_x + 6, _y - 8, 1);
left_hand = _local1.ground.ground_body.hitTest(_x - 6, _y - 8, 1);
bottom = _local1.ground.ground_body.hitTest(_x, _y, 1);
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 1)) {
struct_on = _local1.structures[ndx];
hitstruct = true;
break;
}
}
bottom = bottom || (hitstruct);
grounded = _local1.ground.hitTest(_x, _y + 5, 1) || (struct_on.hitTest(_x, _y + 5, 1));
if (grounded) {
jump_count = 0;
} else if (jump_count < 2) {
jump_count++;
}
if (right_hand) {
if (vx > 0) {
vx = 0;
}
vx = vx - 0.1;
} else if (left_hand) {
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 > (_local1.g_width - half_width)) {
_x = (_local1.g_width - half_width);
}
if (_y < half_height) {
_y = half_height;
} else if (_y > (_local1.g_ground - half_height)) {
_y = (_local1.g_ground - half_height);
}
if (!crouching) {
if (Key.isDown(_local1.KEY_D) && (!right_hand)) {
body_dir = 1;
if (vx < 1) {
vx = vx + 0.1;
}
aim_error = 8;
max_spread = 20;
} else if (Key.isDown(_local1.KEY_A) && (!left_hand)) {
body_dir = -1;
if (vx > -1) {
vx = vx - 0.1;
}
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 && (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(_local1.KEY_SPACEBAR) && (jump_count < 2)) && (space_released)) && (!crouching)) {
jump_count++;
space_released = false;
grounded = false;
vy = -2;
}
if (!Key.isDown(_local1.KEY_SPACEBAR)) {
space_released = true;
holdcount = 0;
} else {
holdcount++;
wants_to_crouch = false;
}
if ((Key.isDown(_local1.KEY_A) || (Key.isDown(_local1.KEY_D))) || (Key.isDown(_local1.KEY_W))) {
wants_to_crouch = false;
}
xprev = _x;
yprev = _y;
vy = vy + gravity;
animate();
_x = (_x + vx);
_y = (_y + vy);
checkFiring();
}
function checkFiring() {
var _local1 = _root;
if (_local1.shooting_mode == "gun") {
if (timeToShoot > 0) {
timeToShoot--;
}
}
if (_local1.shooting_mode == "rocket") {
if (timeToShootRocket > 0) {
timeToShootRocket--;
}
}
if (timeToThrow > 0) {
timeToThrow--;
}
if ((_local1.firing && (_local1.shooting_mode == "gun")) && (_local1.ammo_bullets > 0)) {
if (timeToShoot <= 0) {
_local1.shootHeroProjectile();
sight.f1._alpha = 100;
sight.f2._alpha = 100;
sight.f3._alpha = 100;
_local1.aim_rate = 0;
if (_local1.gun_wild < max_spread) {
_local1.gun_wild = _local1.gun_wild + 4;
}
timeToShoot = 10;
}
}
if ((_local1.firing && (_local1.shooting_mode == "rocket")) && (_local1.ammo_rockets > 0)) {
if (timeToShootRocket <= 0) {
_local1.shootHeroRocket();
timeToShootRocket = 100;
}
}
if (_local1.gun_wild > aim_error) {
if (_local1.aim_rate > 0) {
_local1.aim_rate = 0;
}
_local1.aim_rate = _local1.aim_rate - 0.05;
} else {
if (_local1.aim_rate < 0) {
_local1.aim_rate = 0;
}
_local1.aim_rate = _local1.aim_rate + 0.05;
}
_local1.gun_wild = _local1.gun_wild + _local1.aim_rate;
if ((Key.isDown(_local1.KEY_E) && (timeToThrow <= 0)) && (_local1.ammo_grenades > 0)) {
timeToThrow = 60;
_local1.shootGrenade();
}
if ((Key.isDown(_local1.KEY_R) && (timeToThrow <= 0)) && (_local1.ammo_prox_mines > 0)) {
timeToThrow = 60;
_local1.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 420 MovieClip "body" in Symbol 441 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Instance of Symbol 439 MovieClip "sight" in Symbol 441 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 (_root.hero.body_dir == 1) {
if (dx < 0) {
if (dx > 0) {
} else {
rifle._alpha = 100;
rifle_invert._alpha = 0;
_rotation = ((radians * 180) / Math.PI);
}
}
} else if (_root.hero.body_dir == -1) {
if (dx > 0) {
if (dx > 0) {
rifle._alpha = 0;
rifle_invert._alpha = 100;
_rotation = (((radians * 180) / Math.PI) + 180);
}
}
}
}
Instance of Symbol 440 MovieClip "hitbox" in Symbol 441 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
yorig = _y;
h_orig = _height;
}
onClipEvent (enterFrame) {
_height = (h_orig - _parent.crouch_factor);
}
Instance of Symbol 443 MovieClip in Symbol 444 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = _root.gun_wild;
}
Instance of Symbol 443 MovieClip in Symbol 444 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (-_root.gun_wild);
}
Instance of Symbol 443 MovieClip in Symbol 444 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = _root.gun_wild;
}
Instance of Symbol 443 MovieClip in Symbol 444 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (-_root.gun_wild);
}
Instance of Symbol 446 MovieClip "ch_rocket" in Symbol 447 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 449 MovieClip in Symbol 450 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 451 MovieClip Frame 1
function step() {
var _local1 = _root;
if (timeToWait > 0) {
timeToWait--;
} else {
_y = (_y + 1);
hitstruct = false;
for (ndx in _local1.structures) {
if (_local1.structures[ndx].hitTest(_x, _y, 0)) {
hitstruct = true;
break;
}
}
if (hitstruct || (_local1.ground.ground_body.hitTest(_x, _y, 1))) {
_local1.addRandomGoodie(_x, _y);
chute = _local1.addObj("parachute_fade", _local1.debris_layer, _local1.getNextDebrisLevel());
chute._x = _x;
chute._y = _y - 23.8;
timeToWait = random(500) + 1000;
_y = -20;
_x = (random(_local1.g_width - 30) + 15);
}
}
}
timeToWait = 0;
Instance of Symbol 450 MovieClip in Symbol 451 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 464 Button
on (release) {
_root.age = 18;
_root.closeNamer();
_root.gotoAndStop(5);
this.unloadMovie();
}
Symbol 483 MovieClip Frame 10
_root.van.inj = false;
_parent.gotoAndStop(1);
Symbol 497 MovieClip Frame 23
_root.score = _root.score + 45;
Symbol 497 MovieClip Frame 30
if (_root.amitavaland == false) {
_root.amitavasolnum = 3;
}
_root.van._x = -200;
_root.van.die = false;
_root.van.inj = false;
_root.van.life = 15;
_root.van.comback = 1;
_root.van.counter = 0;
_root.van.mov = false;
_root.van.bmov = false;
_root.van.wait = 0;
_root.van.radcount = random(1000);
_root.van.gotoAndStop(1);
Symbol 504 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 13
stop();
Symbol 511 MovieClip Frame 7
stop();
Symbol 513 MovieClip Frame 1
stop();
Instance of Symbol 124 MovieClip "hitbox" in Symbol 513 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 124 MovieClip "weakspot" in Symbol 513 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 513 MovieClip Frame 15
_root.amitavasolnum = _root.amitavasolnum + 1;
_root.amitavaenemyland = _root.amitavaenemyland + 1;
if (_root.amitavaenemyland == 3) {
_root.amitavaland = false;
}
_parent.die = false;
Symbol 513 MovieClip Frame 17
function step() {
if ((count++) > 100) {
_alpha = (_alpha - 2);
if (_alpha < 0) {
this._x = -200;
_alpha = 100;
this.gotoAndStop(1);
}
}
}
stop();
Instance of Symbol 193 MovieClip in Symbol 513 MovieClip Frame 17
onClipEvent (enterFrame) {
if (!_root.paused) {
_parent.step();
}
}
Symbol 517 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 = "rocket";
_root.cross_hair.ch_gun._alpha = 0;
_root.cross_hair.ch_rocket._alpha = 100;
}