Frame 2
stop();
Instance of Symbol 34 MovieClip "MenuTransition" in Frame 2
onClipEvent (enterFrame) {
if (this._currentFrame >= 50) {
_root.gotoAndStop(2, 1);
}
}
Instance of Symbol 58 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (_parent.City.hitTest(this._x, this._y, true)) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 66 MovieClip in Frame 2
onClipEvent (load) {
BaseVolume = 40;
UpdateTicks = 0;
}
onClipEvent (enterFrame) {
if (UpdateTicks >= 1) {
this.Bar1._height = BaseVolume + (random(8) * 20);
this.Bar2._height = BaseVolume + (random(8) * 20);
this.Bar3._height = BaseVolume + (random(8) * 20);
this.Bar4._height = BaseVolume + (random(8) * 20);
this.Bar5._height = BaseVolume + (random(8) * 20);
this.Bar6._height = BaseVolume + (random(8) * 20);
this.Bar7._height = BaseVolume + (random(8) * 20);
this.Bar8._height = BaseVolume + (random(8) * 20);
this.Bar9._height = BaseVolume + (random(8) * 20);
this.Bar10._height = BaseVolume + (random(8) * 20);
UpdateTicks = 0;
} else {
UpdateTicks = UpdateTicks + 1;
}
}
Frame 3
Disarming = false;
MaxSpeed = 100;
Accelleration = 10;
JumpPower = 40;
MaxHealth = 100;
MaxPower = 100;
Instance of Symbol 266 MovieClip "CameraView" in Frame 3
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
scaleX = Stage.width / this._width;
scaleY = Stage.height / this._height;
_root._x = (Stage.width / 2) - (this._x * scaleX);
_root._y = (Stage.height / 2) - (this._y * scaleY);
_parent._xscale = 100 * scaleX;
_parent._yscale = 100 * scaleY;
this._x = this._x - ((this._x - _parent.Player._x) / 2);
this._y = this._y - ((this._y - _parent.Player._y) / 2);
}
Instance of Symbol 272 MovieClip in Frame 3
onClipEvent (enterFrame) {
this._width = _parent.CameraView._width;
this._height = _parent.CameraView._height;
this._x = _parent.CameraView._x;
this._y = _parent.CameraView._y;
}
Instance of Symbol 289 MovieClip "HUD" in Frame 3
onClipEvent (enterFrame) {
this._width = _parent.CameraView._width;
this._height = _parent.CameraView._height;
this._x = _parent.CameraView._x;
this._y = _parent.CameraView._y;
}
Instance of Symbol 374 MovieClip "Player" in Frame 3
onClipEvent (load) {
function GroundTest() {
X = (Math.cos((this._rotation + 90) * (Math.PI/180)) * StartHeight) - 10;
Y = (Math.sin((this._rotation + 90) * (Math.PI/180)) * StartHeight) - 10;
MoveX = Math.cos((this._rotation + 90) * (Math.PI/180));
MoveY = Math.sin((this._rotation + 90) * (Math.PI/180));
if (_parent.TestGround.hitTest((this._x + X) + TrueXSpeed, ((this._y + Y) + TrueYSpeed) + FallSpeed, true)) {
if (Math.abs(FallSpeed) > 10) {
RunSpeed = TrueXSpeed;
}
TrueXSpeed = Math.cos(this._rotation * (Math.PI/180)) * RunSpeed;
TrueYSpeed = Math.sin(this._rotation * (Math.PI/180)) * RunSpeed;
FallSpeed = 0;
while (_parent.TestGround.hitTest((this._x + X) + MoveX, (this._y + Y) + MoveY, true)) {
this._y = this._y - MoveY;
this._x = this._x - MoveX;
}
}
}
function RightTest() {
X = Math.cos(this._rotation * (Math.PI/180)) * StartWidth;
Y = Math.sin(this._rotation * (Math.PI/180)) * StartWidth;
MoveX = Math.cos(this._rotation * (Math.PI/180));
MoveY = Math.sin(this._rotation * (Math.PI/180));
if (_parent.TestGround.hitTest((this._x + X) + TrueXSpeed, ((this._y + Y) + TrueYSpeed) + FallSpeed, true)) {
if (RunSpeed > 0) {
RunSpeed = 0;
TrueXSpeed = 0;
TrueYSpeed = 0;
}
while (_parent.TestGround.hitTest((this._x + X) + MoveX, (this._y + Y) + MoveY, true)) {
this._y = this._y - MoveY;
this._x = this._x - MoveX;
}
}
}
function LeftTest() {
X = Math.cos(this._rotation * (Math.PI/180)) * (-StartWidth);
Y = Math.sin(this._rotation * (Math.PI/180)) * (-StartWidth);
MoveX = -Math.cos(this._rotation * (Math.PI/180));
MoveY = -Math.sin(this._rotation * (Math.PI/180));
if (_parent.TestGround.hitTest((this._x + X) + TrueXSpeed, ((this._y + Y) + TrueYSpeed) + FallSpeed, true)) {
if (RunSpeed < 0) {
RunSpeed = 0;
TrueXSpeed = 0;
TrueYSpeed = 0;
}
while (_parent.TestGround.hitTest((this._x + X) + MoveX, (this._y + Y) + MoveY, true)) {
this._y = this._y - MoveY;
this._x = this._x - MoveX;
}
}
}
function KeyTest() {
GameSpeed = 1;
if (Key.isDown(32)) {
if (LastSpacePress > 5) {
var _local6 = new Sound(this);
_local6.attachSound("SpeedDown.aif");
_local6.start(0, 0);
}
if (Power > 0) {
Power = Power - 1;
GameSpeed = 0.1;
}
LastSpacePress = 0;
} else {
if ((LastSpacePress < 2) && (LastSpacePress > 0)) {
var _local5 = new Sound(this);
_local5.attachSound("SpeedUp.aif");
_local5.start(1, 0);
}
Power = Power + 1;
LastSpacePress = LastSpacePress + 1;
}
var _local4 = false;
var _local3 = false;
if (TouchingGround == true) {
if (Key.isDown(39)) {
_local3 = true;
if (RunSpeed < _root.MaxSpeed) {
RunSpeed = RunSpeed + _root.Accelleration;
}
}
if (Key.isDown(37)) {
_local4 = true;
if (RunSpeed > (-_root.MaxSpeed)) {
RunSpeed = RunSpeed - _root.Accelleration;
}
}
if ((_local3 == false) && (_local4 == false)) {
RunSpeed = RunSpeed - (RunSpeed / 5);
}
}
if (Key.isDown(38)) {
if (TouchingGround == true) {
JumpX = Math.cos((this._rotation - 90) * (Math.PI/180)) * _root.JumpPower;
JumpY = Math.sin((this._rotation - 90) * (Math.PI/180)) * _root.JumpPower;
TrueXSpeed = TrueXSpeed + JumpX;
TrueYSpeed = TrueYSpeed + JumpY;
if ((this._rotation > 30) or (this._rotation < -30)) {
if (CurrentAnimation != "Flip") {
CurrentAnimation = "Flip";
gotoAndPlay ("Flip");
}
} else if (CurrentAnimation != "Jump") {
CurrentAnimation = "Jump";
gotoAndPlay ("Jump");
}
}
}
}
function GetRotation() {
RightAltDist = StartHeight * 1.3;
LeftAltDist = StartHeight * 1.3;
LeftAltX = Math.cos(((this._rotation - 20) + 90) * (Math.PI/180)) * RightAltDist;
LeftAltY = Math.sin(((this._rotation - 20) + 90) * (Math.PI/180)) * RightAltDist;
RightAltX = Math.cos(((this._rotation + 20) + 90) * (Math.PI/180)) * LeftAltDist;
RightAltY = Math.sin(((this._rotation + 20) + 90) * (Math.PI/180)) * LeftAltDist;
while (_parent.TestGround.hitTest(this._x + RightAltX, this._y + RightAltY, true)) {
TouchingGround = true;
RightAltDist = RightAltDist - 1;
RightAltX = Math.cos(((this._rotation + 20) + 90) * (Math.PI/180)) * RightAltDist;
RightAltY = Math.sin(((this._rotation + 20) + 90) * (Math.PI/180)) * RightAltDist;
}
while (_parent.TestGround.hitTest(this._x + LeftAltX, this._y + LeftAltY, true)) {
TouchingGround = true;
LeftAltDist = LeftAltDist - 1;
LeftAltX = Math.cos(((this._rotation - 20) + 90) * (Math.PI/180)) * LeftAltDist;
LeftAltY = Math.sin(((this._rotation - 20) + 90) * (Math.PI/180)) * LeftAltDist;
}
if (TouchingGround == true) {
AltXdiff = RightAltX - LeftAltX;
AltYdiff = RightAltY - LeftAltY;
RotationTanResult = Math.atan2(AltYdiff, AltXdiff);
this._rotation = 180 + (RotationTanResult * 57.2957795130823);
}
}
function UpdateCamera() {
_parent.CameraView._xscale = 100 + ((Math.abs(TrueXSpeed) + Math.abs(TrueYSpeed)) * 2);
_parent.CameraView._yscale = 100 + ((Math.abs(TrueXSpeed) + Math.abs(TrueYSpeed)) * 2);
}
function MoveCharacter() {
if (RunSpeed > 0) {
this._xscale = StartScale;
} else if (RunSpeed < 0) {
this._xscale = -StartScale;
}
this._y = this._y + FallSpeed;
FallSpeed = FallSpeed + 2;
this._x = this._x + TrueXSpeed;
this._y = this._y + TrueYSpeed;
if (TouchingGround == false) {
if (_rotation < 0) {
this._rotation = this._rotation + 10;
}
if (_rotation > 0) {
this._rotation = this._rotation - 10;
}
}
}
function Animate() {
if (TouchingGround == true) {
if (Math.round(Math.abs(RunSpeed)) < 5) {
if (CurrentAnimation != "Idle") {
CurrentAnimation = "Idle";
gotoAndPlay ("Idle");
}
} else if (Math.abs(RunSpeed) > 0) {
if (CurrentAnimation != "Run") {
CurrentAnimation = "Run";
gotoAndPlay ("Run");
}
}
} else if (CurrentAnimation != "Flip") {
if ((FallSpeed + TrueYSpeed) > 0) {
CurrentAnimation = "Fall";
gotoAndPlay ("Fall");
} else {
CurrentAnimation = "JumpInAir";
gotoAndPlay ("JumpInAir");
}
}
}
CurrentAnimation = "Idle";
GameSpeed = 0.1;
FallSpeed = 0;
LastSpacePress = 10;
RunSpeed = 0;
Health = _root.MaxHealth;
Power = _root.MaxPower;
Disarming = false;
Dead = false;
TrueXSpeed = 0;
TrueYSpeed = 0;
LeftAltDist = 0;
LeftAltX = 0;
LeftAltY = 0;
RightAltDist = 0;
RightAltX = 0;
RightAltY = 0;
AltXdiff = 0;
AltYdiff = 0;
CollisionPointY = 0;
CollisionAngleDistanceY = 0;
RotationTanResult = 0;
StartWidth = _width / 2;
StartHeight = _height / 2;
StartScale = this._xscale;
}
onClipEvent (enterFrame) {
if (Health <= 0) {
Health = 0;
Dead = true;
this.gotoAndStop("Die");
}
_parent.HUD.HealthBar.gotoAndStop(Math.round((Health / _root.MaxHealth) * 100) + 1);
if (Power < 0) {
Power = 0;
}
if (Power > _root.MaxPower) {
Power = _root.MaxPower;
}
_parent.HUD.PowerBar.gotoAndStop(Math.round((Power / _root.MaxPower) * 100) + 1);
if ((Disarming == false) && (Dead == false)) {
KeyTest();
MoveCharacter();
if (FallSpeed >= 50) {
GroundTest();
}
if (RunSpeed > 0) {
RightTest();
LeftTest();
} else {
LeftTest();
RightTest();
}
if (FallSpeed < 50) {
GroundTest();
}
TouchingGround = false;
GetRotation();
Animate();
}
}
Instance of Symbol 393 MovieClip in Frame 3
onClipEvent (load) {
function Shoot() {
if (FireTicks >= 2) {
var _local5 = new Sound(this);
if (_parent.Player.GameSpeed >= 1) {
_local5.attachSound("MP5Shot.aif");
} else {
_local5.attachSound("MP5ShotSLOW.aif");
}
var _local7 = _parent.CameraView._x - this._x;
var _local8 = _parent.CameraView._y - this._y;
var _local9 = Math.sqrt((_local7 * _local7) + (_local8 * _local8));
var _local6 = 100000 / _local9;
var _local4 = -_local7;
if (_local4 > 100) {
_local4 = 100;
} else if (_local4 < -100) {
_local4 = -100;
}
if (_local6 > 100) {
_local6 = 100;
}
_local5.setVolume(_local6);
_local5.setPan(_local4);
_local5.start(0, 0);
ii = 0;
while (ii < 1) {
BulletArray[ii] = createEmptyMovieClip("Bullet" + ii, ii);
var _local3 = 16777215 /* 0xFFFFFF */;
BulletArray[ii].lineStyle(10, _local3, 50);
BulletArray[ii].lineTo(500 * _parent.Player.GameSpeed, 0);
BulletArray[ii]._x = this.Gun._x;
BulletArray[ii]._y = this.Gun._y;
BulletArray[ii]._rotation = (this.Gun._rotation - 5) + random(10);
ii++;
}
FireTicks = 0;
RecoilAngle = 0;
this.Gun.GunFlash._visible = true;
if (_parent.Player.GameSpeed < 1) {
this.Gun.Shockwave._visible = true;
this.Gun.Shockwave.gotoAndPlay(1);
}
} else {
FireTicks = FireTicks + (1 * _parent.Player.GameSpeed);
}
}
function Aim() {
if (_parent.Player._x > this._x) {
this._xscale = StartScale;
} else {
this._xscale = -StartScale;
}
Xdist = Math.abs(_root.Player._x - this._x);
Ydist = _root.Player._y - this._y;
TanResult = Math.atan2(Ydist, Xdist);
TargetRotation = TanResult * 57.2957795130823;
if (this.Gun._rotation > TargetRotation) {
this.Gun._rotation = this.Gun._rotation - ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.Gun._rotation = this.Gun._rotation + ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
if (this.FOVCone._rotation > TargetRotation) {
this.FOVCone._rotation = this.FOVCone._rotation - ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.FOVCone._rotation = this.FOVCone._rotation + ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
this.Gun._rotation = this.Gun._rotation - (RecoilAngle * _parent.Player.GameSpeed);
if (RecoilAngle > 0) {
RecoilAngle = RecoilAngle - (1 * _parent.Player.GameSpeed);
}
}
FireTicks = random(50);
RecoilAngle = 0;
BulletArray = new Array();
StartScale = this._xscale;
GunRange = 5000;
Awareness = 50;
}
onClipEvent (enterFrame) {
var Xdist = (_root.Player._x - this._x);
var Ydist = (_root.Player._y - this._y);
var dist = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
if (this.FOVCone.hitTest(_parent.Player._x, _parent.Player._y, true)) {
Awareness = Awareness + (1 * _parent.Player.GameSpeed);
}
if (Awareness > 70) {
Aim();
}
if (Awareness >= 100) {
if (dist < GunRange) {
Shoot();
}
}
ii = 0;
while (ii < BulletArray.length) {
BulletXSpeed = (Math.cos(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletYSpeed = (Math.sin(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletArray[ii]._x = BulletArray[ii]._x + BulletXSpeed;
BulletArray[ii]._y = BulletArray[ii]._y + BulletYSpeed;
if (BulletArray[ii].hitTest(_parent.Player)) {
_parent.HUDHit.gotoAndPlay(2);
}
if (_parent.TestGround.hitTest(BulletArray[ii]._x + BulletXSpeed, BulletArray[ii]._y + BulletYSpeed, true)) {
BulletArray[ii].removeMovieClip("Bullet" + ii);
}
ii++;
}
}
Instance of Symbol 405 MovieClip in Frame 3
onClipEvent (load) {
function Shoot() {
if (FireTicks >= 50) {
var _local5 = new Sound(this);
if (_parent.Player.GameSpeed >= 1) {
_local5.attachSound("ShotgunShot.aif");
} else {
_local5.attachSound("ShotgunShotSLOW.aif");
}
var _local7 = _parent.CameraView._x - this._x;
var _local8 = _parent.CameraView._y - this._y;
var _local9 = Math.sqrt((_local7 * _local7) + (_local8 * _local8));
var _local6 = 100000 / _local9;
var _local4 = -_local7;
if (_local4 > 100) {
_local4 = 100;
} else if (_local4 < -100) {
_local4 = -100;
}
if (_local6 > 100) {
_local6 = 100;
}
_local5.setVolume(_local6);
_local5.setPan(_local4);
_local5.start(0, 0);
ii = 0;
while (ii < 5) {
BulletArray[ii] = createEmptyMovieClip("Bullet" + ii, ii);
var _local3 = 16777215 /* 0xFFFFFF */;
BulletArray[ii].lineStyle(10, _local3, 50);
BulletArray[ii].lineTo(500 * _parent.Player.GameSpeed, 0);
BulletArray[ii]._x = this.Gun._x;
BulletArray[ii]._y = this.Gun._y;
BulletArray[ii]._rotation = (this.Gun._rotation - 10) + random(20);
ii++;
}
FireTicks = 0;
RecoilAngle = 10;
this.Gun.GunFlash._visible = true;
this.Gun.gotoAndPlay("Reload");
if (_parent.Player.GameSpeed < 1) {
this.Gun.Shockwave._visible = true;
this.Gun.Shockwave.gotoAndPlay(1);
}
} else {
FireTicks = FireTicks + (1 * _parent.Player.GameSpeed);
}
}
function Aim() {
if (_parent.Player._x > this._x) {
this._xscale = StartScale;
} else {
this._xscale = -StartScale;
}
Xdist = Math.abs(_root.Player._x - this._x);
Ydist = _root.Player._y - this._y;
TanResult = Math.atan2(Ydist, Xdist);
TargetRotation = TanResult * 57.2957795130823;
if (this.Gun._rotation > TargetRotation) {
this.Gun._rotation = this.Gun._rotation - ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.Gun._rotation = this.Gun._rotation + ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
if (this.FOVCone._rotation > TargetRotation) {
this.FOVCone._rotation = this.FOVCone._rotation - ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.FOVCone._rotation = this.FOVCone._rotation + ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
this.Gun._rotation = this.Gun._rotation - (RecoilAngle * _parent.Player.GameSpeed);
if (RecoilAngle > 0) {
RecoilAngle = RecoilAngle - (1 * _parent.Player.GameSpeed);
}
}
FireTicks = random(50);
RecoilAngle = 0;
BulletArray = new Array();
StartScale = this._xscale;
Awareness = 50;
GunRange = 5000;
}
onClipEvent (enterFrame) {
var Xdist = (_root.Player._x - this._x);
var Ydist = (_root.Player._y - this._y);
var dist = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
if (this.FOVCone.hitTest(_parent.Player._x, _parent.Player._y, true)) {
Awareness = Awareness + (1 * _parent.Player.GameSpeed);
}
if (Awareness > 70) {
Aim();
}
if (Awareness >= 100) {
if (dist < GunRange) {
Shoot();
}
}
ii = 0;
while (ii < BulletArray.length) {
BulletXSpeed = (Math.cos(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletYSpeed = (Math.sin(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletArray[ii]._x = BulletArray[ii]._x + BulletXSpeed;
BulletArray[ii]._y = BulletArray[ii]._y + BulletYSpeed;
if (BulletArray[ii].hitTest(_parent.Player)) {
_parent.HUD.HUDHit.gotoAndPlay(2);
_parent.Player.Health = _parent.Player.Health - 10;
}
if (_parent.TestGround.hitTest(BulletArray[ii]._x + BulletXSpeed, BulletArray[ii]._y + BulletYSpeed, true)) {
BulletArray[ii].removeMovieClip("Bullet" + ii);
}
ii++;
}
}
Instance of Symbol 436 MovieClip "PistolWithCode" in Frame 3
onClipEvent (load) {
function Shoot() {
if (FireTicks >= 40) {
var _local5 = new Sound(this);
if (_parent.Player.GameSpeed >= 1) {
_local5.attachSound("PistolShot.aif");
} else {
_local5.attachSound("PistolShotSLOW.aif");
}
var _local7 = _parent.CameraView._x - this._x;
var _local8 = _parent.CameraView._y - this._y;
var _local9 = Math.sqrt((_local7 * _local7) + (_local8 * _local8));
var _local6 = 100000 / _local9;
var _local4 = -_local7;
if (_local4 > 100) {
_local4 = 100;
} else if (_local4 < -100) {
_local4 = -100;
}
if (_local6 > 100) {
_local6 = 100;
}
_local5.setVolume(_local6);
_local5.setPan(_local4);
_local5.start(0, 0);
ii = 0;
while (ii < 1) {
BulletArray[ii] = createEmptyMovieClip("Bullet" + ii, ii);
var _local3 = 16777215 /* 0xFFFFFF */;
BulletArray[ii].lineStyle(10, _local3, 50);
BulletArray[ii].lineTo(500 * _parent.Player.GameSpeed, 0);
BulletArray[ii]._x = this.Gun._x;
BulletArray[ii]._y = this.Gun._y;
BulletArray[ii]._rotation = (this.Gun._rotation - 5) + random(10);
ii++;
}
FireTicks = 0;
RecoilAngle = 10;
this.Gun.GunFlash._visible = true;
this.Gun.gotoAndPlay("Reload");
if (_parent.Player.GameSpeed < 1) {
this.Gun.Shockwave._visible = true;
this.Gun.Shockwave.gotoAndPlay(1);
}
} else {
FireTicks = FireTicks + (1 * _parent.Player.GameSpeed);
}
}
function Aim() {
if (_parent.Player._x > this._x) {
this._xscale = StartScale;
} else {
this._xscale = -StartScale;
}
Xdist = Math.abs(_root.Player._x - this._x);
Ydist = _root.Player._y - this._y;
TanResult = Math.atan2(Ydist, Xdist);
TargetRotation = TanResult * 57.2957795130823;
if (this.Gun._rotation > TargetRotation) {
this.Gun._rotation = this.Gun._rotation - ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.Gun._rotation = this.Gun._rotation + ((Math.abs(this.Gun._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
if (this.FOVCone._rotation > TargetRotation) {
this.FOVCone._rotation = this.FOVCone._rotation - ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
} else {
this.FOVCone._rotation = this.FOVCone._rotation + ((Math.abs(this.FOVCone._rotation - TargetRotation) / 10) * _parent.Player.GameSpeed);
}
this.Gun._rotation = this.Gun._rotation - (RecoilAngle * _parent.Player.GameSpeed);
if (RecoilAngle > 0) {
RecoilAngle = RecoilAngle - (1 * _parent.Player.GameSpeed);
}
}
CurrentAnimation = "Standing";
FireTicks = random(50);
RecoilAngle = 0;
BulletArray = new Array();
StartScale = this._xscale;
Awareness = 50;
GunRange = 5000;
Dead = false;
}
onClipEvent (enterFrame) {
if (this.Gun.hitTest(_parent.Player)) {
if (Key.isDown(16)) {
Dead = true;
_parent.Player.gotoAndPlay("DisarmPistol");
_parent.Player.Disarming = true;
_parent.Player._xscale = _parent.Player.StartScale * (this._xscale / Math.abs(this._xscale));
_parent.Player.RunSpeed = this._xscale / Math.abs(this._xscale);
_parent.Player.TrueXSpeed = 0;
_parent.Player.TrueYSpeed = 0;
_parent.Player._x = this._x;
_parent.Player._y = this._y;
}
}
if (Dead == false) {
var Xdist = (_root.Player._x - this._x);
var Ydist = (_root.Player._y - this._y);
var dist = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
if (this.FOVCone.hitTest(_parent.Player._x, _parent.Player._y, true)) {
Awareness = Awareness + (1 * _parent.Player.GameSpeed);
}
if (Awareness > 70) {
Aim();
}
if (Awareness >= 100) {
if (dist < GunRange) {
Shoot();
}
}
} else if (CurrentAnimation != "Die") {
CurrentAnimation = "Die";
gotoAndPlay ("die");
}
ii = 0;
while (ii < BulletArray.length) {
BulletXSpeed = (Math.cos(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletYSpeed = (Math.sin(BulletArray[ii]._rotation * (Math.PI/180)) * 500) * _parent.Player.GameSpeed;
BulletArray[ii]._x = BulletArray[ii]._x + BulletXSpeed;
BulletArray[ii]._y = BulletArray[ii]._y + BulletYSpeed;
if (BulletArray[ii].hitTest(_parent.Player)) {
_parent.HUD.HUDHit.gotoAndPlay(2);
_parent.Player.Health = _parent.Player.Health - 10;
}
if (_parent.TestGround.hitTest(BulletArray[ii]._x + BulletXSpeed, BulletArray[ii]._y + BulletYSpeed, true)) {
BulletArray[ii].removeMovieClip("Bullet" + ii);
}
ii++;
}
}
Instance of Symbol 439 MovieClip in Frame 3
onClipEvent (enterFrame) {
this._width = _parent.CameraView._width;
this._height = _parent.CameraView._height;
this._x = _parent.CameraView._x;
this._y = _parent.CameraView._y;
}
Instance of Symbol 448 MovieClip in Frame 53
onClipEvent (enterFrame) {
var percent = (this.VolumeSliderKnob._x + 50);
if (percent >= 0) {
_quality = "LOW";
}
if (percent >= 33) {
_quality = "MEDIUM";
}
if (percent >= 66) {
_quality = "HIGH";
}
}
Frame 54
stop();
Instance of Symbol 34 MovieClip "MenuTransition" in Frame 54
onClipEvent (enterFrame) {
if (_currentframe == 50) {
_root.gotoAndStop(2, "Frame1");
}
}
Instance of Symbol 58 MovieClip in Frame 54
onClipEvent (enterFrame) {
if (_parent.City.hitTest(this._x, this._y, true)) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 66 MovieClip in Frame 54
onClipEvent (load) {
BaseVolume = 40;
UpdateTicks = 0;
}
onClipEvent (enterFrame) {
if (UpdateTicks >= 1) {
this.Bar1._height = BaseVolume + (random(8) * 20);
this.Bar2._height = BaseVolume + (random(8) * 20);
this.Bar3._height = BaseVolume + (random(8) * 20);
this.Bar4._height = BaseVolume + (random(8) * 20);
this.Bar5._height = BaseVolume + (random(8) * 20);
this.Bar6._height = BaseVolume + (random(8) * 20);
this.Bar7._height = BaseVolume + (random(8) * 20);
this.Bar8._height = BaseVolume + (random(8) * 20);
this.Bar9._height = BaseVolume + (random(8) * 20);
this.Bar10._height = BaseVolume + (random(8) * 20);
UpdateTicks = 0;
} else {
UpdateTicks = UpdateTicks + 1;
}
}
Symbol 17 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 28 Button
on (release) {
_root.play();
}
Symbol 30 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local2;
if (_local2 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
}
function startMovie() {
_root.play();
}
_root.stop();
stop();
var AUTO_PLAY = false;
var loadingComplete = false;
timerHandler();
Instance of Symbol 12 MovieClip in Symbol 30 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.timerHandler();
}
Symbol 30 MovieClip Frame 2
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 42 Button
on (release) {
gotoAndStop (53);
}
Symbol 55 Button
on (release) {
gotoAndStop (3);
}
Symbol 272 MovieClip Frame 61
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 21
stop();
Symbol 373 MovieClip Frame 75
_root._x = 0;
_root._y = 0;
_root._xscale = 100;
_root._yscale = 100;
_root.gotoAndStop(1, 1);
Symbol 374 MovieClip Frame 20
gotoAndPlay ("Idle");
Symbol 374 MovieClip Frame 27
gotoAndPlay ("Fall");
Symbol 374 MovieClip Frame 36
gotoAndPlay ("JumpInAir");
Symbol 374 MovieClip Frame 47
gotoAndPlay ("Fall");
Symbol 374 MovieClip Frame 52
gotoAndPlay ("OnWall");
Symbol 374 MovieClip Frame 70
gotoAndPlay ("Run");
Symbol 374 MovieClip Frame 106
gotoAndPlay ("Fall");
Symbol 374 MovieClip Frame 115
gotoAndPlay ("SpiderClimbSlide");
Symbol 374 MovieClip Frame 123
gotoAndPlay ("SpiderClimbSlide");
Symbol 374 MovieClip Frame 161
stop();
Disarming = false;
gotoAndPlay ("Idle");
Symbol 382 MovieClip Frame 50
this._visible = false;
Symbol 389 MovieClip Frame 3
this._visible = false;
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 24
var LoadSound = new Sound(this);
if (_parent._parent.Player.GameSpeed >= 1) {
LoadSound.attachSound("ShotgunLoad.aif");
} else {
LoadSound.attachSound("ShotgunLoadSLOW.aif");
}
var Xdist = (_parent._parent.CameraView._x - _parent._x);
var Ydist = (_parent._parent.CameraView._y - _parent._y);
var Distance = Math.sqrt((Xdist * Xdist) + (Ydist * Ydist));
var DesiredVolume = (100000 / Distance);
var DesiredPan = (-Xdist);
if (DesiredPan > 100) {
DesiredPan = 100;
} else if (DesiredPan < -100) {
DesiredPan = -100;
}
if (DesiredVolume > 100) {
DesiredVolume = 100;
}
LoadSound.setVolume(DesiredVolume);
LoadSound.setPan(DesiredPan);
LoadSound.start(0, 0);
Symbol 409 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 1
stop();
Symbol 436 MovieClip Frame 35
stop();
Symbol 442 Button
on (release) {
gotoAndStop (2);
}
Instance of Symbol 445 MovieClip "VolumeSliderKnob" in Symbol 448 MovieClip Frame 1
on (press) {
startDrag (this);
}
on (releaseOutside) {
stopDrag();
}
on (release) {
stopDrag();
}
onClipEvent (enterFrame) {
this._y = _parent.VolumeSliderBar._y;
if (this._x > (_parent.VolumeSliderBar._x + 50)) {
this._x = _parent.VolumeSliderBar._x + 50;
}
if (this._x < (_parent.VolumeSliderBar._x - 50)) {
this._x = _parent.VolumeSliderBar._x - 50;
}
}
Symbol 454 Button
on (release) {
fscommand ("fullscreen", "true");
}