Frame 1
loadedthusfar = getBytesLoaded() / getBytesTotal();
_root.moving_bar._x = -180 + (loadedthusfar * 271);
_root.txtActual.text = ((("(" + getBytesLoaded()) + " bytes)/(") + getBytesTotal()) + " bytes)";
_root.txtPercent._x = 26 + (loadedthusfar * 271);
_root.txtPercent.text = Math.floor(100 * loadedthusfar) + "%";
_root.txtSize.text = ("File Size = " + (Math.round(100 * (getBytesTotal() / 1048576)) / 100)) + " mb";
Frame 2
loadedthusfar = _root.getBytesLoaded() / _root.getBytesTotal();
if (loadedthusfar != 1) {
_root.gotoAndPlay(1);
}
Frame 3
stop();
Frame 149
_root._quality = "LOW";
Instance of Symbol 25 MovieClip in Frame 150
onClipEvent (enterFrame) {
_root.qualitytag.text = _root._quality + " QUALITY";
}
Frame 179
stop();
Frame 180
_root.qbuffer = _quality;
_quality = "HIGH";
Frame 1481
var dead = 0;
var entity = 0;
var numenem = 27;
active_particles = new array();
your_bullets = new array();
enemy_bullets = new array();
var door1 = 0;
var door2 = 0;
var door3 = 0;
var c4 = 0;
var score = 0;
var gold = 0;
var headcount = 0;
var detonation = 0;
var detx;
var dety;
var doorbomb1 = 0;
var doorbomb2 = 0;
var youwin = 0;
_quality = _root.qbuffer;
Frame 1482
Mouse.hide();
stop();
this.onEnterFrame = function () {
if (_root.you.health <= 0) {
_root.dead = 1;
Mouse.show();
gotoAndStop (1483);
delete this.onEnterFrame;
}
if (_root.youwin) {
_root.dead = 1;
Mouse.show();
_root.maincharhealth = _root.you.health;
gotoAndPlay (1484);
delete this.onEnterFrame;
}
};
Instance of Symbol 135 MovieClip "backdrop" in Frame 1482
onClipEvent (enterFrame) {
if (!_root.dead) {
var netx = 0;
var nety = 0;
if (Key.isDown(16)) {
speed = 6;
} else {
speed = 4;
}
if ((Key.isDown(37) && (!Key.isDown(39))) || (Key.isDown(65) && (!Key.isDown(68)))) {
netx = netx + speed;
this._x = this._x + speed;
_root.walls._x = _root.walls._x + speed;
if (_root.walls.hitTest(_root.mask_you.getBounds(_root).xMin, _root.mask_you._y, true)) {
netx = netx - speed;
this._x = this._x - speed;
_root.walls._x = _root.walls._x - speed;
}
}
if ((Key.isDown(39) && (!Key.isDown(37))) || (Key.isDown(68) && (!Key.isDown(65)))) {
netx = netx - speed;
this._x = this._x - speed;
_root.walls._x = _root.walls._x - speed;
if (_root.walls.hitTest(_root.mask_you.getBounds(_root).xMax, _root.mask_you._y, true)) {
netx = netx + speed;
this._x = this._x + speed;
_root.walls._x = _root.walls._x + speed;
}
}
if ((Key.isDown(38) && (!Key.isDown(40))) || (Key.isDown(87) && (!Key.isDown(83)))) {
nety = nety + speed;
this._y = this._y + speed;
_root.walls._y = _root.walls._y + speed;
if (_root.walls.hitTest(_root.mask_you._x, _root.mask_you.getBounds(_root).yMin, true)) {
nety = nety - speed;
this._y = this._y - speed;
_root.walls._y = _root.walls._y - speed;
}
}
if ((Key.isDown(40) && (!Key.isDown(38))) || (Key.isDown(83) && (!Key.isDown(87)))) {
nety = nety - speed;
this._y = this._y - speed;
_root.walls._y = _root.walls._y - speed;
if (_root.walls.hitTest(_root.mask_you._x, _root.mask_you.getBounds(_root).yMax, true)) {
nety = nety + speed;
this._y = this._y + speed;
_root.walls._y = _root.walls._y + speed;
}
}
if (Key.isDown(17) || (Key.isDown(81))) {
if (_root.c4) {
_root.detonationDevice._x = _root.you._x;
_root.detonationDevice._y = _root.you._y;
_root.detonationDevice.play();
_root.c4 = 0;
}
}
inst = 1;
while (inst <= _root.numenem) {
_root["en_" + inst]._x = _root["en_" + inst]._x + netx;
_root["en_" + inst]._y = _root["en_" + inst]._y + nety;
inst++;
}
inst = 0;
while (inst <= _root.active_particles.length) {
_root[_root.active_particles[inst]]._x = _root[_root.active_particles[inst]]._x + netx;
_root[_root.active_particles[inst]]._y = _root[_root.active_particles[inst]]._y + nety;
inst++;
}
inst = 1;
while (inst <= 7) {
_root["cam_" + inst]._x = _root["cam_" + inst]._x + netx;
_root["cam_" + inst]._y = _root["cam_" + inst]._y + nety;
inst++;
}
inst = 1;
while (inst <= 5) {
_root["cd" + inst]._x = _root["cd" + inst]._x + netx;
_root["cd" + inst]._y = _root["cd" + inst]._y + nety;
inst++;
}
inst = 1;
while (inst <= 3) {
_root["sc" + inst]._x = _root["sc" + inst]._x + netx;
_root["sc" + inst]._y = _root["sc" + inst]._y + nety;
inst++;
}
inst = 1;
while (inst <= 22) {
_root["entity_" + inst]._x = _root["entity_" + inst]._x + netx;
_root["entity_" + inst]._y = _root["entity_" + inst]._y + nety;
inst++;
}
_root.detonationDevice._x = _root.detonationDevice._x + netx;
_root.detonationDevice._y = _root.detonationDevice._y + nety;
}
}
Instance of Symbol 159 MovieClip "entity_1" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.c4 = 1;
_root.Text_Control.HUD_TEXT.text = "C-4 explosive package";
_root.Text_Control.play();
this._x = 50000;
_root.score = _root.score + 50;
this.soundlayer.play();
}
}
Instance of Symbol 162 MovieClip "sc1" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.door1 = 1;
_root.Text_Control.HUD_TEXT.text = "Key Card 1 Acquired";
_root.Text_Control.play();
this._x = 50000;
this.soundlayer.play();
}
}
Instance of Symbol 165 MovieClip "sc2" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.door2 = 1;
_root.Text_Control.HUD_TEXT.text = "Key Card 2 Acquired";
_root.Text_Control.play();
this._x = 50000;
this.soundlayer.play();
}
}
Instance of Symbol 168 MovieClip "sc3" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.door3 = 1;
_root.Text_Control.HUD_TEXT.text = "Key Card 3 Acquired";
_root.Text_Control.play();
this._x = 50000;
this.soundlayer.play();
}
}
Instance of Symbol 159 MovieClip "entity_21" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.c4 = 1;
_root.Text_Control.HUD_TEXT.text = "C-4 explosive package";
_root.Text_Control.play();
this._x = 50000;
_root.score = _root.score + 50;
this.soundlayer.play();
}
}
Instance of Symbol 170 MovieClip "cd5" in Frame 1482
onClipEvent (enterFrame) {
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._x = 50000;
_root.doorbomb2 = 1;
}
}
}
Instance of Symbol 195 MovieClip "en_1" in Frame 1482
onClipEvent (load) {
var id_number = 1;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 200 MovieClip "entity_2" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 205 MovieClip "cd2" in Frame 1482
onClipEvent (load) {
var opening = 0;
}
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (opening) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this._x = 50000;
}
} else if ((dist < 50) && (_root.door2)) {
opening = 1;
_root.score = _root.score + 20;
this.soundlayer.play();
} else if ((dist < 70) && (!_root.door2)) {
_root.Text_Control.HUD_TEXT.text = "Key Card 2 Required";
_root.Text_Control.play();
}
}
Instance of Symbol 205 MovieClip "cd1" in Frame 1482
onClipEvent (load) {
var opening = 0;
}
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (opening) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this._x = 50000;
}
} else if ((dist < 50) && (_root.door1)) {
opening = 1;
_root.score = _root.score + 20;
this.soundlayer.play();
} else if ((dist < 70) && (!_root.door1)) {
_root.Text_Control.HUD_TEXT.text = "Key Card 1 Required";
_root.Text_Control.play();
}
}
Instance of Symbol 205 MovieClip "cd3" in Frame 1482
onClipEvent (load) {
var opening = 0;
}
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (opening) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this._x = 50000;
}
} else if ((dist < 50) && (_root.door3)) {
opening = 1;
_root.score = _root.score + 20;
this.soundlayer.play();
} else if ((dist < 70) && (!_root.door3)) {
_root.Text_Control.HUD_TEXT.text = "Key Card 3 Required";
_root.Text_Control.play();
}
}
Instance of Symbol 200 MovieClip "entity_3" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_4" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_5" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_6" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_7" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_8" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_9" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_10" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_11" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_12" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_13" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_14" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_15" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_16" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_17" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_18" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_20" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 200 MovieClip "entity_19" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.gold = _root.gold + 1;
this._x = 50000;
_root.score = _root.score + 75;
this.soundlayer.play();
}
}
Instance of Symbol 205 MovieClip "cd4" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 70) {
_root.Text_Control.HUD_TEXT.text = "Key Card 34B Required";
_root.Text_Control.play();
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._x = 50000;
_root.doorbomb1 = 1;
}
}
}
Instance of Symbol 195 MovieClip "en_2" in Frame 1482
onClipEvent (load) {
var id_number = 2;
var vision = 0;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_3" in Frame 1482
onClipEvent (load) {
var id_number = 3;
var vision = 0;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_4" in Frame 1482
onClipEvent (load) {
var id_number = 4;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_8" in Frame 1482
onClipEvent (load) {
var id_number = 8;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_6" in Frame 1482
onClipEvent (load) {
var id_number = 6;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_5" in Frame 1482
onClipEvent (load) {
var id_number = 5;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_7" in Frame 1482
onClipEvent (load) {
var id_number = 7;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_9" in Frame 1482
onClipEvent (load) {
var id_number = 9;
var vision = 150;
var speed = 1;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_10" in Frame 1482
onClipEvent (load) {
var id_number = 10;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_12" in Frame 1482
onClipEvent (load) {
var id_number = 12;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_11" in Frame 1482
onClipEvent (load) {
var id_number = 11;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_13" in Frame 1482
onClipEvent (load) {
var id_number = 13;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_14" in Frame 1482
onClipEvent (load) {
var id_number = 14;
var vision = 400;
var speed = 0;
var health = 2;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_15" in Frame 1482
onClipEvent (load) {
var id_number = 15;
var vision = 200;
var speed = 0;
var health = 3;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_16" in Frame 1482
onClipEvent (load) {
var id_number = 16;
var vision = 200;
var speed = 0;
var health = 3;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_17" in Frame 1482
onClipEvent (load) {
var id_number = 17;
var vision = 200;
var speed = 0;
var health = 3;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_18" in Frame 1482
onClipEvent (load) {
var id_number = 18;
var vision = 200;
var speed = 0;
var health = 3;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_19" in Frame 1482
onClipEvent (load) {
var id_number = 19;
var vision = 200;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_20" in Frame 1482
onClipEvent (load) {
var id_number = 20;
var vision = 150;
var speed = 3;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_22" in Frame 1482
onClipEvent (load) {
var id_number = 22;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_21" in Frame 1482
onClipEvent (load) {
var id_number = 21;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_23" in Frame 1482
onClipEvent (load) {
var id_number = 23;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_25" in Frame 1482
onClipEvent (load) {
var id_number = 25;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_24" in Frame 1482
onClipEvent (load) {
var id_number = 24;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_27" in Frame 1482
onClipEvent (load) {
var id_number = 27;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 195 MovieClip "en_26" in Frame 1482
onClipEvent (load) {
var id_number = 26;
var vision = 150;
var speed = 0;
var health = 1;
var aware = 0;
var fire_counter = 0;
var hunt_counter = 0;
var hunt_type = 0;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
_root["ens_" + id_number]._x = this._x;
_root["ens_" + id_number]._y = this._y;
if (health > 0) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (aware == 0) {
if (dist <= vision) {
aware = 1;
}
} else if (aware == 1) {
if (dist > 50) {
if (dist >= vision) {
aware = 2;
}
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
tempx = math.round(speed * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round(speed * math.sin((this._rotation * Math.PI) / 180));
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
fire_counter++;
if (fire_counter >= 10) {
tempx = 20 * math.cos((_rotation * Math.PI) / 180);
tempy = 20 * math.sin((_rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root[temp].ownership = 1;
_root.enemy_bullets.push(temp);
_root.active_particles.push(temp);
this.soundlayer.play();
}
fire_counter = 0;
}
} else {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= vision) {
aware = 1;
}
hunt_counter++;
if (hunt_counter >= 60) {
if (math.random() >= 0.8) {
hunt_type = 0;
} else {
hunt_type = 1;
this._rotation = random(360);
tempx = math.round((0.75 * speed) * math.cos((this._rotation * Math.PI) / 180));
tempy = math.round((0.75 * speed) * math.sin((this._rotation * Math.PI) / 180));
}
hunt_counter = 0;
}
if (hunt_type == 1) {
this._x = this._x + tempx;
if ((tempx < 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMin, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
if ((tempx > 0) && (_root.walls.hitTest(_root["ens_" + id_number].getBounds(_root).xMax, _root["ens_" + id_number]._y, true))) {
this._x = this._x - tempx;
}
this._y = this._y + tempy;
if ((tempy < 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMin, true))) {
this._y = this._y - tempy;
}
if ((tempy > 0) && (_root.walls.hitTest(_root["ens_" + id_number]._x, _root["ens_" + id_number].getBounds(_root).yMax, true))) {
this._y = this._y - tempy;
}
}
}
for (everybullet in _root.your_bullets) {
if (_root["ens_" + id_number].hitTest(_root[_root.your_bullets[everybullet]])) {
health--;
}
if (health <= 0) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
this.play();
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
}
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._rotation = Math.atan2(_root.dety - this._y, _root.detx - this._x) / (Math.PI/180);
this.gotoAndStop(331);
_root.score = _root.score + 100;
_root.bodycount = _root.bodycount + 1;
health = 0;
}
}
}
}
}
Instance of Symbol 214 MovieClip "you" in Frame 1482
onClipEvent (load) {
health = 100;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
for (everybullet in _root.enemy_bullets) {
if (_root.mask_you.hitTest(_root[_root.enemy_bullets[everybullet]])) {
health = health - 10;
}
}
}
if (_root.detonation) {
dist = math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety)));
if (dist < 100) {
health = health - (100 - dist);
}
}
}
onClipEvent (mouseDown) {
if (!_root.dead) {
var intensity = 20;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
var intensity = 40;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
var intensity = 20;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _root.you.arms._rotation;
_root[temp].ownership = 0;
_root.your_bullets.push(temp);
_root.active_particles.push(temp);
}
}
}
Instance of Symbol 216 MovieClip "bullet" in Frame 1482
onClipEvent (load) {
var lifespan = 0;
var intensity = 32;
tempx = intensity * math.cos((_rotation * Math.PI) / 180);
tempy = intensity * math.sin((_rotation * Math.PI) / 180);
}
onClipEvent (enterFrame) {
if (!_root.dead) {
if (_name == "bullet") {
} else {
_x = (_x + tempx);
_y = (_y + tempy);
lifespan++;
if (lifespan >= 20) {
temp = 0;
while (this._name != _root.your_bullets[temp]) {
temp++;
}
_root.your_bullets.splice(temp, 1);
this.removeMovieClip();
}
if (_root.walls.hitTest(_x, _y, true)) {
if (ownership == 0) {
temp = 0;
while (this._name != _root.your_bullets[temp]) {
temp++;
}
_root.your_bullets.splice(temp, 1);
} else {
temp = 0;
while (this._name != _root.enemy_bullets[temp]) {
temp++;
}
_root.enemy_bullets.splice(temp, 1);
}
temp = 0;
while (this._name != _root.active_particles[temp]) {
temp++;
}
_root.active_particles.splice(temp, 1);
this.removeMovieClip();
}
}
} else {
this.removeMovieClip();
}
}
Instance of Symbol 219 MovieClip "cam_3" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._y > this._y) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_4" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._y > this._y) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_5" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._y > this._y) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_6" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._y > this._y) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_2" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._x > this._x) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_1" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._x > this._x) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 219 MovieClip "cam_7" in Frame 1482
onClipEvent (enterFrame) {
if (_root.you._x < this._x) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist <= 200) {
this._rotation = Math.atan2(_root.you._y - this._y, _root.you._x - this._x) / (Math.PI/180);
}
}
}
Instance of Symbol 223 MovieClip in Frame 1482
onClipEvent (enterFrame) {
if (!_root.dead) {
this._rotation = this._rotation + 1;
this._x = _root._xmouse;
this._y = _root._ymouse;
this._xscale = math.sqrt(((_root._xmouse - _root.you._x) * (_root._xmouse - _root.you._x)) + ((_root._ymouse - _root.you._y) * (_root._ymouse - _root.you._y))) / 3;
this._yscale = math.sqrt(((_root._xmouse - _root.you._x) * (_root._xmouse - _root.you._x)) + ((_root._ymouse - _root.you._y) * (_root._ymouse - _root.you._y))) / 3;
}
}
Instance of Symbol 229 MovieClip "entity_22" in Frame 1482
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.youwin = 1;
}
}
Instance of Symbol 231 MovieClip "on_screen_hud" in Frame 1482
onClipEvent (enterFrame) {
_root.HUD_SCORE.text = "SCORE: " + _root.score;
}
Instance of Symbol 241 MovieClip in Frame 1482
onClipEvent (enterFrame) {
_root.myhealthtext.text = _root.you.health + "%";
}
Instance of Symbol 159 MovieClip "HUD_BOMB" in Frame 1482
onClipEvent (enterFrame) {
if (_root.c4) {
this._alpha = "100";
} else {
this._alpha = "0";
}
}
Frame 1483
_root.qbuffer = _quality;
_quality = "HIGH";
stopAllSounds();
stop();
Frame 1484
_root.qbuffer = _quality;
_quality = "HIGH";
stopAllSounds();
Instance of Symbol 264 MovieClip "score_break" in Frame 1601
onClipEvent (load) {
_root.score_break.score_dude.text = _root.bodycount;
_root.score_break.score_gold.text = _root.gold;
_root.score_break.score_heart.text = _root.maincharhealth;
}
Instance of Symbol 264 MovieClip "score_break" in Frame 1614
onClipEvent (load) {
_root.score_break.score_dude.text = _root.bodycount;
_root.score_break.score_gold.text = _root.gold;
_root.score_break.score_heart.text = _root.maincharhealth;
_root.your_score_sent.text = "Based on the performance you demonstrated in enemy territory, we award you with a score of: " + Math.floor((((100 * _root.maincharhealth) / 100) + ((100 * _root.bodycount) / 27)) + ((150 * _root.gold) / 19));
}
Frame 1626
stop();
Instance of Symbol 264 MovieClip "score_break" in Frame 1626
onClipEvent (load) {
_root.score_break.score_dude.text = _root.bodycount;
_root.score_break.score_gold.text = _root.gold;
_root.score_break.score_heart.text = _root.maincharhealth;
_root.text_for_end.your_score_sent.text = "Based on the performance you demonstrated in enemy territory, we award you with a score of: " + ((10 * Math.floor((((100 * _root.maincharhealth) / 100) + ((100 * _root.bodycount) / 27)) + ((150 * _root.gold) / 19))) + _root.score);
}
Frame 1627
_root.qbuffer = _quality;
_quality = "HIGH";
stop();
Frame 1628
var dead = 0;
var entity = 0;
var numenem = 27;
active_particles = new array();
your_bullets = new array();
enemy_bullets = new array();
var door1 = 0;
var door2 = 0;
var c4 = 0;
var score = 0;
var gold = 0;
var headcount = 0;
var detonation = 0;
var detx;
var dety;
var doorbomb1 = 0;
var doorbomb2 = 0;
var youwin = 0;
Frame 1629
Mouse.hide();
stop();
this.onEnterFrame = function () {
if (_root.you.health <= 0) {
stopAllSounds();
_root.dead = 1;
Mouse.show();
gotoAndStop (150);
delete this.onEnterFrame;
}
if (_root.youwin) {
stopAllSounds();
_root.dead = 1;
Mouse.show();
gotoAndPlay (150);
delete this.onEnterFrame;
}
};
Instance of Symbol 271 MovieClip "backdrop" in Frame 1629
onClipEvent (enterFrame) {
if (this._x >= 360.05) {
_root.tutorial_hints.tutorial.text = "Keycards are required to enter certain doors. Use this one to open the door to the right of the level.";
} else if (this._x <= 90) {
_root.tutorial_hints.tutorial.text = "The door to the south asks for keycard 69, but that card isn't here, so we can use this c4 as a substitute. Ctrl, or Q will cause you to set it off.";
}
if (!_root.dead) {
var netx = 0;
var nety = 0;
if (Key.isDown(16)) {
speed = 6;
} else {
speed = 4;
}
if ((Key.isDown(37) && (!Key.isDown(39))) || (Key.isDown(65) && (!Key.isDown(68)))) {
netx = netx + speed;
this._x = this._x + speed;
_root.walls._x = _root.walls._x + speed;
if (_root.walls.hitTest(_root.mask_you.getBounds(_root).xMin, _root.mask_you._y, true)) {
netx = netx - speed;
this._x = this._x - speed;
_root.walls._x = _root.walls._x - speed;
}
}
if ((Key.isDown(39) && (!Key.isDown(37))) || (Key.isDown(68) && (!Key.isDown(65)))) {
netx = netx - speed;
this._x = this._x - speed;
_root.walls._x = _root.walls._x - speed;
if (_root.walls.hitTest(_root.mask_you.getBounds(_root).xMax, _root.mask_you._y, true)) {
netx = netx + speed;
this._x = this._x + speed;
_root.walls._x = _root.walls._x + speed;
}
}
if ((Key.isDown(38) && (!Key.isDown(40))) || (Key.isDown(87) && (!Key.isDown(83)))) {
nety = nety + speed;
this._y = this._y + speed;
_root.walls._y = _root.walls._y + speed;
if (_root.walls.hitTest(_root.mask_you._x, _root.mask_you.getBounds(_root).yMin, true)) {
nety = nety - speed;
this._y = this._y - speed;
_root.walls._y = _root.walls._y - speed;
}
}
if ((Key.isDown(40) && (!Key.isDown(38))) || (Key.isDown(83) && (!Key.isDown(87)))) {
nety = nety - speed;
this._y = this._y - speed;
_root.walls._y = _root.walls._y - speed;
if (_root.walls.hitTest(_root.mask_you._x, _root.mask_you.getBounds(_root).yMax, true)) {
nety = nety + speed;
this._y = this._y + speed;
_root.walls._y = _root.walls._y + speed;
}
}
if (Key.isDown(17) || (Key.isDown(81))) {
if (_root.c4) {
_root.detonationDevice._x = _root.you._x;
_root.detonationDevice._y = _root.you._y;
_root.detonationDevice.play();
_root.c4 = 0;
_root.tutorial_hints.tutorial.text = "NOW GET AWAY!!!";
}
}
inst = 1;
while (inst <= _root.numenem) {
_root["en_" + inst]._x = _root["en_" + inst]._x + netx;
_root["en_" + inst]._y = _root["en_" + inst]._y + nety;
inst++;
}
inst = 0;
while (inst <= _root.active_particles.length) {
_root[_root.active_particles[inst]]._x = _root[_root.active_particles[inst]]._x + netx;
_root[_root.active_particles[inst]]._y = _root[_root.active_particles[inst]]._y + nety;
inst++;
}
_root.cad1._x = _root.cad1._x + netx;
_root.cad1._y = _root.cad1._y + nety;
_root.cd2._x = _root.cd2._x + netx;
_root.cd2._y = _root.cd2._y + nety;
inst = 1;
while (inst <= 3) {
_root["sc" + inst]._x = _root["sc" + inst]._x + netx;
_root["sc" + inst]._y = _root["sc" + inst]._y + nety;
inst++;
}
inst = 1;
while (inst <= 22) {
_root["entity_" + inst]._x = _root["entity_" + inst]._x + netx;
_root["entity_" + inst]._y = _root["entity_" + inst]._y + nety;
inst++;
}
_root.detonationDevice._x = _root.detonationDevice._x + netx;
_root.detonationDevice._y = _root.detonationDevice._y + nety;
}
}
Instance of Symbol 159 MovieClip "entity_1" in Frame 1629
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.c4 = 1;
_root.Text_Control.HUD_TEXT.text = "C-4 explosive package";
_root.Text_Control.play();
this._x = 50000;
_root.score = _root.score + 50;
this.soundlayer.play();
}
}
Instance of Symbol 162 MovieClip "sc1" in Frame 1629
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.door1 = 1;
_root.Text_Control.HUD_TEXT.text = "Key Card 1 Acquired";
_root.Text_Control.play();
this._x = 50000;
this.soundlayer.play();
}
}
Instance of Symbol 205 MovieClip "cd2" in Frame 1629
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 70) {
_root.Text_Control.HUD_TEXT.text = "Key Card 69 Required";
_root.Text_Control.play();
}
if (_root.detonation) {
if (math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety))) < 100) {
this._x = 50000;
_root.doorbomb1 = 1;
}
}
}
Instance of Symbol 205 MovieClip "cad1" in Frame 1629
onClipEvent (load) {
var opening = 0;
}
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (opening) {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this._x = 50000;
}
} else if ((dist < 50) && (_root.door1)) {
opening = 1;
_root.score = _root.score + 20;
this.soundlayer.play();
} else if ((dist < 70) && (!_root.door1)) {
_root.Text_Control.HUD_TEXT.text = "Key Card 1 Required";
_root.Text_Control.play();
}
}
Instance of Symbol 214 MovieClip "you" in Frame 1629
onClipEvent (load) {
health = 100;
}
onClipEvent (enterFrame) {
if (!_root.dead) {
for (everybullet in _root.enemy_bullets) {
if (_root.mask_you.hitTest(_root[_root.enemy_bullets[everybullet]])) {
health = health - 10;
}
}
}
if (_root.detonation) {
dist = math.sqrt(((this._x - _root.detx) * (this._x - _root.detx)) + ((this._y - _root.dety) * (this._y - _root.dety)));
if (dist < 100) {
health = health - (100 - dist);
}
}
}
onClipEvent (mouseDown) {
if (!_root.dead) {
var intensity = 20;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
if (!_root.walls.hitTest(_x + tempx, _y + tempy, true)) {
var intensity = 40;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
_root.entity++;
temp = _root.entity;
_root.smokeref.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _rotation;
_root.active_particles.push(temp);
var intensity = 20;
tempx = intensity * math.cos((_root.you.arms._rotation * Math.PI) / 180);
tempy = intensity * math.sin((_root.you.arms._rotation * Math.PI) / 180);
_root.entity++;
temp = _root.entity;
_root.bullet.duplicateMovieClip(temp, temp);
_root[temp]._x = _x + tempx;
_root[temp]._y = _y + tempy;
_root[temp]._rotation = _root.you.arms._rotation;
_root[temp].ownership = 0;
_root.your_bullets.push(temp);
_root.active_particles.push(temp);
}
}
}
Instance of Symbol 216 MovieClip "bullet" in Frame 1629
onClipEvent (load) {
var lifespan = 0;
var intensity = 32;
tempx = intensity * math.cos((_rotation * Math.PI) / 180);
tempy = intensity * math.sin((_rotation * Math.PI) / 180);
}
onClipEvent (enterFrame) {
if (!_root.dead) {
if (_name == "bullet") {
} else {
_x = (_x + tempx);
_y = (_y + tempy);
lifespan++;
if (lifespan >= 20) {
temp = 0;
while (this._name != _root.your_bullets[temp]) {
temp++;
}
_root.your_bullets.splice(temp, 1);
this.removeMovieClip();
}
if (_root.walls.hitTest(_x, _y, true)) {
if (ownership == 0) {
temp = 0;
while (this._name != _root.your_bullets[temp]) {
temp++;
}
_root.your_bullets.splice(temp, 1);
} else {
temp = 0;
while (this._name != _root.enemy_bullets[temp]) {
temp++;
}
_root.enemy_bullets.splice(temp, 1);
}
temp = 0;
while (this._name != _root.active_particles[temp]) {
temp++;
}
_root.active_particles.splice(temp, 1);
this.removeMovieClip();
}
}
} else {
this.removeMovieClip();
}
}
Instance of Symbol 223 MovieClip in Frame 1629
onClipEvent (enterFrame) {
if (!_root.dead) {
this._rotation = this._rotation + 1;
this._x = _root._xmouse;
this._y = _root._ymouse;
this._xscale = math.sqrt(((_root._xmouse - _root.you._x) * (_root._xmouse - _root.you._x)) + ((_root._ymouse - _root.you._y) * (_root._ymouse - _root.you._y))) / 3;
this._yscale = math.sqrt(((_root._xmouse - _root.you._x) * (_root._xmouse - _root.you._x)) + ((_root._ymouse - _root.you._y) * (_root._ymouse - _root.you._y))) / 3;
}
}
Instance of Symbol 229 MovieClip "entity_22" in Frame 1629
onClipEvent (enterFrame) {
var dist = math.sqrt(((this._x - _root.you._x) * (this._x - _root.you._x)) + ((this._y - _root.you._y) * (this._y - _root.you._y)));
if (dist < 30) {
_root.youwin = 1;
}
}
Instance of Symbol 231 MovieClip "on_screen_hud" in Frame 1629
onClipEvent (enterFrame) {
_root.HUD_SCORE.text = "SCORE: " + _root.score;
}
Instance of Symbol 241 MovieClip in Frame 1629
onClipEvent (enterFrame) {
_root.myhealthtext.text = _root.you.health + "%";
}
Instance of Symbol 159 MovieClip "HUD_BOMB" in Frame 1629
onClipEvent (enterFrame) {
if (_root.c4) {
this._alpha = "100";
} else {
this._alpha = "0";
}
}
Frame 1630
_root.qbuffer = _quality;
_quality = "HIGH";
stop();
Symbol 19 Button
on (release) {
play();
}
Symbol 31 Button
on (press) {
_root.qualityControl.play();
}
Symbol 38 Button
on (release) {
_root._quality = "HIGH";
_root.qualityControl.play();
}
Symbol 43 Button
on (release) {
_root._quality = "MEDIUM";
_root.qualityControl.play();
}
Symbol 48 Button
on (release) {
_root._quality = "LOW";
_root.qualityControl.play();
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 30
stop();
Symbol 55 Button
on (release) {
play();
}
Symbol 59 Button
on (release) {
gotoAndPlay (1630);
}
Symbol 63 Button
on (release) {
gotoAndPlay (1627);
}
Symbol 72 Button
on (release) {
stopAllSounds();
gotoAndPlay (1481);
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.door2) {
this._x = 10000;
}
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.door3) {
this._x = 10000;
}
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.door1) {
this._x = 10000;
}
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.doorbomb1) {
this._x = 50000;
}
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.doorbomb2) {
this._x = 50000;
}
}
Symbol 138 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 165
_root.detonation = 1;
_root.detx = this._x;
_root.dety = this._y;
Symbol 159 MovieClip Frame 181
this._x = 50000;
_root.detonation = 0;
Symbol 173 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 1
this.gotoAndStop(random(3) + 2);
Symbol 178 MovieClip Frame 2
stop();
Symbol 178 MovieClip Frame 3
stop();
Symbol 178 MovieClip Frame 4
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 330
stop();
Symbol 195 MovieClip Frame 331
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 1
stop();
Instance of Symbol 211 MovieClip "arms" in Symbol 214 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = Math.atan2(_root._ymouse - _root.you._y, _root._xmouse - _root.you._x) / (Math.PI/180);
}
onClipEvent (mouseDown) {
this.play();
}
Symbol 226 MovieClip Frame 15
if (this._name == "smokeref") {
stop();
} else {
temp = 0;
while (this._name != _root.active_particles[temp]) {
temp++;
}
_root.active_particles.splice(temp, 1);
this.removeMovieClip();
}
Symbol 246 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 90
_root.Text_Control.HUD_TEXT.text = "";
Symbol 253 Button
on (release) {
_quality = _root.qbuffer;
gotoAndPlay (150);
}
Symbol 256 Button
on (release) {
_quality = _root.qbuffer;
stopAllSounds();
gotoAndPlay (150);
}
Instance of Symbol 117 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.door1) {
this._x = 10000;
}
}
Instance of Symbol 117 MovieClip in Symbol 269 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.doorbomb1) {
this._x = 50000;
}
}
Symbol 276 Button
on (release) {
_root.youwin = 1;
}
Symbol 281 Button
on (release) {
_quality = _root.qbuffer;
gotoAndPlay (1628);
}