STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
232959
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2639 · P5277

<div style="position:absolute;top:-99px;left:-99px;"><img src="https://tools.swfchan.com/stathit.asp?noj=FRM52226864-14DC&rnd=52226864" width="1" height="1"></div>

armorgames facility-z-15976.swf

This is the info page for
Flash #263835

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
frame 1 { function advertBlock(urls_allowed) { lock = true; domain_parts = _url.split('://'); real_domain = domain_parts[1].split('/'); domain.text = real_domain[0]; for (x in urls_allowed) { if (urls_allowed[x] == real_domain[0]) { lock = false; } } if (lock) { var v2 = '12274QE16764A4'; System.security.allowDomain('server.cpmstar.com'); adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + v2); } else { if (!lock) { loaderContainer._x = 62; } } } bytes_loaded = Math.round(this.getBytesLoaded()); bytes_total = Math.round(this.getBytesTotal()); getPercent = bytes_loaded / bytes_total; this.loaderContainer.loadAni.loadBar._width = getPercent * 100; this.loaderContainer.loadAni.loadText = Math.round(getPercent * 100) + '%'; if (bytes_loaded == bytes_total) { if (lock) { this.loaderContainer.loadAni._x = -300; this.loaderContainer.playLoaded_btn._x = 294; } else { removeMovieClip(adBox); gotoAndStop(4); } } loaderContainer.playLoaded_btn.onRelease = function () { removeMovieClip(adBox); gotoAndStop(4); }; urls_allowed = ['kongregate.com', 'games.armorgames.com', 'preview.armorgames.com', 'cache.armorgames.com', 'cdn.armorgames.com', 'gamemedia.armorgames.com', 'files.armorgames.com', 'developers.armorgames.com', 'armorgames.com', '*.armorgames.com']; advertBlock(urls_allowed); } button 32 { on (release) { getURL('http://armor.ag/moregames', _blank); } } button 37 { on (release) { getURL('http://www.nupixo.com/games', _blank); } } // unknown tag 88 length 51 movieClip 41 { } // unknown tag 88 length 51 movieClip 45 { } movieClip 46 { instance of movieClip 41 { onClipEvent (enterFrame) { var bytes = _root.getBytesTotal(); var bytes_loaded = _root.getBytesLoaded(); var getPercent = bytes_loaded / bytes; if (bytes_loaded == bytes) { _root.gotoAndPlay(2); this.loadtxt = 'Done'; } else { _root.gotoAndStop(1); this.loadtxt = Math.round(getPercent * 100) + '%'; } } } } movieClip 49 { } movieClip 51 { } movieClip 52 { } movieClip 906 __Packages.com.CollisionDetection { #initclip if (!_global.com) { _global.com = new Object(); } if (!_global.com.CollisionDetection) { var v1 = function () {}; com.CollisionDetection = v1; var v2 = v1.prototype; v1.checkForCollision = function (p_clip1, p_clip2, p_alphaTolerance) { if (p_alphaTolerance == undefined) { p_alphaTolerance = 255; } var v10 = com.CollisionDetection.getClipRect(p_clip1, _root); var v9 = com.CollisionDetection.getClipRect(p_clip2, _root); if (!v10.intersects(v9)) { return null; } var v4 = v10.intersection(v9); var v6 = new flash.display.BitmapData(Math.ceil(v4.width), Math.ceil(v4.height), false); var v3 = p_clip1.transform.matrix; var v2 = p_clip1._parent; while (v2 != _root) { v3.concat(v2.transform.matrix); v2 = v2._parent; } v3.tx -= v4.left; v3.ty -= v4.top; v6.draw(p_clip1, v3, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance)); v3 = p_clip2.transform.matrix; v2 = p_clip2._parent; while (v2 != _root) { v3.concat(v2.transform.matrix); v2 = v2._parent; } v3.tx -= v4.left; v3.ty -= v4.top; v6.draw(p_clip2, v3, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), 'difference'); var v5 = v6.getColorBoundsRect(4294967295.0, 4278255615.0); v6.dispose(); if (v5.width == 0) { return null; } v5.x += v4.left; v5.y += v4.top; return v5; }; v1.getClipRect = function (clip, reference) { if (reference == undefined) { reference = clip._parent; } var v1 = clip.getBounds(reference); return new flash.geom.Rectangle(v1.xMin, v1.yMin, v1.xMax - v1.xMin, v1.yMax - v1.yMin); }; ASSetPropFlags(com.CollisionDetection.prototype, null, 1); } #endinitclip } frame 2 { this.gotoAndPlay(1); } movieClip 55 { } // unknown tag 88 length 88 movieClip 58 { } movieClip 60 { } movieClip 62 arrow { } movieClip 65 arrow2 { } movieClip 71 { } movieClip 88 { } movieClip 89 escort1 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 94 fg_wall3 { } movieClip 97 fg_wall10 { } movieClip 98 fg_wall1 { } movieClip 99 fg_wall4 { } movieClip 100 fg_wall2 { } movieClip 103 fg_ground1 { } movieClip 107 fg_snow3 { } movieClip 111 fg_snow1 { } movieClip 115 fg_snow4 { } movieClip 119 fg_snow2 { } movieClip 139 bg_megatexture_level1 { } // unknown tag 88 length 17 movieClip 151 { frame 80 { stop(); } } movieClip 153 bg_megatexture_level2 { } movieClip 156 fg_wall6 { } movieClip 159 fg_wall7 { } movieClip 162 fg_ground5 { } movieClip 165 bg_megatexture_level3 { } movieClip 168 fg_wall5 { } movieClip 169 bg_megatexture_level4 { } movieClip 172 { } movieClip 175 { } movieClip 176 { } movieClip 179 fg_wall8 { } movieClip 182 bg_megatexture_level5 { } movieClip 183 bg_megatexture_level6 { } movieClip 186 { } movieClip 190 { } movieClip 195 { } movieClip 199 { } movieClip 201 { } movieClip 203 { } movieClip 207 { } movieClip 210 bg_megatexture_level7 { } movieClip 213 bg_megatexture_level8 { } movieClip 214 bg_megatexture_level9 { } movieClip 217 bg_megatexture_level10 { } movieClip 219 bg_megatexture_level11 { } movieClip 226 bg_megatexture_level12 { } movieClip 229 bg_mountains { } movieClip 231 block { frame 1 { stop(); } } movieClip 238 bloodSplatAni1 { frame 6 { stop(); } } movieClip 245 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 246 { } movieClip 249 { } movieClip 251 { } movieClip 252 { } movieClip 254 bullet { frame 1 { stop(); } frame 2 { stop(); } } movieClip 258 { frame 10 { stop(); } } movieClip 260 { frame 10 { stop(); } } movieClip 262 { frame 10 { stop(); } } movieClip 265 cast_ashley { } movieClip 268 cast_kyle { } movieClip 271 cast_sanger { } movieClip 274 chest { } movieClip 275 container { } movieClip 282 { } movieClip 297 { } movieClip 300 { } movieClip 302 { } movieClip 307 { } // unknown tag 88 length 93 movieClip 313 { } movieClip 314 { } movieClip 320 { } movieClip 324 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } frame 8 { stop(); } frame 9 { stop(); } frame 10 { stop(); } frame 11 { stop(); } frame 12 { stop(); } } movieClip 325 cutscene1 { frame 960 { pauseGame(); } } movieClip 366 cutscene2 { frame 1980 { pauseGame(); } } movieClip 369 damageOverlayAni { frame 1 { stop(); } frame 30 { stop(); } } movieClip 372 { } movieClip 374 { } movieClip 376 darken_full { } movieClip 378 { } movieClip 381 dataDownloadMeter { } movieClip 385 deadScreenBg { frame 1 { stop(); } frame 45 { stop(); } } movieClip 388 { } movieClip 391 { } movieClip 394 { } movieClip 397 { } movieClip 400 { } movieClip 403 { frame 11 { stop(); } } movieClip 404 { frame 200 { stop(); } } movieClip 408 { } movieClip 409 fg_computer { } movieClip 414 fg_databank1 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 417 fg_databank2 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 420 fg_databank3 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } } movieClip 423 fg_elevator_hole { } movieClip 430 fg_elevator_left { frame 10 { stop(); } frame 80 { stop(); } } movieClip 432 fg_elevator_right { frame 10 { stop(); } frame 80 { stop(); } } movieClip 435 fg_fence1 { } movieClip 437 fg_flashlight1 { } movieClip 439 fg_flashlight1b { } movieClip 441 fg_flashlight2 { } movieClip 443 fg_flashlight3 { } movieClip 445 fg_fume { } movieClip 446 { } movieClip 451 { } movieClip 454 fg_gate { frame 10 { stop(); } frame 80 { stop(); } } movieClip 462 fg_generator { frame 1 { stop(); } frame 2 { stop(); } } movieClip 465 fg_ground2 { } movieClip 468 fg_ground3 { } movieClip 469 fg_ground4 { } movieClip 475 { } movieClip 479 fg_side_wall_door { frame 10 { stop(); } frame 30 { stop(); } } movieClip 481 fg_side_wall_door_leftBtn { frame 10 { stop(); } frame 30 { stop(); } } movieClip 485 fg_side_wall_door_outside_leftCap { frame 10 { stop(); } frame 30 { stop(); } } movieClip 488 fg_side_wall_door_outside_rightCap { frame 10 { stop(); } frame 30 { stop(); } } movieClip 490 fg_side_wall_door_rightBtn { frame 10 { stop(); } frame 30 { stop(); } } movieClip 493 fg_side_wall_full { } movieClip 501 fg_side_wall_ice { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 504 fg_side_wall_left { } movieClip 505 fg_side_wall_open { } movieClip 508 fg_side_wall_outside_left { } movieClip 510 fg_side_wall_outside_right { } movieClip 512 fg_side_wall_right { } movieClip 514 { } movieClip 515 fg_tower1 { } movieClip 516 fg_tower2 { } movieClip 517 { } movieClip 518 gem1 { } movieClip 519 gem2 { } movieClip 521 { } movieClip 528 { } movieClip 530 { frame 1 { stop(); } frame 11 { stop(); } } movieClip 549 { } movieClip 558 { } movieClip 561 { } movieClip 562 guard1 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } } movieClip 569 { } movieClip 574 { } movieClip 577 { } movieClip 578 guard3 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 591 { } movieClip 592 { } movieClip 595 { frame 20 { stop(); } } movieClip 596 guard4 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 617 { } movieClip 618 { } movieClip 621 { } movieClip 622 guard5 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 624 { frame 60 { stop(); } } movieClip 625 guard6 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } } movieClip 635 { } movieClip 642 { } movieClip 645 { } movieClip 646 guard7 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 647 handgun { } movieClip 649 { frame 1 { stop(); } frame 20 { stop(); gotoAndStop(1); } } movieClip 658 { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } } movieClip 662 hudInventory { } // unknown tag 88 length 25 movieClip 665 hudObjectives { } movieClip 667 { frame 3 { stop(); } } movieClip 674 iceSplatAni1 { frame 6 { stop(); } } movieClip 676 { } // unknown tag 88 length 84 // unknown tag 88 length 84 movieClip 694 ingame_hud { } movieClip 695 ladder_mc1 { } movieClip 707 { } movieClip 711 { } // unknown tag 88 length 63 movieClip 722 { } movieClip 728 { } movieClip 733 { frame 1 { _root.stop(); gotoAndPlay(2); } frame 280 { stop(); _root.levelMenu.gotoAndStop(1); } } movieClip 740 levelMenu { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } } movieClip 747 savingGame { } movieClip 749 loadingScreenMenu { } movieClip 752 loot2 { } movieClip 753 loot3 { } movieClip 754 loot4 { } movieClip 757 loot5 { } movieClip 758 loot6 { } movieClip 759 loot7 { } movieClip 762 loot1 { } movieClip 763 machinegun { } movieClip 765 { frame 300 { stop(); } } movieClip 767 { frame 1 { stop(); } frame 15 { stop(); } } movieClip 768 melee { } movieClip 770 meleeHitPoint { } movieClip 771 { } movieClip 772 { } movieClip 773 { } movieClip 774 miniMap { } movieClip 776 { } movieClip 778 { frame 1 { stop(); } } movieClip 781 pauseScreen { } movieClip 783 platf_btn2 { } movieClip 785 { } movieClip 786 platf_ctrl2 { frame 10 { stop(); } frame 80 { stop(); } } movieClip 788 platf_flex1 { } movieClip 790 platf_wall1 { } movieClip 791 platf_wall2 { } movieClip 793 platf1 { } movieClip 797 { frame 1 { stop(); } } movieClip 811 { } movieClip 822 { frame 30 { stop(); } } movieClip 823 { } movieClip 824 player { frame 1 { stop(); } frame 2 { stop(); } frame 3 { stop(); } frame 4 { stop(); } frame 5 { stop(); } frame 6 { stop(); } frame 7 { stop(); } } movieClip 825 shotgun { } movieClip 827 { } movieClip 828 { } movieClip 829 { } movieClip 830 { } movieClip 831 { } movieClip 832 { } movieClip 833 special_firsthandgun { } movieClip 838 { } movieClip 839 storyPopup { frame 15 { stop(); } frame 30 { stop(); } } movieClip 841 storyWall { } movieClip 844 supplyLocker { } movieClip 875 supplyLockerMenu { } movieClip 876 { } movieClip 877 { } movieClip 880 { } movieClip 883 { } movieClip 884 the_game { frame 1 { function moveCameraY(target, targetFloor, ani) { if (ani == true) { if (_level0.the_container._y != target) { if (targetFloor == 'floorOne' && elevatorGoingUp == true) { _level0.the_container._y += 4; } if (targetFloor == 'floorOne' && elevatorGoingUp == false) { _level0.the_container._y -= 4; } if (targetFloor == 'floorOne' && elevatorGoingUp == null) { _level0.the_container._y = f1_y; } if (targetFloor == 'ground') { _level0.the_container._y -= 4; } if (targetFloor == 'ground' && elevatorGoingUp == null) { _level0.the_container._y = f0_y; } if (targetFloor == 'floorTwo') { _level0.the_container._y += 4; } } else { elevatorGoingUp = null; } } } function changeSoundVolume(clip, track, targetVolume, forceStart, nextTrack) { var volumeIncrement = 1; var i = track.getVolume(); if (forceStart) { i = 0; track.setVolume(i); track.start(0, 99); } else { if (i > targetVolume) { volumeIncrement *= -1; } } clip.onEnterFrame = function () { if (i == targetVolume) { delete clip.onEnterFrame; if (nextTrack) { changeSoundVolume(clip, nextTrack, 100, true); } } else { if (i > 100) { track.setVolume(100); delete clip.onEnterFrame; if (nextTrack) { changeSoundVolume(clip, nextTrack, 100, true); } } else { if (i < 0) { trackName.setVolume(0); delete clip.onEnterFrame; if (nextTrack) { changeSoundVolume(clip, nextTrack, 100, true); } } else { i += volumeIncrement; track.setVolume(i); } } } }; } function getWeapon(method) { _root.weapon_mc.removeMovieClip(); if (method == 'cycle') { if (weaponSelected == 4) { weaponSelected = 1; _root.attachMovie('handgun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(1); _level0.menuscreen.ingame_hud.display_bullets._x = 70; } else { if (weaponSelected == 3) { weaponSelected = 4; _root.attachMovie('melee', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(4); _level0.menuscreen.ingame_hud.display_bullets._x = -170; } else { if (weaponSelected == 2) { if (ownMachinegun) { weaponSelected = 3; _root.attachMovie('machinegun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(3); _level0.menuscreen.ingame_hud.display_bullets._x = 110; } if (!ownMachinegun) { weaponSelected = 4; _root.attachMovie('melee', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(4); _level0.menuscreen.ingame_hud.display_bullets._x = -170; } } else { if (weaponSelected == 1) { if (ownShotgun) { weaponSelected = 2; _root.attachMovie('shotgun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(2); _level0.menuscreen.ingame_hud.display_bullets._x = 85; } if (!ownShotgun && ownMachinegun) { weaponSelected = 3; _root.attachMovie('machinegun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(3); _level0.menuscreen.ingame_hud.display_bullets._x = 110; } if (!ownShotgun && !ownMachinegun) { weaponSelected = 4; _root.attachMovie('melee', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(4); _level0.menuscreen.ingame_hud.display_bullets._x = -170; } } } } } defaultArmAngle(); _root.weapon_mc.bulletOrigin.gotoAndPlay(10); } if (method == 'direct') { if (weaponSelected == 4) { _root.attachMovie('melee', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(4); _level0.menuscreen.ingame_hud.display_bullets._x = -170; } else { if (weaponSelected == 3) { _root.attachMovie('machinegun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(3); _level0.menuscreen.ingame_hud.display_bullets._x = 110; } else { if (weaponSelected == 2) { _root.attachMovie('shotgun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(2); _level0.menuscreen.ingame_hud.display_bullets._x = 85; } else { if (weaponSelected == 1) { _root.attachMovie('handgun', 'weapon_mc', 800); _level0.menuscreen.ingame_hud.hud_guns.gotoAndStop(1); _level0.menuscreen.ingame_hud.display_bullets._x = 70; } } } } defaultArmAngle(); _root.weapon_mc.bulletOrigin.gotoAndPlay(10); } } function defaultArmAngle(skipDirection) { switchDirection(); if (playerDirection == 'facingF') { _root.weapon_mc._rotation = 90; } else { if (playerDirection == 'facingB') { _root.weapon_mc._rotation = 270; } } } function setClipReloading() { if (clipReloading != true) { _root.weapon_mc.clipReloadLoaderAni.removeMovieClip(); _root.weapon_mc.attachMovie('clipReloadLoaderAni', 'clipReloadLoaderAni', _root.weapon_mc.getNextHighestDepth(), {'_x': 0, '_y': -36, '_width': 50, '_height': 60}); _root.weapon_mc.clipReloadLoaderAni.gotoAndPlay(1); clipReloading = true; clipReloadDelay = 40; } } function calculateBulletsManual() { if (weaponSelected == 1 && currClipHandgun >= 0 && currClipHandgun < maxClipHandgun && remClipHandgun > 0) { setClipReloading(); handgunClipTransfer = maxClipHandgun - currClipHandgun; if (handgunClipTransfer <= remClipHandgun) { currClipHandgun += handgunClipTransfer; remClipHandgun -= handgunClipTransfer; } else { if (handgunClipTransfer > remClipHandgun) { currClipHandgun += remClipHandgun; remClipHandgun = 0; } } } if (weaponSelected == 2 && currClipShotgun >= 0 && currClipShotgun < maxClipShotgun && remClipShotgun > 0) { setClipReloading(); shotgunClipTransfer = maxClipShotgun - currClipShotgun; if (shotgunClipTransfer <= remClipShotgun) { currClipShotgun += shotgunClipTransfer; remClipShotgun -= shotgunClipTransfer; } else { if (shotgunClipTransfer > remClipShotgun) { currClipShotgun += remClipShotgun; remClipShotgun = 0; } } } if (weaponSelected == 3 && currClipMachinegun >= 0 && currClipMachinegun < maxClipMachinegun && remClipMachinegun > 0) { setClipReloading(); machinegunClipTransfer = maxClipMachinegun - currClipMachinegun; if (machinegunClipTransfer <= remClipMachinegun) { currClipMachinegun += machinegunClipTransfer; remClipMachinegun -= machinegunClipTransfer; } else { if (machinegunClipTransfer > remClipMachinegun) { currClipMachinegun += remClipMachinegun; remClipMachinegun = 0; } } } } function calculateBulletsAuto() { if (weaponSelected == 1 && currClipHandgun == 0 && remClipHandgun > 0) { setClipReloading(); if (remClipHandgun >= maxClipHandgun) { handgunClipTransfer = maxClipHandgun; remClipHandgun -= handgunClipTransfer; } else { if (remClipHandgun < maxClipHandgun) { handgunClipTransfer = remClipHandgun; remClipHandgun = 0; } } currClipHandgun = handgunClipTransfer; } if (weaponSelected == 2 && currClipShotgun == 0 && remClipShotgun > 0) { setClipReloading(); if (remClipShotgun >= maxClipShotgun) { shotgunClipTransfer = maxClipShotgun; remClipShotgun -= shotgunClipTransfer; } else { if (remClipShotgun < maxClipShotgun) { shotgunClipTransfer = remClipShotgun; remClipShotgun = 0; } } currClipShotgun = shotgunClipTransfer; } if (weaponSelected == 3 && currClipMachinegun == 0 && remClipMachinegun > 0) { setClipReloading(); if (remClipMachinegun >= maxClipMachinegun) { machinegunClipTransfer = maxClipMachinegun; remClipMachinegun -= machinegunClipTransfer; } else { if (remClipMachinegun < maxClipMachinegun) { machinegunClipTransfer = remClipMachinegun; remClipMachinegun = 0; } } currClipMachinegun = machinegunClipTransfer; } } function displayBullets() { if (weaponSelected == 4) { currClip = '-'; currRem = '-'; } else { if (weaponSelected == 3) { currClip = currClipMachinegun; currRem = remClipMachinegun; } else { if (weaponSelected == 2) { currClip = currClipShotgun; currRem = remClipShotgun; } else { if (weaponSelected == 1) { currClip = currClipHandgun; currRem = remClipHandgun; } } } } _level0.menuscreen.ingame_hud.display_bullets.text = currClip + '/' + currRem; } function loadSave() { if (gamedata_so.data.currentLevel != undefined) { currentLevel = gamedata_so.data.currentLevel; player_credits = gamedata_so.data.player_credits; player_health_max = gamedata_so.data.player_health_max; player_health = gamedata_so.data.player_health; ownHandgun = gamedata_so.data.ownHandgun; ownShotgun = gamedata_so.data.ownShotgun; ownMachinegun = gamedata_so.data.ownMachinegun; currClipHandgun = gamedata_so.data.currClipHandgun; currClipShotgun = gamedata_so.data.currClipShotgun; currClipMachinegun = gamedata_so.data.currClipMachinegun; remClipHandgun = gamedata_so.data.remClipHandgun; remClipShotgun = gamedata_so.data.remClipShotgun; remClipMachinegun = gamedata_so.data.remClipMachinegun; weaponSelected = gamedata_so.data.weaponSelected; userValuesSet = true; } } function loadLevelMenu(method) { _level0.the_container._y = 0; if (method == 'esc') { currentLevel = gamedata_so.data.currentLevel; } _root.levelMenu.removeMovieClip(); _root.attachMovie('levelMenu', 'levelMenu', _root.getNextHighestDepth(), {'_x': 0, '_y': 0}); if (method != 'esc') { levelMenu.gotoAndStop(4); } else { if (method == 'esc') { levelMenu.gotoAndStop(1); } } if (method == 'end') { levelMenu.gotoAndStop(6); } _root.levelMenu.onEnterFrame = function () { levelMenu.btn_armor_intro.onRelease = function () { getURL('http://armor.ag/MoreGames', _blank); }; levelMenu.gameVer.text = '1.2'; if (levelMenu._currentframe == 1) { playMenuMusic(); if (currentLevel == undefined) { levelMenu.continue_btn._alpha = 20; levelMenu.continue_btn.enabled = false; } else { levelMenu.continue_btn._alpha = 100; levelMenu.continue_btn.enabled = true; } levelMenu.newgame_btn.onRelease = function () { gamedata_so.clear(); userValuesSet = false; playIntro(); }; levelMenu.continue_btn.onRelease = function () { loadLevelGlobal(); continueFromMenu(); }; levelMenu.credits_btn.onRelease = function () { levelMenu.gotoAndStop(5); }; levelMenu.moregames_btn.onRelease = function () { getURL('http://armor.ag/MoreGames', _blank); }; levelMenu.btn_maxgames_menus.onRelease = function () { getURL('http://armor.ag/MoreGames', _blank); }; levelMenu.armor_fb_btn.onRelease = function () { getURL('http://www.facebook.com/ArmorGames', _blank); }; levelMenu.btn_nupixo_menu.onRelease = function () { getURL('http://www.nupixo.com/games', _blank); }; levelMenu.btn_nupixo_twitter.onRelease = function () { getURL('http://www.twitter.com/nupixo', _blank); }; } if (levelMenu._currentframe == 5 || levelMenu._currentframe == 6) { levelMenu.btn_mainmenu.onRelease = function () { levelMenu.gotoAndStop(1); }; levelMenu.btn_maxgames_menus.onRelease = function () { getURL('http://armor.ag/MoreGames', _blank); }; levelMenu.btn_nupixo_menu.onRelease = function () { getURL('http://www.nupixo.com/games', _blank); }; } }; } function setupPlayer(aa, bb) { levelPosition = aa; movePlayerTo(bb); } function loadLevel(levelNumber, charX, charY) { currentLevel = levelNumber; _root.levelMenu.removeMovieClip(); switch (levelNumber) { case 1: loadLevel1(); break; case 2: loadLevel2(); break; case 3: loadLevel3(); break; case 4: loadLevel4(); break; case 5: loadLevel5(); break; case 6: loadLevel6(); break; case 7: loadLevel7(); break; case 8: loadLevel8(); break; case 9: loadLevel9(); break; case 10: loadLevel10(); break; case 11: loadLevel11(); break; case 12: loadLevel12(); } if (levelNumber == 1 && gateNumber == null) { setupPlayer(30, ground - 79); } else { setupPlayer(charX, charY); } var v2; if (currentLevel == 12) { v2 = 'track12'; } else { v2 = 'track6'; } levelTrack = new Sound(soundTracks); levelTrack.attachSound(v2); changeSoundVolume(soundTracks, levelTrack, levelTrackStartVolume, true); } function userValues() { if (userValuesSet == false) { player_credits = 100; player_health_max = 50; player_health = player_health_max; ownHandgun = true; ownShotgun = false; ownMachinegun = false; currClipHandgun = 0; currClipShotgun = 0; currClipMachinegun = 0; remClipHandgun = 0; remClipShotgun = 0; remClipMachinegun = 0; weaponSelected = 1; userValuesSet = true; } } function loadLevelGlobal() { ground = 780; floorOne = 520; floorTwo = 260; floorThree = 0; levelEndX = 5120; notificationCount = 0; mainTimer = 0; smallOffSet = 2; _level0.menuscreen.ingame_hud.removeMovieClip(); _level0.menuscreen.attachMovie('ingame_hud', 'ingame_hud', this.getNextHighestDepth(), {'_x': 0, '_y': 0}); _level0.menuscreen._xscale = 62.5; _level0.menuscreen._yscale = 62.5; userValues(); set_price_healthbar = 500; set_price_handgun = 350; set_price_shotgun = 700; set_price_machinegun = 1100; set_price_medkit = 30; set_price_ammo = 30; set_qty_medkit = 30; set_qty_handgun_ammo = 12; set_qty_shotgun_ammo = 4; set_qty_machinegun_ammo = 6; easing = 5; xspeed = 0; yspeed = 0; max_yspeed = 20; scroll_speed = 8; retreat_multiplier = 1; bg1_multiplier = 0.05; bg2_multiplier = 0.1; bg3_multiplier = 0.5; jumping = false; walking = false; falling = false; weaponFiredOnGround = false; weaponFiredOnFloorOne = false; weaponFiredOnFloorTwo = false; can_jump = true; safe_level_speed = 0.5; patrolTowardRight = true; patrolTowardLeft = false; dead = false; finished = false; menuMusicPlaying = false; tellingStory = false; buyingStuff = false; readingLog = false; viewingCutscene = false; gravity = 2; jump_power = 15; walking_while_jumping = false; climb_speed = 4; climbing = false; _root.attachMovie('player', 'player', _root.getNextHighestDepth()); player._xscale = 100; playerDirection = 'facingF'; getWeapon('direct'); _level0.menuscreen.ingame_hud.attachMovie('damageOverlayAni', 'damageOverlayAni', _root.getNextHighestDepth(), {'_x': 0, '_y': 0}); onEnterFrame = function () { if (currentLevel == 12) { _level0.menuscreen.ingame_hud.hudDatadisk.text = '-/-'; } else { _level0.menuscreen.ingame_hud.hudDatadisk.text = datadisks + '/' + databanksTotal; } _level0.menuscreen.ingame_hud.log.text = 'level' + currentLevel; _level0.menuscreen.ingame_hud.log2.text = player._currentframe; _level0.menuscreen.ingame_hud.display_credits.text = player_credits; _level0.menuscreen.ingame_hud.state.text = _level0.menuscreen.ingame_hud.damageOverlayAni._alpha; sp1.fg_flashlight._x = player._x; sp1.fg_flashlight._y = player._y; weapon_mc._x = player._x; weapon_mc._y = player._y - 42; if (clipReloading) { if (clipReloadDelay > 0) { --clipReloadDelay; } if (clipReloadDelay == 0) { clipReloading = false; } } displayBullets(); signGatePrev = currentLevel - 1; if (currentLevel < 11) { _root.fg2.bg_megatexture.gateToPrev.sign.text = '0' + signGatePrev; } else { if (currentLevel >= 11) { _root.fg2.bg_megatexture.gateToPrev.sign.text = signGatePrev; } } if (_level0.menuscreen.ingame_hud.damageOverlayAni._alpha > 0) { _level0.menuscreen.ingame_hud.damageOverlayAni._alpha -= 1; damagingPlayer = true; } if (_level0.menuscreen.ingame_hud.damageOverlayAni._alpha <= 0) { damagingPlayer = false; } if (player_health > player_health_max) { player_health = player_health_max; } if (player_health < 0) { player_health = 0; } _level0.menuscreen.ingame_hud.healthMaxMeter._width = player_health_max; _level0.menuscreen.ingame_hud.stealthFill._width = player_health; if (mainTimer >= 0 && !dead && !finished && levelRendered && !isPaused) { ++mainTimer; clock = Math.round(mainTimer / 30); } _level0.menuscreen.ingame_hud.btn_maxgames_ingame.onRelease = function () { getURL('http://armor.ag/MoreGames/', _blank); }; if (player_health <= 0 && !dead && !deadScreenBg._visible) { danger.text = 'DEAD!'; dead = true; deadScreen(); } elevatorMoving = false; var v2 = 1; while (v2 <= 10) { if (elevator_under_my_feet(v2) && is_elevator_moving(v2)) { if (!dead && player._currentframe != 1) { player.gotoAndPlay(1); } elevatorMoving = true; if (elevatorMoving == true) { if (_root.fg3['fg_elevator' + v2]._currentframe >= 10 && _root.fg3['fg_elevator' + v2]._currentframe <= 80) { elevatorGoingUp = true; } else { if (_root.fg3['fg_elevator' + v2]._currentframe > 80) { elevatorGoingUp = false; } } } break; } ++v2; } }; player.onEnterFrame = function () { if (!finished && levelRendered && !isPaused) { dashing = false; if (_root._xmouse >= this._x) { playerDirection = 'facingF'; } else { if (_root._xmouse < this._x) { playerDirection = 'facingB'; } } if ((Key.isDown(37) || Key.isDown(65)) && this._xscale == 100 || (Key.isDown(39) || Key.isDown(68)) && this._xscale == -100) { retreat_multiplier = 0.75; } else { retreat_multiplier = 1; } if ((Key.isDown(37) || Key.isDown(65)) && (!Key.isDown(39) || !Key.isDown(68)) && !Key.isDown(69) && !predict_wall_left_side() && !dead && !elevatorMoving && !predict_guard_left_side()) { if (_root.lev.objects.escort1.found == false && _root.lev.objects.escort1.awake == false || _root.lev.objects.escort1.found == true && _root.lev.objects.escort1.awake == true || !_root.lev.objects.escort1) { walking = true; levelPosition -= retreat_multiplier; movePlayerTo(); } else { openStoryPopup('ashleyWarning'); } } if ((Key.isDown(39) || Key.isDown(68)) && !Key.isDown(69) && !predict_wall_right_side() && !dead && !elevatorMoving && !predict_guard_right_side()) { if (_root.lev.objects.escort1.found == false && _root.lev.objects.escort1.awake == false || _root.lev.objects.escort1.found == true && _root.lev.objects.escort1.awake == true || !_root.lev.objects.escort1) { walking = true; levelPosition += retreat_multiplier; movePlayerTo(); } else { openStoryPopup('ashleyWarning'); } } if (!Key.isDown(39) && !Key.isDown(68) && !Key.isDown(37) && !Key.isDown(65)) { walking = false; } var v3 = 1; while (v3 <= 10) { if (Key.isDown(69)) { if (elevator_under_my_feet(v3) || elevBtn_under_my_feet(v3)) { if (_root.lev.platforms['ctrl' + v3]._currentframe == 10) { _root.lev.platforms['ctrl' + v3].gotoAndPlay(11); _root.fg3['fg_elevator' + v3].gotoAndPlay(11); } if (_root.lev.platforms['ctrl' + v3]._currentframe == 80) { _root.lev.platforms['ctrl' + v3].gotoAndPlay(81); _root.fg3['fg_elevator' + v3].gotoAndPlay(81); } } if (doorBtn_under_my_feet(v3)) { if (_root.fg3['fg_door' + v3]._currentframe == 10) { _root.fg3['fg_door' + v3].gotoAndPlay(11); _root.lev.walls['door' + v3]._width = 0; } if (_root.fg3['fg_door' + v3]._currentframe == 30) { _root.fg3['fg_door' + v3].gotoAndPlay(31); _root.lev.walls['door' + v3]._width = 30; } } if (computerCtrl_under_my_feet(v3)) { if (!readingLog) { openWorkStationMenu(v3); } } if (supplyCtrl_under_my_feet(v3)) { if (!buyingStuff) { openSupplyLockerMenu(); } } if (gateBtn_under_my_feet(v3) && !Key.isDown(39) && !Key.isDown(68) && !Key.isDown(37) && !Key.isDown(65)) { if (_root.lev.objects['gate' + v3]._currentframe == 80) { if (datadisks == databanksTotal) { if (currentLevel != 12) { levelCompleted(); } else { if (currentLevel == 12) { levelCompleted('end'); } } } else { if (datadisks < databanksTotal) { openStoryPopup('gateWarning'); } } } } if (generatorBtn_under_my_feet(v3)) { if (_root.lev.objects['gate' + v3]._currentframe == 10) { _root.lev.objects['gate' + v3].gotoAndPlay(11); } if (_root.lev.objects['generator' + v3]._currentframe == 1) { _root.lev.objects['generator' + v3].gotoAndPlay(2); } } if (databankCtrl_under_my_feet(v3)) { if (_root.fg3['databank' + v3].currState == 'off') { _root.fg3['databank' + v3].currState = 'on'; if (_root.fg3['databank' + v3]._currentframe == 1) { _root.fg3['databank' + v3].attachMovie('dataDownloadMeter', 'dataDownloadMeter', _root.fg3['databank' + v3].getNextHighestDepth(), {'_x': -45, '_y': -220}); _root.fg3['databank' + v3].dataDownloadMeter.dataDownloadFill._width = 0; _root.fg3['databank' + v3].gotoAndStop(2); audioDatadisk = new Sound(soundEffects); audioDatadisk.attachSound('datadiskDownload'); audioDatadisk.start(); } } if (_root.fg3['databank' + v3].currState == 'on') { if (_root.fg3['databank' + v3]._currentframe == 2) { _root.fg3['databank' + v3].dataDownloadMeter.dataDownloadFill._width += 1; if (_root.fg3['databank' + v3].dataDownloadMeter.dataDownloadFill._width == 90) { _root.fg3['databank' + v3].dataDownloadMeter.removeMovieClip(); _root.fg3['databank' + v3].gotoAndStop(3); _root.fg3['databank' + v3].currState = 'ready'; } } } if (_root.fg3['databank' + v3].currState == 'ready') { if (_root.fg3['databank' + v3]._currentframe == 3) { datadisks += 1; openHudInventory('+1 datadisk'); audioDatadisk = new Sound(soundEffects); audioDatadisk.attachSound('datadiskSound'); audioDatadisk.start(); _root.fg3['databank' + v3].currState = 'complete'; _level0.menuscreen.ingame_hud.glow_datadisks.gotoAndPlay(2); } } } } if (!Key.isDown(69)) { if (_root.fg3['databank' + v3]._currentframe == 2) { _root.fg3['databank' + v3].gotoAndStop(1); _root.fg3['databank' + v3].dataDownloadMeter.removeMovieClip(); _root.fg3['databank' + v3].currState = 'off'; } } ++v3; } if (yspeed > 0 && !platform_under_my_feet()) { if (!dead && this._currentframe != 3) { this.gotoAndPlay(3); } } if (yspeed < 0 && jumping) { if (!dead && this._currentframe != 4) { this.gotoAndPlay(4); } } if (yspeed == 0 && platform_under_my_feet() && !walking) { if (!dead && this._currentframe != 1) { this.gotoAndPlay(1); } } if (predict_wall_right_side() && playerDirection == 'facingF' && platform_under_my_feet() || predict_wall_left_side() && playerDirection == 'facingB' && platform_under_my_feet()) { if (!dead && this._currentframe != 1) { this.gotoAndPlay(1); } touchingAndFacingWall = true; } else { touchingAndFacingWall = false; } if (!climbing) { yspeed += gravity; } if (yspeed > max_yspeed) { yspeed = max_yspeed; } forecast_x = this._x + xspeed; forecast_y = this._y + yspeed; while (_root.lev.platforms.hitTest(forecast_x, forecast_y + this._height / 2 - 1, true)) { --forecast_y; if (yspeed > 0) { if (!dead && !jumping && !walking && this._currentframe != 1 && !Key.isDown(69)) { this.gotoAndPlay(1); } xspeed = 0; yspeed = 0; jumping = false; } } this._x = forecast_x; this._y = forecast_y; } var v4 = 1; while (v4 <= 12) { if (_root.lev.objects['tutorialWall' + v4].hitTest(forecast_x - this._width / 2 + 1, forecast_y, true)) { openTutorialPopup(v4); } ++v4; } if (_root.lev.objects.special_firsthandgun.hitTest(forecast_x - this._width / 2 + 16, forecast_y, true)) { audioItemPickup = new Sound(soundEffects); audioItemPickup.attachSound('item_pickup'); audioItemPickup.start(); remClipHandgun += 32; openHudInventory('+32 hand gun bullets'); _root.lev.objects.special_firsthandgun.removeMovieClip(); } }; } function resetGame() { menuTrack.stop(); levelTrack.stop(); levelCompleteTrack.stop(); danger.text = 'reset'; deadFall = false; deadSpiked = false; dead = false; isPaused = false; damagingPlayer = false; deadScreenCounter = 0; loadingScreenCounter = 0; mainTimer = 0; datadisks = 0; reqDatadisks = 0; dashMeter = 500; dashMeterMax = 500; clipReloading = false; climbing = false; jumping = false; walking = false; falling = false; weaponFiredOnGround = false; weaponFiredOnFloorOne = false; weaponFiredOnFloorTwo = false; can_jump = true; finished = false; levelRendered = false; menuMusicPlaying = false; _root.deadScreenBg.removeMovieClip(); _root.bg1.removeMovieClip(); _root.bg2.removeMovieClip(); _root.bg3.removeMovieClip(); _root.fg2.removeMovieClip(); _root.fg3.removeMovieClip(); _root.fg4.removeMovieClip(); _root.fg1.removeMovieClip(); _root.lev.removeMovieClip(); _root.sp1.removeMovieClip(); _root.player.removeMovieClip(); _root.weapon_mc.removeMovieClip(); _level0.menuscreen.ingame_hud.removeMovieClip(); _level0.hud_notify.tutorialPopup.removeMovieClip(); _level0.hud_notify._height = 0; } function movePlayerTo(specifyY) { var v2 = 0; var v3 = levelEndX / 8; var v1 = 80; player._y = specifyY; var v5 = v2 + v1; var v4 = v3 - v1; if (retreat_multiplier == 0.75) { if (!dead && player._currentframe != 7 && !jumping) { player.gotoAndPlay(7); } } else { if (retreat_multiplier >= 1) { if (!dead && player._currentframe != 2 && !jumping) { player.gotoAndPlay(2); } } } if (levelPosition < v5) { playerPosition = scroll_speed * levelPosition; backgroundPosition = -v2 * scroll_speed; } else { if (levelPosition > v4) { playerPosition = (levelPosition - v4 + v1) * scroll_speed; backgroundPosition = (160 - v3) * scroll_speed; } else { playerPosition = scroll_speed * v1; backgroundPosition = (v1 - levelPosition) * scroll_speed; } } player._x = playerPosition; lev._x = backgroundPosition; bg1._x = backgroundPosition; bg2._x = backgroundPosition; bg3._x = backgroundPosition; fg1._x = backgroundPosition; fg2._x = backgroundPosition; fg3._x = backgroundPosition; fg4._x = backgroundPosition; } function computerCtrl_under_my_feet(whichOne) { return _root.lev.platforms['computerCtrl' + whichOne].hitTest(player._x, player._y + player._height / 2 + 6, true); } function supplyCtrl_under_my_feet(whichOne) { return _root.lev.platforms['supplyCtrl' + whichOne].hitTest(player._x, player._y + player._height / 2 + 6, true); } function databankCtrl_under_my_feet(whichOne) { return _root.lev.platforms['databankCtrl' + whichOne].hitTest(player._x, player._y + player._height / 2 + 6, true); } function generatorBtn_under_my_feet(whichGen) { return _root.lev.platforms['genCtrl' + whichGen].hitTest(player._x, player._y + player._height / 2 + 6, true); } function gateBtn_under_my_feet(whichGate) { return _root.lev.platforms['gateCtrl' + whichGate].hitTest(player._x, player._y + player._height / 2 + 6, true); } function is_elevator_moving(whichElev) { if (_root.lev.platforms['ctrl' + whichElev]._currentframe >= 0 && _root.lev.platforms['ctrl' + whichElev]._currentframe <= 10) { return false; } if (_root.lev.platforms['ctrl' + whichElev]._currentframe > 10 && _root.lev.platforms['ctrl' + whichElev]._currentframe < 70) { return true; } if (_root.lev.platforms['ctrl' + whichElev]._currentframe >= 70 && _root.lev.platforms['ctrl' + whichElev]._currentframe <= 80) { return false; } if (_root.lev.platforms['ctrl' + whichElev]._currentframe > 80 && _root.lev.platforms['ctrl' + whichElev]._currentframe <= 140) { return true; } return false; } function elevBtn_under_my_feet(whichElev) { return _root.lev.platforms['elevBtn' + whichElev].hitTest(player._x, player._y + player._height / 2 + 6, true); } function doorBtn_under_my_feet(whichDoor) { if (_root.lev.platforms['doorBtnL' + whichDoor].hitTest(player._x, player._y + player._height / 2 + 6, true)) { return true; } if (_root.lev.platforms['doorBtnR' + whichDoor].hitTest(player._x, player._y + player._height / 2 + 6, true)) { return true; } return false; } function elevator_under_my_feet(whichElev) { return _root.lev.platforms['ctrl' + whichElev].hitTest(player._x, player._y + player._height / 2 + 6, true); } function platform_under_my_feet() { return _root.lev.platforms.hitTest(player._x, player._y + player._height / 2 + 6, true); } function predict_wall_right_side() { if (_root.lev.walls.hitTest(forecast_x + player._width / 2 + 8, forecast_y, true) || _root.lev.icewalls.hitTest(forecast_x + player._width / 2 + 8, forecast_y, true)) { return true; } } function predict_wall_left_side() { if (_root.lev.walls.hitTest(forecast_x - player._width / 2 - 8, forecast_y, true) || _root.lev.icewalls.hitTest(forecast_x - player._width / 2 - 8, forecast_y, true)) { return true; } } function guard_predict_wall_right(who) { placeX = who._x - lev._x * -1; placeY = who.forecast_y - who._height / 2; if (_root.lev.walls.hitTest(placeX + 40, placeY, true) || _root.lev.icewalls.hitTest(placeX + 40, placeY, true)) { return true; } } function guard_predict_wall_left(who) { placeX = who._x - lev._x * -1; placeY = who.forecast_y - who._height / 2; if (_root.lev.walls.hitTest(placeX - 40, placeY, true) || _root.lev.icewalls.hitTest(placeX - 40, placeY, true)) { return true; } } function predict_this_guard_touching(whichG) { if (!whichG.isDead && (whichG.hitTest(forecast_x + player._width / 2 + 8, forecast_y, true) || whichG.hitTest(forecast_x - player._width / 2 - 8, forecast_y, true))) { return true; } } function predict_guard_right_side() { var v2 = 1; while (v2 <= 30) { if (!_root.lev.objects['guard' + v2].canFly && !_root.lev.objects['guard' + v2].isDead && _root.lev.objects['guard' + v2].hitTest(forecast_x + player._width / 2 + 8, forecast_y, true) && !dashing) { return true; } ++v2; } } function predict_guard_left_side() { var v2 = 1; while (v2 <= 30) { if (!_root.lev.objects['guard' + v2].canFly && !_root.lev.objects['guard' + v2].isDead && _root.lev.objects['guard' + v2].hitTest(forecast_x - player._width / 2 - 8, forecast_y, true) && !dashing) { return true; } ++v2; } } function getCurrentFloor(characterY) { if (characterY >= 0 && characterY <= 260 + smallOffSet) { return 'floorTwo'; } if (characterY >= 261 + smallOffSet && characterY <= 520 + smallOffSet) { return 'floorOne'; } if (characterY >= 521 + smallOffSet && characterY <= 780 + smallOffSet) { return 'ground'; } } function isWithinHearingDist() { var v2 = 1; while (v2 <= 30) { myPlayerPos = player._x - lev._x; myEnemyPos = _root.lev.objects['guard' + v2]._x; if (myPlayerPos < myEnemyPos) { xDiff = (myPlayerPos - myEnemyPos) * -1; } else { if (myPlayerPos > myEnemyPos) { xDiff = myPlayerPos - myEnemyPos; } } if (xDiff < 800 && getCurrentFloor(player._y) == getCurrentFloor(_root.lev.objects['guard' + v2]._y)) { _root.lev.objects['guard' + v2].heardShot = true; } ++v2; } } function getPlayerPosition(method, theLev) { if (theLev == 1) { currPlayerPositionY = ground - 79; } if (theLev == 2) { currPlayerPositionY = floorTwo - 79; } if (theLev == 3) { currPlayerPositionY = ground - 79; } if (theLev == 4) { currPlayerPositionY = ground - 79; } if (theLev == 5) { currPlayerPositionY = floorTwo - 79; } if (theLev == 6) { currPlayerPositionY = floorTwo - 79; } if (theLev == 7) { currPlayerPositionY = ground - 79; } if (theLev == 8) { currPlayerPositionY = ground - 79; } if (theLev == 9) { currPlayerPositionY = ground - 79; } if (theLev == 10) { currPlayerPositionY = ground - 79; } if (theLev == 11) { currPlayerPositionY = ground - 79; } if (theLev == 12) { currPlayerPositionY = ground - 79; } if (method == 'cycle') { if (theLev == 1) { loadLevel(1, 30, currPlayerPositionY); } if (theLev == 2) { loadLevel(2, 340, currPlayerPositionY); } if (theLev == 3) { loadLevel(3, 20, currPlayerPositionY); } if (theLev == 4) { loadLevel(4, 20, currPlayerPositionY); } if (theLev == 5) { loadLevel(5, 620, currPlayerPositionY); } if (theLev == 6) { loadLevel(6, 20, currPlayerPositionY); } if (theLev == 7) { loadLevel(7, 20, currPlayerPositionY); } if (theLev == 8) { loadLevel(8, 20, currPlayerPositionY); } if (theLev == 9) { loadLevel(9, 20, currPlayerPositionY); } if (theLev == 10) { loadLevel(10, 620, currPlayerPositionY); createLevelEscorts(560, floorTwo); } if (theLev == 11) { loadLevel(11, 580, currPlayerPositionY); createLevelEscorts(4640, ground); } if (theLev == 12) { loadLevel(12, 20, currPlayerPositionY); createLevelEscorts(160, ground); } } if (method == 'camera') { var v2 = 1; while (g <= 12) { if (theLev == v2) { return currPlayerPositionY; } ++v2; } } } function continueFromMenu() { loadSave(); _root.levelMenu.removeMovieClip(); openLoadingScreen(); finished = true; player.gotoAndStop(1); levelTrack.stop(); } function levelCompleted(skipNum) { _root.levelMenu.removeMovieClip(); openLoadingScreen(skipNum); finished = true; player.gotoAndStop(1); levelTrack.stop(); } function openLoadingScreen(skipNum) { saveGame(); levelMilestone = currentLevel + 1; trackMilestone('level' + levelMilestone); trace('miles' + levelMilestone); menuTrack.stop(); pauseGame('noCtrl'); _level0.menuscreen.ingame_hud.loadingScreenMenu.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('loadingScreenMenu', 'loadingScreenMenu', _root.getNextHighestDepth(), {'_x': 0, '_y': 0}); loadHint(); loadingScreenCounter = 0; if (skipNum == undefined) { _level0.menuscreen.ingame_hud.loadingScreenMenu.whatLevel.text = currentLevel + 1; _level0.menuscreen.ingame_hud.loadingScreenMenu.game_map.gotoAndPlay(currentLevel + 1); } else { _level0.menuscreen.ingame_hud.loadingScreenMenu.whatLevel.text = currentLevel + skipNum; _level0.menuscreen.ingame_hud.loadingScreenMenu.game_map.gotoAndPlay(currentLevel + skipNum); } _level0.menuscreen.ingame_hud.loadingScreenMenu.onEnterFrame = function () { if (loadingScreenCounter < 100) { ++loadingScreenCounter; } if (loadingScreenCounter == 100) { this.removeMovieClip(); pauseGame(); if (currentLevel != 12) { if (skipNum == undefined) { getPlayerPosition('cycle', currentLevel + 1); } else { getPlayerPosition('cycle', currentLevel + skipNum); } } else {} } loadingScreenMenu.btn_maxgames_menus.onRelease = function () { getURL('http://armor.ag/MoreGames/', _blank); }; }; } function saveGame(method) { trace('saved'); gamedata_so.clear(); if (method == 'fromSupply') { gamedata_so.data.currentLevel = currentLevel - 1; } else { gamedata_so.data.currentLevel = currentLevel; } gamedata_so.data.player_credits = player_credits; gamedata_so.data.player_health_max = player_health_max; gamedata_so.data.player_health = player_health; gamedata_so.data.ownHandgun = ownHandgun; gamedata_so.data.ownShotgun = ownShotgun; gamedata_so.data.ownMachinegun = ownMachinegun; gamedata_so.data.currClipHandgun = currClipHandgun; gamedata_so.data.currClipShotgun = currClipShotgun; gamedata_so.data.currClipMachinegun = currClipMachinegun; gamedata_so.data.remClipHandgun = remClipHandgun; gamedata_so.data.remClipShotgun = remClipShotgun; gamedata_so.data.remClipMachinegun = remClipMachinegun; gamedata_so.data.weaponSelected = weaponSelected; gamedata_so.flush(); } function deadScreen() { _root.weapon_mc.removeMovieClip(); if (player._currentframe != 5) { player.gotoAndPlay(5); } levelTrack.stop(); _level0.menuscreen.ingame_hud.deadScreenBg.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('deadScreenBg', 'deadScreenBg', _root.getNextHighestDepth(), {'_x': 0, '_y': 0}); _level0.menuscreen.ingame_hud.deadScreenBg.onEnterFrame = function () { trace('fdsewr = ' + player._currentframe); if (deadScreenCounter < 165) { ++deadScreenCounter; } if (deadScreenCounter == 30) { if (this._currentframe == 1) { this.gotoAndPlay(2); } } if (deadScreenCounter == 165) { this.removeMovieClip(); if (currentLevel != 12) { getPlayerPosition('cycle', currentLevel); } else {} player_health = player_health_max; } }; gameOver = new Sound(soundEffects); gameOver.attachSound('gameOver'); gameOver.start(); } function turnThisBlack(mc) { var v1 = new Color(mc); v1.setRGB(0); } function turnThisDark(mc) { var v1 = new Color(mc); v1.setRGB(2097152); } function openTutorialPopup(number) { _root.lev.objects['tutorialWall' + number].removeMovieClip(); _level0.hud_notify.tutorialPopup.removeMovieClip(); _level0.hud_notify.attachMovie('tutorialPopup', 'tutorialPopup', _level0.hud_notify.getNextHighestDepth(), {'_x': 0, '_y': 576}); _level0.hud_notify._xscale = 62.5; _level0.hud_notify._yscale = 62.5; switch (number) { case 1: var v2 = 'Press [A] and [D] to walk.'; break; case 2: _level0.hud_notify.tutorialPopup.removeMovieClip(); break; case 3: var v2 = 'Move your mouse to aim and left-click to use your weapon.'; break; case 4: _level0.hud_notify.tutorialPopup.removeMovieClip(); break; case 5: var v2 = 'Press [Q] to switch weapons and [R] to reload.'; break; case 6: _level0.hud_notify.tutorialPopup.removeMovieClip(); break; case 7: var v2 = 'To interact with an object, press [E].'; break; case 8: _level0.hud_notify.tutorialPopup.removeMovieClip(); break; case 9: var v2 = 'To search for data, press and hold [E].'; break; case 10: _level0.hud_notify.tutorialPopup.removeMovieClip(); break; case 11: var v2 = 'Ice walls can be destroyed by using a gun.'; break; case 12: _level0.hud_notify.tutorialPopup.removeMovieClip(); } _level0.hud_notify.tutorialPopup.tutorialPopupText.htmlText = storedv2; } function openHudInventory(item) { if (notificationCount < 6) { _level0.hud_notify.onEnterFrame = function () { if (this._height == 0) { notificationCount = 0; } }; var delayNotify = 60; var yInit = 690; var yIncrease = 40; ++notificationCount; _level0.hud_notify.attachMovie('hudInventory', 'hudInventory' + notificationCount, _level0.hud_notify.getNextHighestDepth(), {'_x': 930, '_y': yInit - yIncrease}); _level0.hud_notify._xscale = 62.5; _level0.hud_notify._yscale = 62.5; _level0.hud_notify['hudInventory' + notificationCount].counter = 0; _level0.hud_notify['hudInventory' + notificationCount].hudInventoryText.text = item; _level0.hud_notify['hudInventory' + notificationCount].onEnterFrame = function () { var v2 = 1; while (v2 <= 6) { _level0.hud_notify['hudInventory' + v2]._y = yInit - yIncrease * v2; ++v2; } if (this.counter < delayNotify) { ++this.counter; } else { if (this.counter == delayNotify) { this.removeMovieClip(); } } }; } if (notificationCount == 6) { var v3 = 1; while (v3 <= 6) { _level0.hud_notify['hudInventory' + v3].removeMovieClip(); ++v3; } notificationCount = 0; openHudInventory(item); } } function openSupplyLockerMenu() { buyingStuff = true; pauseGame('noCtrl'); _level0.hud_notify.tutorialPopup.removeMovieClip(); _level0.menuscreen.ingame_hud.storyPopup.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('supplyLockerMenu', 'supplyLockerMenu', _level0.menuscreen.ingame_hud.getNextHighestDepth(), {'_x': 0, '_y': 0}); playSFX('btn_open-close'); var qty_selection_medkit = 1; var qty_selection_handgun = 1; var qty_selection_shotgun = 1; var qty_selection_machinegun = 1; var max_buy_qty = 5; _level0.menuscreen.ingame_hud.supplyLockerMenu.onEnterFrame = function () { cantFire = true; this.my_hg_total.text = remClipHandgun + currClipHandgun; this.my_sg_total.text = remClipShotgun + currClipShotgun; this.my_mg_total.text = remClipMachinegun + currClipMachinegun; this.my_health.text = Math.round(player_health) + '/' + player_health_max; this.my_credits.text = player_credits; this.price_health_upgrade.text = set_price_healthbar; this.price_handgun.text = set_price_handgun; this.price_shotgun.text = set_price_shotgun; this.price_machinegun.text = set_price_machinegun; this.healthbar_progress.text = '(' + player_health_max / 50 + '/4)'; var total_medkit = set_price_medkit * qty_selection_medkit; this.price_medkit.text = total_medkit; this.qty_medkit.text = qty_selection_medkit; var total_handgun_ammo = set_price_ammo * qty_selection_handgun; this.price_handgun_ammo.text = total_handgun_ammo; this.qty_handgun_ammo.text = qty_selection_handgun; var total_shotgun_ammo = set_price_ammo * qty_selection_shotgun; this.price_shotgun_ammo.text = total_shotgun_ammo; this.qty_shotgun_ammo.text = qty_selection_shotgun; var total_machinegun_ammo = set_price_ammo * qty_selection_machinegun; this.price_machinegun_ammo.text = total_machinegun_ammo; this.qty_machinegun_ammo.text = qty_selection_machinegun; this.btn_buy_healthbar.onRelease = function () { if (player_credits >= set_price_healthbar && _level0.hud_notify._height == 0) { if (player_health_max <= 200) { player_credits -= set_price_healthbar; player_health_max += 50; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); openHudInventory('Added health bar'); playSFX('audioBuyWeapon'); } } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_handgun.onRelease = function () { if (player_credits >= set_price_handgun && _level0.hud_notify._height == 0) { if (!ownHandgun) { player_credits -= set_price_handgun; remClipHandgun = 0; ownHandgun = true; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); openHudInventory('Added hand gun'); playSFX('audioBuyWeapon'); } } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_shotgun.onRelease = function () { if (player_credits >= set_price_shotgun && _level0.hud_notify._height == 0) { if (!ownShotgun) { player_credits -= set_price_shotgun; remClipShotgun = 0; ownShotgun = true; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); openHudInventory('Added shot gun'); playSFX('audioBuyWeapon'); } } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_machinegun.onRelease = function () { if (player_credits >= set_price_machinegun && _level0.hud_notify._height == 0) { if (!ownMachinegun) { player_credits -= set_price_machinegun; remClipMachinegun = 0; ownMachinegun = true; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); openHudInventory('Added machine gun'); playSFX('audioBuyWeapon'); } } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_medkit.onRelease = function () { if (player_credits >= total_medkit && qty_selection_medkit != 0 && _level0.hud_notify._height == 0) { player_credits -= total_medkit; player_health += qty_selection_medkit * set_qty_medkit; openHudInventory('+' + qty_selection_medkit * set_qty_medkit + ' health'); _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); playSFX('audioBuyWeapon'); } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_handgun_ammo.onRelease = function () { if (player_credits >= total_handgun_ammo && qty_selection_handgun != 0 && _level0.hud_notify._height == 0) { player_credits -= total_handgun_ammo; remClipHandgun += qty_selection_handgun * set_qty_handgun_ammo; openHudInventory('+' + qty_selection_handgun * set_qty_handgun_ammo + ' hand gun bullets'); qty_selection_handgun = 1; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); playSFX('audioBuyWeapon'); } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_shotgun_ammo.onRelease = function () { if (player_credits >= total_shotgun_ammo && qty_selection_shotgun != 0 && _level0.hud_notify._height == 0) { player_credits -= total_shotgun_ammo; remClipShotgun += qty_selection_shotgun * set_qty_shotgun_ammo; openHudInventory('+' + qty_selection_shotgun * set_qty_shotgun_ammo + ' shot gun bullets'); qty_selection_shotgun = 1; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); playSFX('audioBuyWeapon'); } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; this.btn_buy_machinegun_ammo.onRelease = function () { if (player_credits >= total_machinegun_ammo && qty_selection_machinegun != 0 && _level0.hud_notify._height == 0) { player_credits -= total_machinegun_ammo; remClipMachinegun += qty_selection_machinegun * set_qty_machinegun_ammo; openHudInventory('+' + qty_selection_machinegun * set_qty_machinegun_ammo + ' machine gun bullets'); qty_selection_machinegun = 1; _level0.menuscreen.ingame_hud.supplyLockerMenu.my_credits_mask.gotoAndPlay(2); playSFX('audioBuyWeapon'); } else { if (_level0.hud_notify._height == 0) { openHudInventory('Not enough credits'); playSFX('audioInvalidSelect'); } } }; if (player_health_max == 200) { this.price_health_upgrade._alpha = 15; this.btn_buy_healthbar.enabled = false; this.btn_buy_healthbar.gotoAndStop(2); } else { if (player_health_max < 200) { this.price_health_upgrade._alpha = 100; this.btn_buy_healthbar.enabled = true; this.btn_buy_healthbar.gotoAndStop(1); } } if (ownHandgun) { updateButtons('handgun', 'true'); } else { if (!ownHandgun) { updateButtons('handgun', 'false'); } } if (ownShotgun) { updateButtons('shotgun', 'true'); } else { if (!ownShotgun) { updateButtons('shotgun', 'false'); } } if (ownMachinegun) { updateButtons('machinegun', 'true'); } else { if (!ownMachinegun) { updateButtons('machinegun', 'false'); } } this.btn_qty_handgun_up.onRelease = function () { if (qty_selection_handgun < max_buy_qty) { ++qty_selection_handgun; playSFX('audioBuyQty'); } }; this.btn_qty_handgun_down.onRelease = function () { if (qty_selection_handgun > 1) { --qty_selection_handgun; playSFX('audioBuyQty'); } }; this.btn_qty_shotgun_up.onRelease = function () { if (qty_selection_shotgun < max_buy_qty) { ++qty_selection_shotgun; playSFX('audioBuyQty'); } }; this.btn_qty_shotgun_down.onRelease = function () { if (qty_selection_shotgun > 1) { --qty_selection_shotgun; playSFX('audioBuyQty'); } }; this.btn_qty_machinegun_up.onRelease = function () { if (qty_selection_machinegun < max_buy_qty) { ++qty_selection_machinegun; playSFX('audioBuyQty'); } }; this.btn_qty_machinegun_down.onRelease = function () { if (qty_selection_machinegun > 1) { --qty_selection_machinegun; playSFX('audioBuyQty'); } }; this.btn_close.onRelease = function () { _level0.menuscreen.ingame_hud.supplyLockerMenu.removeMovieClip(); cantFire = false; playSFX('btn_open-close'); buyingStuff = false; pauseGame(); }; }; } function savingGameIcon() { _level0.menuscreen.ingame_hud.savingGamePopup.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('savingGame', 'savingGamePopup', _level0.menuscreen.ingame_hud.getNextHighestDepth(), {'_x': 1142, '_y': 40}); _level0.menuscreen.ingame_hud.savingGamePopup.timeDelay = 60; _level0.menuscreen.ingame_hud.savingGamePopup.onEnterFrame = function () { if (this.timeDelay > 0) { this.timeDelay -= 1; } else { if (this.timeDelay == 0) { this.removeMovieClip(); } } }; } function playSFX(whichOne) { if (whichOne == 'bassBoom') { audioBassBoom = new Sound(soundEffects); audioBassBoom.attachSound('bassBoom'); audioBassBoom.start(); } if (whichOne == 'audioBuyWeapon') { audioBuyWeapon = new Sound(soundEffects); audioBuyWeapon.attachSound('audioBuyWeapon'); audioBuyWeapon.start(); } if (whichOne == 'audioBuyQty') { audioBuyQty = new Sound(soundEffects); audioBuyQty.attachSound('audioBuyQty'); audioBuyQty.start(); } if (whichOne == 'btn_open-close') { audioOpenClose = new Sound(soundEffects); audioOpenClose.attachSound('btn_open-close'); audioOpenClose.start(); } if (whichOne == 'audioInvalidSelect') { audioInvalid = new Sound(soundEffects); audioInvalid.attachSound('audioInvalidSelect'); audioInvalid.start(); } } function updateButtons(whichGun, ownIt) { if (ownIt == 'true') { _level0.menuscreen.ingame_hud.supplyLockerMenu['price_' + whichGun]._alpha = 15; _level0.menuscreen.ingame_hud.supplyLockerMenu['price_' + whichGun + '_ammo']._alpha = 100; _level0.menuscreen.ingame_hud.supplyLockerMenu['qty_' + whichGun + '_ammo']._alpha = 100; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_qty_' + whichGun + '_up'].enabled = true; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_qty_' + whichGun + '_down'].enabled = true; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun].enabled = false; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun].gotoAndStop(3); _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun + '_ammo'].enabled = true; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun + '_ammo'].gotoAndStop(1); } if (ownIt == 'false') { _level0.menuscreen.ingame_hud.supplyLockerMenu['price_' + whichGun]._alpha = 100; _level0.menuscreen.ingame_hud.supplyLockerMenu['price_' + whichGun + '_ammo']._alpha = 15; _level0.menuscreen.ingame_hud.supplyLockerMenu['qty_' + whichGun + '_ammo']._alpha = 15; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_qty_' + whichGun + '_up'].enabled = false; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_qty_' + whichGun + '_down'].enabled = false; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun].enabled = true; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun].gotoAndStop(1); _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun + '_ammo'].enabled = false; _level0.menuscreen.ingame_hud.supplyLockerMenu['btn_buy_' + whichGun + '_ammo'].gotoAndStop(2); } } function playIntro() { menuTrack.stop(); levelTrack.stop(); _root.levelMenu.removeMovieClip(); _level0.the_container.attachMovie('cutscene1', 'cutscene1', _level0.the_container.getNextHighestDepth()); var tFrames = _level0.the_container.cutscene1._totalframes; _level0.the_container.cutscene1.onEnterFrame = function () { if (this._currentframe == tFrames) { this.removeMovieClip(); viewingCutscene = false; loadLevel(1); } else { if (this._currentframe < tFrames) { viewingCutscene = true; } } _level0.the_container.cutscene1.btn_skip.onRelease = function () { _level0.the_container.cutscene1.gotoAndPlay(840); trackMilestone('level1'); trace('miles1'); }; }; } function playOutro() { _root.levelMenu.removeMovieClip(); _level0.the_container._y = 0; _level0.the_container.attachMovie('cutscene2', 'cutscene2', _level0.the_container.getNextHighestDepth()); var tFrames = _level0.the_container.cutscene2._totalframes; _level0.the_container.cutscene2.onEnterFrame = function () { if (this._currentframe == tFrames) { this.removeMovieClip(); viewingCutscene = false; loadLevelMenu('end'); playSFX('bassBoom'); menuTrack.stop(); levelTrack.stop(); } else { if (this._currentframe < tFrames) { viewingCutscene = true; } } }; } function pauseGame(display) { isPaused = !isPaused; if (isPaused) { var v2 = 1; while (v2 <= 30) { _root.lev.objects['guard' + v2].walking.stop(); _root.lev.objects['guard' + v2].walking.ani.stop(); _root.lev.objects['guard' + v2].hitting.stop(); _root.lev.objects['guard' + v2].surprise.stop(); _root.lev.objects['guard' + v2].dead.stop(); ++v2; } player.gotoAndStop(1); _root.lev.objects.escort1.gotoAndStop(1); _level0.menuscreen.ingame_hud.pauseScreen.removeMovieClip(); if (display != 'noCtrl') { _level0.menuscreen.ingame_hud.attachMovie('pauseScreen', 'pauseScreen', _level0.menuscreen.ingame_hud.getNextHighestDepth()); } _level0.menuscreen.ingame_hud.pauseScreen.onEnterFrame = function () { _level0.menuscreen.ingame_hud.pauseScreen.btn_continue_unpause.onRelease = function () { _level0.menuscreen.ingame_hud.pauseScreen.removeMovieClip(); pauseGame(); }; }; } if (!isPaused) { v2 = 1; while (v2 <= 30) { _root.lev.objects['guard' + v2].walking.play(); _root.lev.objects['guard' + v2].walking.ani.play(); _root.lev.objects['guard' + v2].hitting.play(); _root.lev.objects['guard' + v2].surprise.play(); _root.lev.objects['guard' + v2].dead.play(); ++v2; } _level0.menuscreen.ingame_hud.pauseScreen.removeMovieClip(); } } function playMenuMusic() { if (!menuMusicPlaying) { menuTrack = new Sound(menuTracks); menuTrack.attachSound('mainTheme'); menuTrack.start(0, 99); menuMusicPlaying = true; } } function fireHandgun() { if (reloadComplete == true && !dead && !finished && levelRendered && !isPaused && (currClipHandgun > 0 || remClipHandgun > 0) && !clipReloading) { audioGunshot = new Sound(soundEffects); audioGunshot.attachSound('handgunSound'); audioGunshot.start(); --currClipHandgun; playerPosY = player._y + 79; isWithinHearingDist(); weapon_mc.bulletOrigin.gotoAndPlay(1); var v5 = _root.attachMovie('bullet', 'b' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); v5._x = weapon_mc._x; v5._y = weapon_mc._y; v5.bulletLifeTimer = 0; randomNum = random(bulletOffset) - bulletOffset / 2; bulletAngle = (weapon_mc._rotation + randomNum - 90) * Math.PI / 180; v5.xBulletSpeed = Math.cos(bulletAngle) * bulletSpeed; v5.yBulletSpeed = Math.sin(bulletAngle) * bulletSpeed; getTrailAngle = Math.round(180 - Math.atan2(_root._xmouse - gunX, _root._ymouse - gunY) * 180 / Math.PI); doTrail(v5, v5._x, v5._y, 'arrow', getTrailAngle); v5.bulletExpired = false; v5.onEnterFrame = function () { if (this.bulletExpired == false) { this._x += toFixed(this.xBulletSpeed, 1); this._y += toFixed(this.yBulletSpeed, 1); } else { if (this.bulletExpired == true && this.bloodSplatAni._currentframe == 6) { this.removeMovieClip(); } } if (this.bulletLifeTimer >= bulletLifeTimerTotalHandgun) { this.removeMovieClip(); } var v4 = 1; while (v4 <= 30) { if (com.CollisionDetection.checkForCollision(this, _root.lev.icewalls['ice' + v4], 255) && !_root.lev.icewalls['ice' + v4].isDead && this._currentframe == 1 && this.bulletExpired == false) { _root.lev.icewalls['ice' + v4].health -= 60; trace('hit ice'); this.attachMovie('iceSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); this.bulletExpired = true; } ++v4; } if (com.CollisionDetection.checkForCollision(this, _root.lev.walls, 255)) { removeMovieClip(this); } if (com.CollisionDetection.checkForCollision(this, _root.lev.platforms, 255)) { removeMovieClip(this); } var v3 = 1; while (v3 <= 30) { if (!_root.lev.objects['guard' + v3].headBlew && com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox3, 255) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { trace('headshot'); if (_root.lev.objects['guard' + v3].health <= 165) { trace('head exploded'); _root.lev.objects['guard' + v3].headBlew = true; _root.lev.objects['guard' + v3].maskHead._x = -88; _root.lev.objects['guard' + v3].maskHead._y = -140; _root.lev.objects['guard' + v3].headOff._visible = true; _root.lev.objects['guard' + v3].headExploding._visible = true; _root.lev.objects['guard' + v3].headExploding.gotoAndPlay(2); } zomScream = new Sound(soundEffects); zomScream.attachSound('zomScream1'); zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 6; } _root.lev.objects['guard' + v3].health -= 80; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 6; } _root.lev.objects['guard' + v3].health -= 80; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } if ((com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].walking.hitBox2, 255) || com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox2, 255)) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { zomScream = new Sound(soundEffects); if (_root.lev.objects['guard' + v3].ver == 1) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 2) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 3) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 4) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 5) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 6) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 7) { zomScream.attachSound('zomScream1'); } } } } } } } zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 6; } _root.lev.objects['guard' + v3].health -= 60; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 6; } _root.lev.objects['guard' + v3].health -= 60; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } ++v3; } ++this.bulletLifeTimer; }; startReloadingFaster(); } else { if (reloadComplete == true && !clipReloading) { audioEmpty = new Sound(soundEffects); audioEmpty.attachSound('emptyClip'); audioEmpty.start(); startReloadingFaster(); } } } function fireShotgun() { if (reloadComplete == true && !dead && !finished && levelRendered && !isPaused && (currClipShotgun > 0 || remClipShotgun > 0) && !clipReloading) { audioGunshot = new Sound(soundEffects); audioGunshot.attachSound('shotgunSound'); audioGunshot.start(); --currClipShotgun; playerPosY = player._y + 79; isWithinHearingDist(); weapon_mc.bulletOrigin.gotoAndPlay(1); var v5 = _root.attachMovie('bullet', 'b' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); v5._x = weapon_mc._x; v5._y = weapon_mc._y; v5.bulletLifeTimer = 0; randomNum = random(bulletOffset) - bulletOffset / 2; bulletAngle = (weapon_mc._rotation + randomNum - 90) * Math.PI / 180; v5.xBulletSpeed = Math.cos(bulletAngle) * bulletSpeed; v5.yBulletSpeed = Math.sin(bulletAngle) * bulletSpeed; getTrailAngle = Math.round(180 - Math.atan2(_root._xmouse - gunX, _root._ymouse - gunY) * 180 / Math.PI); doTrail(v5, v5._x, v5._y, 'arrow', getTrailAngle); v5.bulletExpired = false; v5.onEnterFrame = function () { if (this.bulletExpired == false) { this._x += toFixed(this.xBulletSpeed, 1); this._y += toFixed(this.yBulletSpeed, 1); } else { if (this.bulletExpired == true && this.bloodSplatAni._currentframe == 6) { this.removeMovieClip(); } } if (this.bulletLifeTimer >= bulletLifeTimerTotalShotgun) { this.removeMovieClip(); } var v4 = 1; while (v4 <= 30) { if (com.CollisionDetection.checkForCollision(this, _root.lev.icewalls['ice' + v4], 255) && !_root.lev.icewalls['ice' + v4].isDead && this._currentframe == 1 && this.bulletExpired == false) { _root.lev.icewalls['ice' + v4].health -= 150; trace('hit ice'); this.attachMovie('iceSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); this.bulletExpired = true; } ++v4; } if (com.CollisionDetection.checkForCollision(this, _root.lev.walls, 255)) { trace('hit wall'); removeMovieClip(this); } if (com.CollisionDetection.checkForCollision(this, _root.lev.platforms, 255)) { removeMovieClip(this); } var v3 = 1; while (v3 <= 30) { if (!_root.lev.objects['guard' + v3].headBlew && com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox3, 255) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { trace('headshot'); if (_root.lev.objects['guard' + v3].health <= 165) { trace('head exploded'); _root.lev.objects['guard' + v3].headBlew = true; _root.lev.objects['guard' + v3].maskHead._x = -88; _root.lev.objects['guard' + v3].maskHead._y = -140; _root.lev.objects['guard' + v3].headOff._visible = true; _root.lev.objects['guard' + v3].headExploding._visible = true; _root.lev.objects['guard' + v3].headExploding.gotoAndPlay(2); } zomScream = new Sound(soundEffects); zomScream.attachSound('zomScream1'); zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 6; } _root.lev.objects['guard' + v3].health -= 200; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 6; } _root.lev.objects['guard' + v3].health -= 200; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } if ((com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].walking.hitBox2, 255) || com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox2, 255)) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { zomScream = new Sound(soundEffects); if (_root.lev.objects['guard' + v3].ver == 1) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 2) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 3) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 4) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 5) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 6) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 7) { zomScream.attachSound('zomScream1'); } } } } } } } zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 12; } _root.lev.objects['guard' + v3].health -= 150; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 12; } _root.lev.objects['guard' + v3].health -= 150; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } ++v3; } ++this.bulletLifeTimer; }; startReloading(); } else { if (reloadComplete == true && !clipReloading) { audioEmpty = new Sound(soundEffects); audioEmpty.attachSound('emptyClip'); audioEmpty.start(); startReloading(); } } } function fireMachinegun() { if (reloadComplete == true && !dead && !finished && levelRendered && !isPaused && (currClipMachinegun > 0 || remClipMachinegun > 0) && !clipReloading) { audioGunshot = new Sound(soundEffects); audioGunshot.attachSound('machinegunSound'); audioGunshot.start(); --currClipMachinegun; playerPosY = player._y + 79; isWithinHearingDist(); weapon_mc.bulletOrigin.gotoAndPlay(1); var v5 = _root.attachMovie('bullet', 'b' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); v5._x = weapon_mc._x; v5._y = weapon_mc._y; v5.bulletLifeTimer = 0; randomNum = random(bulletOffset) - bulletOffset / 2; bulletAngle = (weapon_mc._rotation + randomNum - 90) * Math.PI / 180; v5.xBulletSpeed = Math.cos(bulletAngle) * bulletSpeed; v5.yBulletSpeed = Math.sin(bulletAngle) * bulletSpeed; getTrailAngle = Math.round(180 - Math.atan2(_root._xmouse - gunX, _root._ymouse - gunY) * 180 / Math.PI); doTrail(v5, v5._x, v5._y, 'arrow', getTrailAngle); v5.bulletExpired = false; v5.onEnterFrame = function () { if (this.bulletExpired == false) { this._x += toFixed(this.xBulletSpeed, 1); this._y += toFixed(this.yBulletSpeed, 1); } else { if (this.bulletExpired == true && this.bloodSplatAni._currentframe == 6) { this.removeMovieClip(); } } if (this.bulletLifeTimer >= bulletLifeTimerTotalMachinegun) { this.removeMovieClip(); } var v4 = 1; while (v4 <= 30) { if (com.CollisionDetection.checkForCollision(this, _root.lev.icewalls['ice' + v4], 255) && !_root.lev.icewalls['ice' + v4].isDead && this._currentframe == 1 && this.bulletExpired == false) { _root.lev.icewalls['ice' + v4].health -= 75; trace('hit ice'); this.attachMovie('iceSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); this.bulletExpired = true; } ++v4; } if (com.CollisionDetection.checkForCollision(this, _root.lev.walls, 255)) { removeMovieClip(this); } if (com.CollisionDetection.checkForCollision(this, _root.lev.platforms, 255)) { removeMovieClip(this); } var v3 = 1; while (v3 <= 30) { if (!_root.lev.objects['guard' + v3].headBlew && com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox3, 255) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { trace('headshot'); if (_root.lev.objects['guard' + v3].health <= 165) { trace('head exploded'); _root.lev.objects['guard' + v3].headBlew = true; _root.lev.objects['guard' + v3].maskHead._x = -88; _root.lev.objects['guard' + v3].maskHead._y = -140; _root.lev.objects['guard' + v3].headOff._visible = true; _root.lev.objects['guard' + v3].headExploding._visible = true; _root.lev.objects['guard' + v3].headExploding.gotoAndPlay(2); } zomScream = new Sound(soundEffects); zomScream.attachSound('zomScream1'); zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 6; } _root.lev.objects['guard' + v3].health -= 100; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 6; } _root.lev.objects['guard' + v3].health -= 100; trace('hit me0'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } if ((com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].walking.hitBox2, 255) || com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox2, 255)) && !_root.lev.objects['guard' + v3].isDead && this._currentframe == 1 && this.bulletExpired == false) { zomScream = new Sound(soundEffects); if (_root.lev.objects['guard' + v3].ver == 1) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 2) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 3) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 4) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 5) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 6) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 7) { zomScream.attachSound('zomScream1'); } } } } } } } zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 12; } _root.lev.objects['guard' + v3].health -= 75; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 12; } _root.lev.objects['guard' + v3].health -= 75; trace('hit me'); this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); if (player._xscale == -100) { this.bloodSplatAni._xscale = -100; } this.bulletExpired = true; } } ++v3; } ++this.bulletLifeTimer; }; startReloadingFastest(); } else { if (reloadComplete == true && !clipReloading) { audioEmpty = new Sound(soundEffects); audioEmpty.attachSound('emptyClip'); audioEmpty.start(); startReloadingFastest(); } } } function meleeAttack() { if (!dead && !finished && levelRendered && !isPaused && (weapon_mc.swingCrowbar._currentframe == 1 || weapon_mc.swingCrowbar._currentframe == 15)) { audioGunshot = new Sound(soundEffects); audioGunshot.attachSound('crowbarSound'); audioGunshot.start(); weapon_mc.swingCrowbar.gotoAndPlay(2); if (!touchingAndFacingWall) { var hitPoint_mc = _root.attachMovie('meleeHitPoint', 'h' + _root.getNextHighestDepth(), _root.getNextHighestDepth()); hitPoint_mc._alpha = 100; } hitPoint_mc.onEnterFrame = function () { hitPoint_mc._y = weapon_mc._y + 30; if (player._xscale == 100) { hitPoint_mc._x = weapon_mc._x + 60; } else { if (player._xscale == -100) { hitPoint_mc._x = weapon_mc._x - 60; hitPoint_mc._xscale = -100; } } if (weapon_mc.swingCrowbar._currentframe == 10) { removeMovieClip(this); } if (this.meleeExpired == true && this.bloodSplatAni._currentframe == 6) { this.removeMovieClip(); } var v3 = 1; while (v3 <= 30) { if (com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].walking.hitBox2, 255) || com.CollisionDetection.checkForCollision(this, _root.lev.objects['guard' + v3].hitBox2, 255)) { zomScream = new Sound(soundEffects); if (_root.lev.objects['guard' + v3].ver == 1) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 2) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 3) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 4) { zomScream.attachSound('zomScream1'); } else { if (_root.lev.objects['guard' + v3].ver == 5) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 6) { zomScream.attachSound('zomScream3'); } else { if (_root.lev.objects['guard' + v3].ver == 7) { zomScream.attachSound('zomScream1'); } } } } } } } if (!this.meleeHitting) { zomScream.start(); if (player._xscale == -100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x -= 8; } } if (player._xscale == 100) { if (_root.lev.objects['guard' + v3].canWalk) { _root.lev.objects['guard' + v3]._x += 8; } } _root.lev.objects['guard' + v3].health -= 65; bloodY = this._currentframe; if (bloodY < 3) { useThisBloodY = -40; } else { if (bloodY == 3 || bloodY == 4) { useThisBloodY = -20; } else { if (bloodY == 5 || bloodY == 6) { useThisBloodY = 0; } else { if (bloodY == 1 || bloodY == 8) { useThisBloodY = 20; } else { if (bloodY > 8) { useThisBloodY = 40; } } } } } this.attachMovie('bloodSplatAni1', 'bloodSplatAni', this.getNextHighestDepth()); this.bloodSplatAni._y += useThisBloodY; this.meleeHitting = true; this.meleeExpired = true; } } ++v3; } }; } } function startReloading() { reloadComplete = false; reloadTimer = setInterval(this, 'gunReloaded', reloadSpeed); } function startReloadingFaster() { reloadComplete = false; reloadTimer = setInterval(this, 'gunReloaded', reloadSpeedFaster); } function startReloadingFastest() { reloadComplete = false; reloadTimer = setInterval(this, 'gunReloaded', reloadSpeedFastest); } function gunReloaded() { clearInterval(reloadTimer); reloadComplete = true; } function rotateArm() { if (!isPaused && !dead) { gunX = weapon_mc._x; gunY = weapon_mc._y; rotationDirection = Math.round(180 - Math.atan2(_root._xmouse - gunX, _root._ymouse - gunY) * 180 / Math.PI); weapon_mc._rotation = rotationDirection; } } function switchDirection() { if (playerDirection == 'facingF' && !walking) { rotateArm(); player._xscale = 100; weapon_mc._xscale = 100; sp1.fg_flashlight._xscale = 100; } else { if (playerDirection == 'facingB' && !walking) { rotateArm(); player._xscale = -100; weapon_mc._xscale = -100; sp1.fg_flashlight._xscale = -100; } else { if (walking) { rotateArm(); if (player._xscale != -100 && playerDirection == 'facingB') { player._xscale = -100; weapon_mc._xscale = -100; sp1.fg_flashlight._xscale = -100; } if (player._xscale != -100 && playerDirection == 'facingF') { player._xscale = 100; weapon_mc._xscale = 100; sp1.fg_flashlight._xscale = 100; } if (player._xscale != 100 && playerDirection == 'facingB') { player._xscale = -100; weapon_mc._xscale = -100; sp1.fg_flashlight._xscale = -100; } if (player._xscale != 100 && playerDirection == 'facingF') { player._xscale = 100; weapon_mc._xscale = 100; sp1.fg_flashlight._xscale = 100; } } } } } function doTrail(container, targetX, targetY, type, trailAngle) { var v2 = container.attachMovie(type, type + particleCounter, particleCounter); v2.onEnterFrame = function () { gunX = weapon_mc._x; gunY = weapon_mc._y; angle_degrees = trailAngle; this._rotation = angle_degrees; this._x += arrow_xspeed; this._y += arrow_yspeed; }; ++particleCounter; } function toFixed(number, factor) { return Math.round(number * factor) / factor; } function damageOverlay(numb) { if ((numb / player_health_max) * 100 > 50) { damagePct = 50; } else { if ((numb / player_health_max) * 100 <= 50) { damagePct = 100 - (numb / player_health_max) * 100; } } if (!damagingPlayer) { _level0.menuscreen.ingame_hud.damageOverlayAni._alpha = damagePct; if (_level0.menuscreen.ingame_hud.damageOverlayAni._currentframe == 1 || _level0.menuscreen.ingame_hud.damageOverlayAni._currentframe == 30) { _level0.menuscreen.ingame_hud.damageOverlayAni.gotoAndPlay(2); } } } function loadHint() { var v1 = myRandomNum(1, 5); if (v1 == 1) { _level0.menuscreen.ingame_hud.loadingScreenMenu.hintText.htmlText = 'HINT: Use the number keys (1-4) to switch between weapons directly.'; } if (v1 == 2) { _level0.menuscreen.ingame_hud.loadingScreenMenu.hintText.htmlText = 'HINT: Enemies can hear you! A nearby gunshot will attract their attention.'; } if (v1 == 3) { _level0.menuscreen.ingame_hud.loadingScreenMenu.hintText.htmlText = 'HINT: Loading screens like this one save your progress.'; } if (v1 == 4) { _level0.menuscreen.ingame_hud.loadingScreenMenu.hintText.htmlText = 'HINT: Each weapon has a different maximum range.'; } if (v1 == 5) { _level0.menuscreen.ingame_hud.loadingScreenMenu.hintText.htmlText = 'HINT: Read personnel logs to further uncover the truth.'; } } function trackMilestone(milestone) { var v1 = new LoadVars(); v1.api_key = '104c3b90fcb6da8e653c05eb1137f8ef'; v1.game = 'df'; v1.milestone = milestone; v1.sendAndLoad('http://www.nupixo.com/gametracker/tracker.php?clearCache=' + (new Date()).getTime(), v1, 'POST'); } stop(); this._lockroot = true; MovieClip.prototype.oldHitTest = MovieClip.prototype.hitTest; MovieClip.prototype.hitTest = function (x, y, sf) { var v3 = {'x': x, 'y': y}; _root._parent.localToGlobal(v3); return this.oldHitTest(v3.x, v3.y, sf); }; _quality = 'high'; qualitySetting = 'high'; var initialPlayerPos = null; var levelTrack; var levelTrackStartVolume = 100; var levelPosition; var soundEffects = this.createEmptyMovieClip('soundEffects', this.getNextHighestDepth()); var soundTracks = this.createEmptyMovieClip('soundTracks', this.getNextHighestDepth()); var soundTracksSwap = this.createEmptyMovieClip('soundTracksSwap', this.getNextHighestDepth()); var menuTracks = this.createEmptyMovieClip('menuTracks', this.getNextHighestDepth()); _level0.the_container.onEnterFrame = function () { f2_y = 136; f1_y = -24; f0_y = -188; if (levelRendered == true) { if (getCurrentFloor(player._y) == 'floorTwo') { moveCameraY(f2_y, 'floorTwo', true); } if (getCurrentFloor(player._y) == 'floorOne') { moveCameraY(f1_y, 'floorOne', true); } if (getCurrentFloor(player._y) == 'ground') { moveCameraY(f0_y, 'ground', true); } } }; var keyListener = new Object(); Key.addListener(keyListener); keyListener.onKeyUp = function () { if (Key.isDown(16) && !tellingStory && !buyingStuff && !readingLog && !dead && !finished && !walking && !deadScreenBg._visible && !levelMenu._visible && levelRendered) { if (Key.getCode() == 188) { levelCompleted(); } if (Key.getCode() == 106) { player_credits += 200; } } if (Key.getCode() == 80 && !tellingStory && !buyingStuff && !readingLog && !dead && !finished && !walking && !deadScreenBg._visible && !levelMenu._visible && levelRendered) { pauseGame(); } if (Key.getCode() == 27 && !tellingStory && !buyingStuff && !readingLog && !dead && !finished && !walking && !deadScreenBg._visible && !levelMenu._visible && levelRendered) { resetGame(); loadLevelMenu('esc'); } if (Key.getCode() == 82 && !isPaused && levelRendered && !clipReloading) { calculateBulletsManual(); } if (Key.getCode() == 81 && !isPaused && levelRendered && !clipReloading && !dead) { getWeapon('cycle'); } if (Key.getCode() == 49 && ownHandgun && !isPaused && levelRendered && !clipReloading && !dead) { if (weaponSelected != 1 && !dashing) { weaponSelected = 1; getWeapon('direct'); } } if (Key.getCode() == 50 && ownShotgun && !isPaused && levelRendered && !clipReloading && !dead) { if (weaponSelected != 2 && !dashing) { weaponSelected = 2; getWeapon('direct'); } } if (Key.getCode() == 51 && ownMachinegun && !isPaused && levelRendered && !clipReloading && !dead) { if (weaponSelected != 3 && !dashing) { weaponSelected = 3; getWeapon('direct'); } } if (Key.getCode() == 52 && !isPaused && levelRendered && !clipReloading && !dead) { if (weaponSelected != 4 && !dashing) { weaponSelected = 4; getWeapon('direct'); } } if (Key.getCode() == 77) { if (levelTrack.getVolume() > 0) { levelTrackStartVolume = 0; } else { levelTrackStartVolume = 100; } levelTrack.setVolume(levelTrackStartVolume); } }; var gamedata_so = SharedObject.getLocal('gamedata'); loadSave(); loadLevelMenu(); trackMilestone('menu'); var bulletOffset = 10; var bulletLifeTimerTotalHandgun = 12; var bulletLifeTimerTotalShotgun = 6; var bulletLifeTimerTotalMachinegun = 14; var maxClipHandgun = 12; var maxClipShotgun = 4; var maxClipMachinegun = 18; var bulletSpeed = 60; var reloadSpeed = 300; var reloadSpeedFaster = 200; var reloadSpeedFastest = 100; var reloadTimer; var reloadComplete = true; var bulletAngle; var randomNum; var gunX; var gunY; var rotationDirection; mouseListener = new Object(); mouseListener.onMouseDown = function () { if (!dead && !cantFire && !dashing && levelRendered && !isPaused) { calculateBulletsAuto(); if (weaponSelected == 1) { fireHandgun(); } if (weaponSelected == 2) { fireShotgun(); } if (weaponSelected == 3) { fireMachinegun(); } if (weaponSelected == 4) { meleeAttack(); } } }; mouseListener.onMouseMove = function () { if (!dead && !isPaused) { switchDirection(); } }; Mouse.addListener(mouseListener); var particleCounter = 0; } frame 1 { function createRandomLoot(theGuard, randNum, dropper) { theGuard.randomLootCount += randNum; var v3 = 1; while (v3 <= theGuard.randomLootCount) { randX = myRandomNum(-60, 60); randY = myRandomNum(40, 60); randType = myRandomNum(1, 7); if (theGuard.canFly) { _root.lev.objects.attachMovie('loot' + randType, dropper + 'guardLoot' + v3, lev.objects.getNextHighestDepth(), {'_x': theGuard._x + randX, '_y': theGuard._y}); } else { if (!theGuard.canFly) { _root.lev.objects.attachMovie('loot' + randType, dropper + 'guardLoot' + v3, lev.objects.getNextHighestDepth(), {'_x': theGuard._x + randX, '_y': theGuard._y - randY}); } } _root.lev.objects[dropper + 'guardLoot' + v3].ver = randType; _root.lev.objects[dropper + 'guardLoot' + v3].yspeed = 0; var pos = lev._x + _root.lev.objects[dropper + 'guardLoot' + v3]._x; _root.lev.objects[dropper + 'guardLoot' + v3].onEnterFrame = function () { if (!this.climbing) { this.yspeed += gravity; } if (this.yspeed > max_yspeed) { this.yspeed = max_yspeed; } this.forecast_y = this._y + this.yspeed; while (_root.lev.platforms.hitTest(pos, this.forecast_y - 1, true)) { --this.forecast_y; this.yspeed = 0; } this._y = this.forecast_y; if (this.hitTest(forecast_x - 16, forecast_y, true) || this.hitTest(forecast_x + 16, forecast_y, true)) { audioItemPickup = new Sound(soundEffects); audioItemPickup.attachSound('item_pickup'); audioItemPickup.start(); if (this.ver == 1) { var v3 = myRandomNum(1, 2) * 10; player_health += v3; openHudInventory('+' + v3 + ' health'); _level0.menuscreen.ingame_hud.glow_health.gotoAndPlay(2); } if (this.ver == 2) { v3 = myRandomNum(4, 6); remClipHandgun += v3; openHudInventory('+' + v3 + ' hand gun bullets'); } if (this.ver == 3 && ownShotgun) { v3 = myRandomNum(3, 4); remClipShotgun += v3; openHudInventory('+' + v3 + ' shot gun bullets'); } else { if (this.ver == 3 && !ownShotgun) { v3 = myRandomNum(4, 6); remClipHandgun += v3; openHudInventory('+' + v3 + ' hand gun bullets'); } } if (this.ver == 4 && ownMachinegun) { v3 = myRandomNum(5, 6); remClipMachinegun += v3; openHudInventory('+' + v3 + ' machine gun bullets'); } else { if (this.ver == 4 && !ownMachinegun) { v3 = myRandomNum(4, 6); remClipHandgun += v3; openHudInventory('+' + v3 + ' hand gun bullets'); } } if (this.ver == 5 || this.ver == 6 || this.ver == 7) { v3 = myRandomNum(3, 6) * 10; player_credits += v3; openHudInventory('+' + v3 + ' credits'); _level0.menuscreen.ingame_hud.glow_credits.gotoAndPlay(2); } this.removeMovieClip(); delete this.onEnterFrame; } }; ++v3; } } function mergeObjects(obj, objOverrides) { for (var v3 in objOverrides) { obj[v3] = objOverrides[v3]; } return obj; } function myRandomNum(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } function setLevelZeroes() { doorCount = 0; wallCount = 0; iceCount = 0; storyWallCount = 0; supplyCount = 0; elevatorCount = 0; gateCount = 0; databankCount = 0; chestCount = 0; fumeCount = 0; guardCount = 0; escortCount = 0; computerCount = 0; pflexCount = 0; lootDropperCount = 0; } function createEmptyMovieClips() { _root.createEmptyMovieClip('bg1', _root.getNextHighestDepth()); _root.createEmptyMovieClip('bg2', _root.getNextHighestDepth()); _root.createEmptyMovieClip('bg3', _root.getNextHighestDepth()); _root.createEmptyMovieClip('fg2', _root.getNextHighestDepth()); _root.createEmptyMovieClip('fg3', _root.getNextHighestDepth()); _root.createEmptyMovieClip('fg4', _root.getNextHighestDepth()); _root.createEmptyMovieClip('fg1', _root.getNextHighestDepth()); _root.createEmptyMovieClip('lev', _root.getNextHighestDepth()); _root.createEmptyMovieClip('sp1', _root.getNextHighestDepth()); _root.lev.createEmptyMovieClip('platforms', _root.lev.getNextHighestDepth()); _root.lev.createEmptyMovieClip('walls', _root.lev.getNextHighestDepth()); _root.lev.createEmptyMovieClip('icewalls', _root.lev.getNextHighestDepth()); _root.lev.createEmptyMovieClip('elevator_mc', _root.lev.getNextHighestDepth()); _root.lev.createEmptyMovieClip('objects', _root.lev.getNextHighestDepth()); } function orderLayers() { bg1.swapDepths(100); bg2.swapDepths(200); bg3.swapDepths(300); fg2.swapDepths(320); fg3.swapDepths(650); player.swapDepths(700); lev.swapDepths(680); fg1.swapDepths(600); sp1.swapDepths(1000); weapon_mc.swapDepths(800); fg4.swapDepths(900); lev.platforms._visible = 0; lev.walls._visible = 0; stealthBar.swapDepths(2000); } function selectFloor() { getPlayerPosition('camera', currentLevel); if (currentLevel == 1) { _level0.the_container._y = f0_y; } else { if (currentLevel > 1) { trace('herero= ' + currPlayerPositionY); if (currPlayerPositionY == 181) { _level0.the_container._y = f2_y; } if (currPlayerPositionY == 441) { _level0.the_container._y = f1_y; } if (currPlayerPositionY == 701) { _level0.the_container._y = f0_y; } } } } buildGround = function (elevNumOnFloor, structureStartX, structureEndX) { unitNum = 0; cycleNum = 0; var v2 = 1; while (v2 <= 10) { if (_root.lev.platforms['ctrl' + v2]._y == 1040) { if (_root.lev.platforms['ctrl' + v2] != null) { ++unitNum; _root['groundUnitX' + unitNum] = _root.lev.platforms['ctrl' + v2]._x; _root['groundUnitW' + unitNum] = _root.lev.platforms['ctrl' + v2]._width; } } ++v2; } if (elevNumOnFloor == 0) { createLevelPflex(structureStartX, 780, structureEndX); } else { createLevelPflex(structureStartX, 780, groundUnitX1); } var v3 = 1; while (v3 <= elevNumOnFloor) { ++cycleNum; addOne = cycleNum + 1; if (cycleNum < elevNumOnFloor) { theKey = _root['groundUnitX' + cycleNum] + _root['groundUnitW' + cycleNum]; theKey2 = _root['groundUnitX' + addOne] - theKey; createLevelPflex(theKey, 780, theKey2); } else { if (cycleNum == elevNumOnFloor) { theKey = _root['groundUnitX' + cycleNum] + _root['groundUnitW' + cycleNum]; theKey2 = structureEndX - theKey; createLevelPflex(theKey, 780, theKey2); } } ++v3; } }; buildFloorOne = function (elevNumOnFloor, structureStartX, structureEndX) { unitNum = 0; cycleNum = 0; var v2 = 1; while (v2 <= 10) { if (_root.lev.platforms['ctrl' + v2]._y == 780) { if (_root.lev.platforms['ctrl' + v2] != null) { ++unitNum; _root['floorOneUnitX' + unitNum] = _root.lev.platforms['ctrl' + v2]._x; _root['floorOneUnitW' + unitNum] = _root.lev.platforms['ctrl' + v2]._width; } } ++v2; } if (elevNumOnFloor == 0) { createLevelPflex(structureStartX, 520, structureEndX); } else { createLevelPflex(structureStartX, 520, floorOneUnitX1); } var v3 = 1; while (v3 <= elevNumOnFloor) { ++cycleNum; addOne = cycleNum + 1; if (cycleNum < elevNumOnFloor) { theKey = _root['floorOneUnitX' + cycleNum] + _root['floorOneUnitW' + cycleNum]; theKey2 = _root['floorOneUnitX' + addOne] - theKey; createLevelPflex(theKey, 520, theKey2); } else { if (cycleNum == elevNumOnFloor) { theKey = _root['floorOneUnitX' + cycleNum] + _root['floorOneUnitW' + cycleNum]; theKey2 = structureEndX - theKey; createLevelPflex(theKey, 520, theKey2); } } ++v3; } }; buildFloorTwo = function (elevNumOnFloor, structureStartX, structureEndX) { unitNum = 0; cycleNum = 0; var v2 = 1; while (v2 <= 10) { if (_root.lev.platforms['ctrl' + v2]._y == 520) { if (_root.lev.platforms['ctrl' + v2] != null) { ++unitNum; _root['floorTwoUnitX' + unitNum] = _root.lev.platforms['ctrl' + v2]._x; _root['floorTwoUnitW' + unitNum] = _root.lev.platforms['ctrl' + v2]._width; } } ++v2; } if (elevNumOnFloor == 0) { createLevelPflex(structureStartX, 260, structureEndX); } else { createLevelPflex(structureStartX, 260, floorTwoUnitX1); } var v3 = 1; while (v3 <= elevNumOnFloor) { ++cycleNum; addOne = cycleNum + 1; if (cycleNum < elevNumOnFloor) { theKey = _root['floorTwoUnitX' + cycleNum] + _root['floorTwoUnitW' + cycleNum]; theKey2 = _root['floorTwoUnitX' + addOne] - theKey; createLevelPflex(theKey, 260, theKey2); } else { if (cycleNum == elevNumOnFloor) { theKey = _root['floorTwoUnitX' + cycleNum] + _root['floorTwoUnitW' + cycleNum]; theKey2 = structureEndX - theKey; createLevelPflex(theKey, 260, theKey2); } } ++v3; } }; createLevelPflex = function (xPos, yPos, setwidth) { ++pflexCount; _root.lev.platforms.attachMovie('platf_flex1', 'pflex' + pflexCount, lev.platforms.getNextHighestDepth(), {'_x': xPos, '_y': yPos, '_width': setwidth}); }; createLevelElevator = function (ctrlX, bothY, type, whichPos) { ++elevatorCount; if (type == 'left') { _root.lev.platforms.attachMovie('platf_ctrl2', 'ctrl' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 160, '_height': 30}); _root.lev.platforms.attachMovie('platf_btn2', 'elevBtn' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 60, '_y': bothY, '_width': 40}); _root.fg3.attachMovie('fg_elevator_' + type, 'fg_elevator' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 80, '_y': bothY}); if (whichPos == 'above') { _root.lev.platforms['ctrl' + elevatorCount].gotoAndPlay(80); _root.fg3['fg_elevator' + elevatorCount].gotoAndPlay(80); } } if (type == 'right') { _root.lev.platforms.attachMovie('platf_ctrl2', 'ctrl' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 160, '_height': 30}); _root.lev.platforms.attachMovie('platf_btn2', 'elevBtn' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX + 180, '_y': bothY, '_width': 40}); _root.fg3.attachMovie('fg_elevator_' + type, 'fg_elevator' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 80, '_y': bothY}); if (whichPos == 'above') { _root.lev.platforms['ctrl' + elevatorCount].gotoAndPlay(80); _root.fg3['fg_elevator' + elevatorCount].gotoAndPlay(80); } } if (type == 'hole') { _root.lev.platforms.attachMovie('platf_ctrl2', 'ctrl' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 160, '_height': 0}); _root.fg3.attachMovie('fg_elevator_' + type, 'fg_elevator' + elevatorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 80, '_y': bothY}); } }; createLevelGates = function (gateX, gateY, generatorX, generatorY, dest_playerX, dest_playerY, dest_level) { ++gateCount; _root.lev.objects.attachMovie('fg_gate', 'gate' + gateCount, lev.objects.getNextHighestDepth(), {'_x': gateX, '_y': gateY}); _root.lev.objects.attachMovie('fg_generator', 'generator' + gateCount, lev.objects.getNextHighestDepth(), {'_x': generatorX, '_y': generatorY}); _root.lev.platforms.attachMovie('platf_ctrl2', 'gateCtrl' + gateCount, lev.platforms.getNextHighestDepth(), {'_x': gateX - 70, '_y': gateY, '_width': 140, '_height': 30}); _root.lev.platforms.attachMovie('platf_ctrl2', 'genCtrl' + gateCount, lev.platforms.getNextHighestDepth(), {'_x': generatorX - 80, '_y': generatorY, '_width': 160, '_height': 30}); gateSign = currentLevel + 1; _root.lev.objects['gate' + gateCount].onEnterFrame = function () { if (currentLevel < 9) { this.slidingDoor.sign.text = '0' + gateSign; } else { if (currentLevel >= 9) { this.slidingDoor.sign.text = gateSign; } } }; }; createLevelDoors = function (ctrlX, bothY, type) { ++doorCount; if (type == 'door_leftBtn') { _root.lev.walls.attachMovie('platf_wall2', 'door' + doorCount, lev.walls.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 30, '_height': 240}); _root.lev.platforms.attachMovie('platf_btn2', 'doorBtnL' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 100, '_y': bothY, '_width': 40}); _root.fg3.attachMovie('fg_side_wall_' + type, 'fg_door' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY}); } if (type == 'door_rightBtn') { _root.lev.walls.attachMovie('platf_wall2', 'door' + doorCount, lev.walls.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 30, '_height': 240}); _root.lev.platforms.attachMovie('platf_btn2', 'doorBtnR' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX + 60, '_y': bothY, '_width': 40}); _root.fg3.attachMovie('fg_side_wall_' + type, 'fg_door' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY}); } if (type == 'door' || type == 'door_outside_rightCap' || type == 'door_outside_leftCap') { _root.lev.walls.attachMovie('platf_wall2', 'door' + doorCount, lev.walls.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY, '_width': 30, '_height': 240}); _root.lev.platforms.attachMovie('platf_btn2', 'doorBtnL' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX - 100, '_y': bothY, '_width': 40}); _root.lev.platforms.attachMovie('platf_btn2', 'doorBtnR' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX + 60, '_y': bothY, '_width': 40}); _root.fg3.attachMovie('fg_side_wall_' + type, 'fg_door' + doorCount, lev.platforms.getNextHighestDepth(), {'_x': ctrlX, '_y': bothY}); } }; createLevelIce = function (xPos, yPos, setwidth, type) { ++currentIce; ++iceCount; _root.lev.icewalls.attachMovie('platf_wall1', 'ice' + iceCount, lev.icewalls.getNextHighestDepth(), {'_x': xPos, '_y': yPos, '_width': 30, '_height': 240}); _root.fg4.attachMovie('fg_side_wall_' + type, 'fg_side_wall_ice' + iceCount, fg4.getNextHighestDepth(), {'_x': xPos, '_y': yPos}); _root.lev.icewalls['ice' + iceCount].health = 600; _root.lev.icewalls['ice' + iceCount]._alpha = 0; _root.lev.icewalls['ice' + iceCount].isDead = false; _root.lev.icewalls['ice' + iceCount].fgId = 'fg_side_wall_ice' + iceCount; _root.lev.icewalls['ice' + iceCount].onEnterFrame = function () { if (this.health <= 450 && this.health > 150) { _root.fg4[this.fgId].gotoAndStop(2); } else { if (this.health <= 150 && this.health > 0) { _root.fg4[this.fgId].gotoAndStop(3); } else { if (this.health <= 0) { this.isDead = true; this._width = 0; _root.fg4[this.fgId].gotoAndStop(4); } } } }; }; createLevelWall = function (xPos, yPos, setwidth, type) { ++wallCount; _root.lev.walls.attachMovie('platf_wall1', 'wall' + wallCount, lev.walls.getNextHighestDepth(), {'_x': xPos, '_y': yPos, '_width': setwidth, '_height': 240}); _root.fg4.attachMovie('fg_side_wall_' + type, 'fg_side_wall' + wallCount, fg4.getNextHighestDepth(), {'_x': xPos, '_y': yPos}); }; createLevelBG2 = function () { _root.bg2.attachMovie('bg_mountains', 'bg_mountains1', bg2.getNextHighestDepth(), {'_x': -1280, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains2', bg2.getNextHighestDepth(), {'_x': 0, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains3', bg2.getNextHighestDepth(), {'_x': 1280, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains4', bg2.getNextHighestDepth(), {'_x': 2560, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains5', bg2.getNextHighestDepth(), {'_x': 3840, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains6', bg2.getNextHighestDepth(), {'_x': 5120, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains7', bg2.getNextHighestDepth(), {'_x': 6400, '_y': ground}); _root.bg2.attachMovie('bg_mountains', 'bg_mountains8', bg2.getNextHighestDepth(), {'_x': 7680, '_y': ground}); }; createLevelEscorts = function (theX, theY) { ++escortCount; _root.lev.objects.attachMovie('escort1', 'escort1', lev.objects.getNextHighestDepth(), {'_x': theX, '_y': theY}); _root.lev.objects.escort1._xscale = -100; _root.lev.objects.escort1.health = 200; _root.lev.objects.escort1.scopex = 320; _root.lev.objects.escort1.scopey = 140; _root.lev.objects.escort1.patrol_dist = 160; _root.lev.objects.escort1.patrolTowardRight = true; _root.lev.objects.escort1.patrolTowardLeft = false; _root.lev.objects.escort1.speed = 0; _root.lev.objects.escort1.yspeed = 0; _root.lev.objects.escort1.isDead = false; _root.lev.objects.escort1.found = false; _root.lev.objects.escort1.awake = false; _root.lev.objects.escort1.bloodSplatCount = 0; _root.lev.objects.escort1.onEnterFrame = function () { if (!isPaused) { var v3 = this._x + lev._x; escortPos = this._x; if (playerDirection == 'facingF') { targetPos = player._x - lev._x - 40; } else { if (playerDirection == 'facingB') { targetPos = player._x - lev._x + 40; } } yDifference = (player._y + player._height / 2 - this._y) * -1; xDifference = Math.abs(targetPos - escortPos); if (!this.climbing) { this.yspeed += gravity; } if (this.yspeed > max_yspeed) { this.yspeed = max_yspeed; } this.forecast_y = this._y + this.yspeed; while (_root.lev.platforms.hitTest(v3, this.forecast_y - 1, true)) { --this.forecast_y; this.yspeed = 0; } this._y = this.forecast_y; if (this.isDead == false) { if (this.awake == false && escortPos < targetPos + this.scopex && escortPos > targetPos - this.scopex && player._y <= this._y && player._y > this._y - this.scopey) { this.dangerIcon._visible = 100; this.found = true; this.awake = true; } else { this.dangerIcon._visible = 0; } if (this.awake == true) { herSpeed = scroll_speed * retreat_multiplier; if (targetPos > escortPos + herSpeed && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_right(this) && !elevatorMoving) { if (this._xscale != 100) { this._xscale = 100; this.dangerIcon._xscale = 100; } this._x += herSpeed; this.moving = true; } if (targetPos < escortPos - herSpeed && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_left(this) && !elevatorMoving) { if (this._xscale != -100) { this._xscale = -100; this.dangerIcon._xscale = -100; } this._x -= herSpeed; this.moving = true; } if (xDifference <= herSpeed || (guard_predict_wall_right(this) || guard_predict_wall_left(this)) || elevatorMoving) { this._x += 0; this.moving = false; } else { this.moving = true; } if (yDifference >= 130 || yDifference <= -130) { this.awake = false; this.moving = false; } } if (this.moving == false) { if (this._currentframe != 1) { this.gotoAndPlay(1); } } else { if (this.moving == true) { if (this._currentframe != 2) { this.gotoAndPlay(2); } } } } if (this.health <= 0) { this.isDead = true; if (this._currentframe != 4) { this.gotoAndPlay(4); } } } }; }; createLevelGuards = function (custom_properties, version) { var v5 = {'initx': 0, 'inity': ground, 'scopex': 180, 'scopey': 140, 'patrol_dist': 160, 'patrolTowardRight': true, 'patrolTowardLeft': false, 'speed': 2, 'yspeed': 0, 'version': 1}; var v3 = mergeObjects(v5, custom_properties); v3._x = v3.initx; v3._y = v3.inity; ++guardCount; _root.lev.objects.attachMovie('guard' + v3.version, 'guard' + guardCount, lev.objects.getNextHighestDepth(), v3); if (v3.version == 1) { _root.lev.objects['guard' + guardCount].health = 325; _root.lev.objects['guard' + guardCount].hurtPlayer = 0.75; _root.lev.objects['guard' + guardCount].speed = 4; _root.lev.objects['guard' + guardCount].awakeSpeed = 6; _root.lev.objects['guard' + guardCount].scopex = 320; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].headBlew = false; _root.lev.objects['guard' + guardCount].headOff._visible = false; _root.lev.objects['guard' + guardCount].headExploding._visible = false; _root.lev.objects['guard' + guardCount].ver = 1; } if (v3.version == 2) { _root.lev.objects['guard' + guardCount].health = 500; _root.lev.objects['guard' + guardCount].hurtPlayer = 2; _root.lev.objects['guard' + guardCount].speed = 4; _root.lev.objects['guard' + guardCount].awakeSpeed = 6; _root.lev.objects['guard' + guardCount].scopex = 320; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].ver = 2; } if (v3.version == 3) { _root.lev.objects['guard' + guardCount].health = 200; _root.lev.objects['guard' + guardCount].hurtPlayer = 0.5; _root.lev.objects['guard' + guardCount].speed = 2; _root.lev.objects['guard' + guardCount].awakeSpeed = 8; _root.lev.objects['guard' + guardCount].scopex = 320; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].ver = 3; } if (v3.version == 4) { _root.lev.objects['guard' + guardCount].health = 350; _root.lev.objects['guard' + guardCount].hurtPlayer = 1.5; _root.lev.objects['guard' + guardCount].speed = 0; _root.lev.objects['guard' + guardCount].awakeSpeed = 0; _root.lev.objects['guard' + guardCount].canWalk = false; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].ver = 4; } if (v3.version == 5) { _root.lev.objects['guard' + guardCount].health = 350; _root.lev.objects['guard' + guardCount].hurtPlayer = 1; _root.lev.objects['guard' + guardCount].speed = 1; _root.lev.objects['guard' + guardCount].awakeSpeed = 8; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = true; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].ver = 5; _root.lev.objects['guard' + guardCount].walking.gotoAndPlay(myRandomNum(1, 45)); _root.lev.objects['guard' + guardCount].deadY = false; } if (v3.version == 6) { _root.lev.objects['guard' + guardCount].health = 200; _root.lev.objects['guard' + guardCount].hurtPlayer = 0.5; _root.lev.objects['guard' + guardCount].speed = 0; _root.lev.objects['guard' + guardCount].awakeSpeed = 8; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = true; _root.lev.objects['guard' + guardCount].ver = 6; _root.lev.objects['guard' + guardCount]._alpha = 0; _root.lev.objects['guard' + guardCount].exposed = false; } if (v3.version == 7) { _root.lev.objects['guard' + guardCount].health = 325; _root.lev.objects['guard' + guardCount].hurtPlayer = 0.75; _root.lev.objects['guard' + guardCount].speed = 0; _root.lev.objects['guard' + guardCount].awakeSpeed = 6; _root.lev.objects['guard' + guardCount].scopex = 320; _root.lev.objects['guard' + guardCount].canWalk = true; _root.lev.objects['guard' + guardCount].canFly = false; _root.lev.objects['guard' + guardCount].canHide = false; _root.lev.objects['guard' + guardCount].ver = 7; } randPatrolDir = myRandomNum(1, 2); if (randPatrolDir == 1) { _root.lev.objects['guard' + guardCount].patrolTowardRight = true; _root.lev.objects['guard' + guardCount].patrolTowardLeft = false; } else { if (randPatrolDir == 2) { _root.lev.objects['guard' + guardCount].patrolTowardRight = false; _root.lev.objects['guard' + guardCount].patrolTowardLeft = true; } } _root.lev.objects['guard' + guardCount].isDead = false; _root.lev.objects['guard' + guardCount].heardShot = false; _root.lev.objects['guard' + guardCount].awake = false; _root.lev.objects['guard' + guardCount].bloodSplatCount = 0; _root.lev.objects['guard' + guardCount].randomLootCount = 0; if (_root.lev.objects['guard' + guardCount].speed > 0) { _root.lev.objects['guard' + guardCount].moving = true; } if (_root.lev.objects['guard' + guardCount].speed == 0) { _root.lev.objects['guard' + guardCount].moving = false; } _root.lev.objects['guard' + guardCount].fullHealth = _root.lev.objects['guard' + guardCount].health; _root.lev.objects['guard' + guardCount].lastHealth = _root.lev.objects['guard' + guardCount].fullHealth; _root.lev.objects['guard' + guardCount].onEnterFrame = function () { if (!isPaused) { var v3 = lev._x + this._x; enemyPos = this._x; playerPos = player._x - lev._x; yDifference = (player._y + player._height / 2 - this._y) * -1; xDifference = Math.abs(playerPos - enemyPos); if (this.canWalk) { if (!this.climbing) { this.yspeed += gravity; } if (this.yspeed > max_yspeed) { this.yspeed = max_yspeed; } this.forecast_y = this._y + this.yspeed; while (_root.lev.platforms.hitTest(v3, this.forecast_y - 1, true)) { --this.forecast_y; this.yspeed = 0; } this._y = this.forecast_y; } if (this.awake == false && this.canWalk == true && this.isDead == false) { if (this.patrolTowardRight == true) { if (this._xscale != 100) { this._xscale = 100; this.dangerIcon._xscale = 100; } this._x -= this.speed; if (this.speed > 0) { this.moving = true; } else { if (this.speed == 0) { this.moving = false; } } if (this._x < this.initx - this.patrol_dist) { this.patrolTowardRight = false; this.patrolTowardLeft = true; } } if (this.patrolTowardLeft == true) { if (this._xscale != -100) { this._xscale = -100; this.dangerIcon._xscale = -100; } this._x += this.speed; if (this.speed > 0) { this.moving = true; } else { if (this.speed == 0) { this.moving = false; } } if (this._x > this.initx + this.patrol_dist) { this.patrolTowardRight = true; this.patrolTowardLeft = false; } } } if (this.isDead == false) { if (this.awake == false && enemyPos < playerPos + this.scopex && enemyPos > playerPos - this.scopex && player._y <= this._y && player._y > this._y - this.scopey) { this.dangerIcon._visible = 100; audioWalkerAttack = new Sound(soundEffects); if (this.ver == 1 || this.ver == 2 || this.ver == 7) { audioWalkerAttack.attachSound('audio_WalkerAttack'); } else { if (this.ver == 3 || this.ver == 5) { audioWalkerAttack.attachSound('audio_CrawlerAttack'); } } audioWalkerAttack.start(); this.awake = true; } else { this.dangerIcon._visible = 0; } if (this.health < this.lastHealth) { this.awake = true; } if (this.heardShot == true) { this.awake = true; } if (this.awake == true) { if (!this.canHide) { if (playerPos > enemyPos + myRandomNum(40, 80) && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_right(this)) { if (this._xscale != -100) { this._xscale = -100; this.dangerIcon._xscale = -100; } this._x += this.awakeSpeed; this.moving = true; } if (playerPos < enemyPos - myRandomNum(40, 80) && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_left(this)) { if (this._xscale != 100) { this._xscale = 100; this.dangerIcon._xscale = 100; } this._x -= this.awakeSpeed; this.moving = true; } if (enemyPos == playerPos) { this._x += 0; } if (yDifference >= 130 || yDifference <= -130) { this.awake = false; this.heardShot = false; this.lastHealth = this.health; } } if (this.canHide) { if (!this.exposed) { this.moving = null; if (this._currentframe != 5) { this._alpha = 100; this.gotoAndPlay(5); this.surprise.gotoAndPlay(myRandomNum(1, 30)); } if (this.surprise._currentframe == 60) { this.exposed = true; } } else { if (this.exposed) { if (playerPos > enemyPos + myRandomNum(40, 80) && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_right(this)) { if (this._xscale != -100) { this._xscale = -100; this.dangerIcon._xscale = -100; } this._x += this.awakeSpeed; this.moving = true; } if (playerPos < enemyPos - myRandomNum(40, 80) && (yDifference < 130 && yDifference > -130) && !guard_predict_wall_left(this)) { if (this._xscale != 100) { this._xscale = 100; this.dangerIcon._xscale = 100; } this._x -= this.awakeSpeed; this.moving = true; } if (enemyPos == playerPos) { this._x += 0; } if (yDifference >= 130 || yDifference <= -130) { this.awake = false; this.heardShot = false; this.lastHealth = this.health; } } } } } if (predict_this_guard_touching(this) || yDifference < 130 && yDifference > -130 && xDifference <= 40 && this.exposed) { if (!this.canFly) { if (this._currentframe != 3) { this.gotoAndPlay(3); } } if (!guard_predict_wall_left(this) && !guard_predict_wall_right(this) && player_health > 0) { player_health -= this.hurtPlayer; damageOverlay(player_health); } } else { if (this.moving == true) { if (this._currentframe != 2) { this.gotoAndPlay(2); } } else { if (this.moving == false) { if (this._currentframe != 1) { this.gotoAndPlay(1); } } } } } if (this.health <= 0) { this.isDead = true; if (this.canFly) { if (this.deadY == false) { if (this.walking._currentframe <= 30) { this._y -= this.walking._currentframe * 6; } else { if (this.walking._currentframe >= 31) { this._y -= 60; } } this.deadY = true; } } if (this.ver == 7) { if (this.dead._currentframe == 21) { if (xDifference < 220 && (yDifference < 130 && yDifference > -130)) { player_health -= 25; damageOverlay(player_health); } } } if (!this.headBlew && this.ver == 1 && this._currentframe != 4) { this.gotoAndPlay(4); audioWalkerDyingShort = new Sound(soundEffects); audioWalkerDyingShort.attachSound('audio_walkerDyingShort'); audioWalkerDyingShort.start(); } if (this.headBlew && this.ver == 1 && this._currentframe != 5) { this.gotoAndPlay(5); audioWalkerDyingShort = new Sound(soundEffects); audioWalkerDyingShort.attachSound('audio_walkerDyingShort'); audioWalkerDyingShort.start(); } if (this._currentframe != 4 && this.ver != 1) { this.gotoAndPlay(4); if (this.ver == 3 || this.ver == 5 || this.ver == 6) { audioCrawlerDying = new Sound(soundEffects); audioCrawlerDying.attachSound('audio_crawlerDying'); audioCrawlerDying.start(); } if (this.ver == 4) { audioWalkerDying = new Sound(soundEffects); audioWalkerDying.attachSound('audio_walkerDying'); audioWalkerDying.start(); } } if (this.dead._currentframe == 60 || this.dead2._currentframe == 60) { this.removeMovieClip(); } if (this.randomLootCount == 0) { ++lootDropperCount; if (ownShotgun && ownMachinegun) { createRandomLoot(this, myRandomNum(1, 2), lootDropperCount); } else { if (ownShotgun && !ownMachinegun || !ownShotgun && ownMachinegun) { createRandomLoot(this, myRandomNum(1, 2), lootDropperCount); } else { if (!ownShotgun && !ownMachinegun) { createRandomLoot(this, myRandomNum(1, 1), lootDropperCount); } } } } } } }; }; createLevelChests = function (custom_properties) { var v6 = {'initx': 0, 'inity': ground}; var v3 = mergeObjects(v6, custom_properties); v3._x = v3.initx; v3._y = v3.inity; ++chestCount; _root.lev.objects.attachMovie('chest', 'chest' + chestCount, lev.objects.getNextHighestDepth(), v3); _root.lev.objects['chest' + chestCount].onEnterFrame = function () { if ((this.hitTest(forecast_x - 16, forecast_y, true) || this.hitTest(forecast_x + 16, forecast_y, true)) && walking) { audioItemPickup = new Sound(soundEffects); audioItemPickup.attachSound('item_pickup'); audioItemPickup.start(); var v3 = myRandomNum(1, 2) * 10; player_health += v3; openHudInventory('+' + v3 + ' health'); _level0.menuscreen.ingame_hud.glow_health.gotoAndPlay(2); var v2 = myRandomNum(7, 9) * 10; player_credits += v2; openHudInventory('+' + v2 + ' credits'); _level0.menuscreen.ingame_hud.glow_credits.gotoAndPlay(2); this.removeMovieClip(); delete this.onEnterFrame; } }; }; createWorkStations = function (xPos, yPos) { ++computerCount; _root.lev.platforms.attachMovie('platf_btn2', 'computerCtrl' + computerCount, lev.platforms.getNextHighestDepth(), {'_width': 160, '_x': xPos - 80, '_y': yPos}); _root.fg3.attachMovie('fg_computer', 'fg_computer' + computerCount, _root.fg3.getNextHighestDepth(), {'_x': xPos, '_y': yPos}); }; createSupplyLockers = function (xPos, yPos) { ++supplyCount; _root.lev.platforms.attachMovie('platf_btn2', 'supplyCtrl' + supplyCount, lev.platforms.getNextHighestDepth(), {'_width': 160, '_x': xPos - 80, '_y': yPos}); _root.fg3.attachMovie('supplyLocker', 'supplyLocker' + supplyCount, _root.fg3.getNextHighestDepth(), {'_x': xPos, '_y': yPos}); }; createLevelDatabanks = function (xPos, yPos, ver) { ++databankCount; _root.lev.platforms.attachMovie('platf_btn2', 'databankCtrl' + databankCount, lev.platforms.getNextHighestDepth(), {'_width': 80, '_x': xPos - 40, '_y': yPos}); _root.fg3.attachMovie('fg_databank' + ver, 'databank' + databankCount, _root.fg3.getNextHighestDepth(), {'_x': xPos, '_y': yPos}); _root.fg3['databank' + databankCount].currState = 'off'; databanksTotal = databankCount; }; createLevelFumes = function (custom_properties) { var v4 = {'initx': 0, 'inity': ground}; var v3 = mergeObjects(v4, custom_properties); v3._x = v3.initx; v3._y = v3.inity; ++fumeCount; _root.fg4.attachMovie('fg_fume', 'fume' + fumeCount, fg4.getNextHighestDepth(), v3); _root.fg4['fume' + fumeCount].onEnterFrame = function () { if ((this.hitTest(forecast_x, forecast_y + _root.player._height / 2 - 1, true) || this.hitTest(forecast_x - _root.player._width / 2 + 1, forecast_y, true) || this.hitTest(forecast_x + _root.player._width / 2, forecast_y, true)) && !deadScreenBg._visible) { if (player_health > 0) { player_health -= 0.2; damageOverlay(player_health); } } }; }; } frame 1 { function createStoryWalls(xPos, yPos) { ++storyWallCount; _root.lev.objects.attachMovie('storyWall', 'storyWall' + storyWallCount, lev.objects.getNextHighestDepth(), {'_x': xPos, '_y': yPos, '_width': 30, '_height': 240}); _root.lev.objects['storyWall' + storyWallCount].objId = 'storyWall' + storyWallCount; _root.lev.objects['storyWall' + storyWallCount].onEnterFrame = function () { if (this.hitTest(forecast_x - 16, forecast_y, true) || this.hitTest(forecast_x + 16, forecast_y, true)) { var v2 = currentLevel + '-' + this.objId; openStoryPopup(v2); this.removeMovieClip(); } }; } function openStoryPopup(whichPop) { walking = false; tellingStory = true; pauseGame('noCtrl'); _level0.menuscreen.ingame_hud.storyPopup.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('storyPopup', 'storyPopup', _level0.menuscreen.ingame_hud.getNextHighestDepth(), {'_x': 846, '_y': 24}); countIt = 0; diagDuration = 300; switch (whichPop) { case 'demoEnded': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'Congratulations! You\'ve completed the demo!'; break; case 'gateWarning': castWho = 'cast_kyle'; countLines = 1; currDiag = 1; showDiag1 = 'I must find all the datadisks before leaving!'; break; case 'ashleyWarning': castWho = 'cast_ashley'; countLines = 1; currDiag = 1; showDiag1 = 'Hey! Don\'t leave me behind!'; break; case '1-storyWall1': castWho = 'cast_sanger'; countLines = 3; currDiag = 1; showDiag1 = 'Kyle!? Finally, you\'re awake! Your plane crash-landed and you sustained severe head trauma. I found you in the wreckage and brought you here.'; showDiag2 = 'You have no memory of what happened? Don\'t you recognise my voice? My name is Dr. Greg Sanger. I\'m the head scientist at this facility.'; showDiag3 = 'We\'re in research facility Z. I know you must have a lot of questions, but we have no time. I\'m in Sector 7, join me and I\'ll explain everything.'; break; case '1-storyWall2': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'I left you a pistol and some ammo. Find a supply locker to buy more ammo and other weapons.'; break; case '1-storyWall3': castWho = 'cast_sanger'; countLines = 2; currDiag = 1; showDiag1 = 'Here\'s the exit to the next sector. But the facility has switched to auxiliary power after the main core broke down...'; showDiag2 = 'Find and turn on the backup generator to power the door.'; break; case '1-storyWall4': castWho = 'cast_sanger'; countLines = 2; currDiag = 1; showDiag1 = 'Noooo! Dr. Kerry! That... that monster, it was one of the infected... the situation is worst than I thought.'; showDiag2 = 'You must help me find all the research data. Search his body for a datadisk.'; break; case '1-storyWall5': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'Yes! You\'ve found a data storage unit. Maybe we can contain this outbreak. Gather all the datadisks you can find!'; break; case '1-storyWall6': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'There\'s the generator. Turn it on to power the gate to Sector 2.'; break; case '2-storyWall1': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'You\'ve found a supply locker. You can use it to purchase ammo, health upgrades, and new weapons.'; break; case '3-storyWall1': castWho = 'cast_sanger'; countLines = 1; currDiag = 1; showDiag1 = 'Looks like the storm has died down. If we can reach Sector 12, there should be another cargo plane we can use to evacuate this place.'; break; case '4-storyWall1': castWho = 'cast_sanger'; countLines = 2; currDiag = 1; showDiag1 = 'My god! They\'ve started to mutate! This is extraordinary. Kyle, you must hurry... we must stop this before it is too late.'; showDiag2 = 'Beyond that gate are the underground levels of our research lab. Proceed with caution, I fear the worst may lie ahead...'; break; case '6-storyWall1': castWho = 'cast_sanger'; countLines = 2; currDiag = 1; showDiag1 = 'Kyle, you must hurry to Sector 7! My position has been compromised... I don\'t know how long I can stay here.'; showDiag2 = 'Argh! Stay back you foul beast! I cannot stay here any longer... I\'m making a run for Sector 12... god help us...'; break; case '10-storyWall1': castWho = 'cast_ashley'; countLines = 5; currDiag = 1; showDiag1 = 'Is someone out there?! Wait! Please help me... I\'ve been trapped in here for 2 days! I\'m a lab assistant... my name is Ashley Young.'; showDiag2 = 'Sanger?! Of course I know him! He\'s the one who locked me in here! That madman is the reason behind this whole disaster.'; showDiag3 = 'His experimentation with human tissue engineering was getting out of hand! He became obsessed with insect DNA...'; showDiag4 = 'His experiments were cruel. When I learned that he was kidnapping live human subjects I threatened to walk away... that\'s when he locked me in here!'; showDiag5 = 'You have to believe me, we need to warn the outside world before it\'s too late. Please... we can call for help from the communications center in Sector 11.'; break; case '11-storyWall1': castWho = 'cast_ashley'; countLines = 3; currDiag = 1; showDiag1 = 'Here\'s the communications console! I\'m going to try and send a message to nearby McMurdo base. We have to tell them what\'s going on here.'; showDiag2 = 'Noooo... it\'s not working... someone has jammed the signal! It\'s useless, I can\'t establish a transmission.'; showDiag3 = 'It must be Sanger. We have no choice, we have to head to the airfield... you\'ll have to fly us out of here.'; break; case '12-storyWall1': castWho = 'cast_sanger'; countLines = 5; currDiag = 1; showDiag1 = 'Kyle, I\'m so glad you made it. Now we can finish the work we started together!'; showDiag2 = 'Without you I could never have retrieved all those crucial datadisks. You see, that was my only miscalculation...'; showDiag3 = 'I could not abide a rebellion amidst my research team, so I squashed it by setting free the mutated test subjects. A little purge if you will...'; showDiag4 = 'But those dumb beasts damaged the data network and the only way to get my research back was to find each individual datadisk.'; showDiag5 = 'So you see, your arrival was a godsend! I knew I could count on you Kyle... like I always have...'; } countEnd = diagDuration * countLines; _level0.menuscreen.ingame_hud.storyPopup.onEnterFrame = function () { _level0.menuscreen.ingame_hud.storyPopup.storyWallContent.portrait.attachMovie(castWho, 'castMember', this.getNextHighestDepth(), {'_x': 0, '_y': 0}); writeDiag(currDiag); if (currDiag < countLines) { if (this.storyWallContent.storyMask._currentframe == diagDuration) { ++currDiag; this.storyWallContent.storyMask.gotoAndPlay(1); } } this.storyWallContent.onRollOver = function () { cantFire = true; }; this.storyWallContent.onRollOut = function () { cantFire = false; }; this.storyWallContent.onRelease = function () { if (currDiag <= countLines) { _level0.menuscreen.ingame_hud.storyPopup.storyWallContent.storyMask.gotoAndStop(diagDuration); } }; if (currDiag == countLines) { if (this.storyWallContent.storyMask._currentframe == diagDuration) { if (this._currentframe == 15) { this.gotoAndPlay(16); } if (this._currentframe == 30) { this.removeMovieClip(); cantFire = false; tellingStory = false; pauseGame(); if (whichPop == '1-storyWall1') { openTutorialPopup(1); } if (whichPop == '12-storyWall1') { resetGame(); playOutro(); } } } } }; } function writeDiag(whichDiag) { _level0.menuscreen.ingame_hud.storyPopup.storyWallContent.storyPopupText.htmlText = this['showDiag' + whichDiag]; } } frame 1 { function openWorkStationMenu(whichStation) { readingLog = true; pauseGame('noCtrl'); _level0.menuscreen.ingame_hud.storyPopup.removeMovieClip(); _level0.menuscreen.ingame_hud.attachMovie('workStationMenu', 'workStationMenu', _level0.menuscreen.ingame_hud.getNextHighestDepth(), {'_x': 0, '_y': 0}); playSFX('btn_open-close'); cantFire = true; var v2 = currentLevel + '-' + whichStation; switch (v2) { case '1-1': showLog = 'DR. JAMES KERRY<br>Research Assistant<br><br>So many tests, so little time. Dr. Sanger believes we are on the brink of a breakthrough. We have to stay focused and continue. We can\'t dwell on the past now.'; break; case '2-1': showLog = 'KENNY KATAHASHI<br>Supply Manager<br><br>I think I\'m getting the raw end of the deal. Why am I taking all the risks stashing this equipment for a 50% share?<br><br>I need to renegotiate before he comes back. I can\'t let him bully me around anymore.<br><br>Note to self: I stashed the loot on the west end of this floor.'; break; case '3-1': showLog = 'DR. CLIVE MCGREGOR<br>Research Assistant<br><br>Do they really expect this to work? How can we get away with this?<br><br>Sanger is brilliant and our research is vital. I have to remember that. I MUST remember that...'; break; case '5-1': showLog = 'DANIEL KEPLER<br>Technician<br><br>We had another exhaust leak today. Goddamn station is breaking down all over the place. But all these scientists can think about are their stupid experiments.<br><br>And those screams I heard last night... I know they came from the secure zone. Who the hell knows what those crazies are doing down there.<br><br>I have to find a way out of here.'; break; case '6-1': showLog = 'DANIEL KEPLER<br>Technician<br><br>What a mess! Another gas leak... this time right by the backup generator.<br><br>I should add that to my to-do list before I forget.'; break; case '7-1': showLog = 'KENNY TAKAHASHI<br>Supply Manager<br><br>Sanger\'s up to something... I know it. And what\'s that smug pilot doing here in the lower secure sectors?<br><br>Never trusted that no good hustler...'; break; case '8-1': showLog = 'DR. ASHLEY YOUNG<br>Research Assistant<br><br>The latest results show that the human cell cultivation and proliferation is going as well as could be expected. But they have now asked me to inject an unknown stem cell into the chain.<br><br>I\'m afraid of what might happen if I start asking questions...<br><br>I no longer trust my coworkers.'; break; case '10-1': showLog = 'DR. ASHLEY YOUNG<br>Research Assistant<br><br>I can\'t let this continue. If no one else is willing to take a stand I will confront Sanger alone.<br><br>I have to find out the truth.'; break; case '10-2': showLog = 'DANIEL KEPLER<br>Technician<br><br>Their pushing the systems way too hard! Mark my words we will blow the main power core and I\'m gonna have to turn on the backup generators one by one.'; } _level0.menuscreen.ingame_hud.workStationMenu.log_text.htmlText = showLog; _level0.menuscreen.ingame_hud.workStationMenu.onEnterFrame = function () { this.btn_close.onRelease = function () { _level0.menuscreen.ingame_hud.workStationMenu.removeMovieClip(); cantFire = false; playSFX('btn_open-close'); readingLog = false; pauseGame(); }; }; } } frame 1 { function loadLevel1() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(3280, ground, 'left', 'default'); createLevelElevator(4560, ground, 'left', 'above'); createLevelElevator(80, floorOne, 'right', 'above'); createLevelElevator(4880, floorOne, 'right', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(2, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(4480, floorOne, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(2560, ground, 'door'); createLevelDoors(3840, ground, 'door_rightBtn'); createLevelDoors(640, floorOne, 'door'); createLevelDoors(2560, floorOne, 'door'); createLevelDoors(640, floorTwo, 'door'); createLevelDoors(2560, floorTwo, 'door'); createLevelDoors(3200, floorTwo, 'door'); createStoryWalls(230, ground); createStoryWalls(1280, ground); createStoryWalls(2880, ground); createStoryWalls(1900, floorOne); createStoryWalls(1160, floorTwo); createStoryWalls(4480, floorTwo); createWorkStations(1440, floorOne); createLevelDatabanks(1760, floorOne, 3); createLevelDatabanks(1280, floorTwo, 1); createLevelGates(3040, ground, 4640, floorTwo); var v4 = [{'initx': 4320, 'inity': floorOne}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 1920, 'inity': floorOne, 'version': 1}, {'initx': 320, 'inity': floorTwo, 'version': 3}, {'initx': 2240, 'inity': floorTwo, 'version': 1}, {'initx': 4000, 'inity': floorTwo, 'version': 3}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.lev.objects.attachMovie('special_firsthandgun', 'special_firsthandgun', lev.objects.getNextHighestDepth(), {'_x': 1440, '_y': ground - 108}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall2', lev.objects.getNextHighestDepth(), {'_x': 640, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall3', lev.objects.getNextHighestDepth(), {'_x': 680, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall4', lev.objects.getNextHighestDepth(), {'_x': 1260, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall5', lev.objects.getNextHighestDepth(), {'_x': 1480, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall6', lev.objects.getNextHighestDepth(), {'_x': 2080, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall7', lev.objects.getNextHighestDepth(), {'_x': 2240, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall8', lev.objects.getNextHighestDepth(), {'_x': 3200, '_y': floorOne}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall9', lev.objects.getNextHighestDepth(), {'_x': 1820, '_y': floorOne}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall10', lev.objects.getNextHighestDepth(), {'_x': 1420, '_y': floorOne}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel2() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(400, ground, 'right', 'default'); createLevelElevator(2640, ground, 'left', 'above'); createLevelElevator(4560, ground, 'right', 'above'); createLevelElevator(80, floorOne, 'right', 'above'); createLevelElevator(4880, floorOne, 'left', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(4480, ground, 30, 'full'); createLevelWall(640, floorOne, 30, 'full'); createLevelWall(1280, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(1920, ground, 'door'); createLevelDoors(3200, ground, 'door'); createLevelDoors(1920, floorOne, 'door'); createLevelDoors(3840, floorOne, 'door'); createLevelDoors(640, floorTwo, 'door'); createLevelDoors(1920, floorTwo, 'door'); createLevelDoors(3200, floorTwo, 'door'); createStoryWalls(3700, floorTwo); createSupplyLockers(1120, ground); createSupplyLockers(3840, floorTwo); createWorkStations(1600, floorTwo); createLevelDatabanks(1280, ground, 3); createLevelDatabanks(4560, floorTwo, 1); createLevelGates(4960, ground, 4320, ground); var v4 = [{'initx': 800, 'inity': floorOne}, {'initx': 880, 'inity': floorTwo - 38}, {'initx': 1040, 'inity': floorTwo - 38}, {'initx': 880, 'inity': floorTwo - 109}, {'initx': 1040, 'inity': floorTwo - 109}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 2240, 'inity': ground, 'version': 4}, {'initx': 2160, 'inity': ground, 'version': 6}, {'initx': 2320, 'inity': ground, 'version': 6}, {'initx': 2720, 'inity': floorOne, 'version': 1}, {'initx': 4160, 'inity': floorOne, 'version': 3}, {'initx': 960, 'inity': floorTwo, 'version': 1}, {'initx': 2240, 'inity': floorTwo, 'version': 1}, {'initx': 4440, 'inity': floorTwo, 'version': 1}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel3() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(1040, ground, 'left', 'default'); createLevelElevator(3920, ground, 'left', 'above'); createLevelElevator(1360, floorOne, 'left', 'default'); createLevelElevator(3600, floorOne, 'right', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(2, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(1920, floorTwo, 30, 'full'); createLevelWall(3200, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(640, ground, 'door'); createLevelDoors(1920, ground, 'door_outside_rightCap'); createLevelDoors(3200, ground, 'door_outside_leftCap'); createLevelDoors(4480, ground, 'door'); createLevelDoors(640, floorOne, 'door'); createStoryWalls(2560, ground); createSupplyLockers(160, floorOne); createWorkStations(880, floorTwo); createLevelDatabanks(2560, floorOne, 2); createLevelDatabanks(4800, floorTwo, 1); createLevelGates(4960, ground, 3360, floorTwo); var v4 = [{'initx': 480, 'inity': ground}, {'initx': 2560, 'inity': ground}, {'initx': 4960, 'inity': floorOne}, {'initx': 160, 'inity': floorTwo - 38}, {'initx': 160, 'inity': floorTwo - 109}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 1580, 'inity': ground, 'version': 6}, {'initx': 1620, 'inity': ground, 'version': 6}, {'initx': 3680, 'inity': ground, 'version': 1}, {'initx': 2560, 'inity': floorOne, 'version': 1}, {'initx': 3520, 'inity': floorOne, 'version': 1}, {'initx': 600, 'inity': floorTwo, 'version': 3}, {'initx': 800, 'inity': floorTwo, 'version': 3}, {'initx': 4400, 'inity': floorTwo, 'version': 6}, {'initx': 4480, 'inity': floorTwo, 'version': 4}, {'initx': 4560, 'inity': floorTwo, 'version': 6}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel4() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(400, ground, 'left', 'default'); createLevelElevator(2000, ground, 'left', 'above'); createLevelElevator(4560, ground, 'right', 'above'); createLevelElevator(80, floorOne, 'right', 'default'); createLevelElevator(4880, floorOne, 'left', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(640, ground, 30, 'full'); createLevelWall(4480, ground, 30, 'full'); createLevelWall(640, floorTwo, 30, 'full'); createLevelWall(4480, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createStoryWalls(4800, ground); createSupplyLockers(480, floorTwo); createLevelDatabanks(3840, floorOne, 2); createLevelGates(4960, ground, 4640, floorTwo); var v4 = [{'initx': 800, 'inity': ground}, {'initx': 4320, 'inity': ground}, {'initx': 1600, 'inity': floorOne}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 3700, 'inity': ground, 'version': 6}, {'initx': 3900, 'inity': ground, 'version': 6}, {'initx': 1280, 'inity': floorOne, 'version': 1}, {'initx': 1600, 'inity': floorOne, 'version': 1}, {'initx': 1700, 'inity': floorOne, 'version': 6}, {'initx': 1780, 'inity': floorOne, 'version': 6}, {'initx': 2560, 'inity': floorOne, 'version': 1}, {'initx': 3960, 'inity': floorOne, 'version': 7}, {'initx': 3840, 'inity': floorOne, 'version': 3}, {'initx': 4640, 'inity': floorTwo, 'version': 7}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = [{'initx': 2400, 'inity': floorOne}, {'initx': 2560, 'inity': floorOne}, {'initx': 2720, 'inity': floorOne}]; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel5() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(1040, ground, 'right', 'above'); createLevelElevator(2000, ground, 'right', 'above'); createLevelElevator(3600, ground, 'left', 'default'); createLevelElevator(4880, ground, 'left', 'above'); createLevelElevator(2320, floorOne, 'left', 'above'); createLevelElevator(3280, floorOne, 'right', 'default'); createLevelElevator(4560, floorOne, 'right', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(4, 0, levelEndX); buildFloorTwo(3, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(1920, ground, 30, 'full'); createLevelWall(2560, floorOne, 30, 'full'); createLevelWall(3200, floorOne, 30, 'full'); createLevelWall(3840, floorOne, 30, 'full'); createLevelWall(4480, floorOne, 30, 'full'); createLevelWall(3840, floorTwo, 30, 'full'); createLevelWall(4480, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(640, ground, 'door'); createLevelDoors(3200, ground, 'door_leftBtn'); createLevelDoors(640, floorOne, 'door'); createLevelDoors(1280, floorTwo, 'door'); createSupplyLockers(4160, ground); createWorkStations(960, floorTwo); createLevelDatabanks(2800, ground, 1); createLevelDatabanks(320, floorTwo, 1); createLevelGates(160, ground, 1760, ground); var v4 = [{'initx': 2480, 'inity': ground - 38}, {'initx': 160, 'inity': floorOne - 38}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 480, 'inity': ground, 'version': 4}, {'initx': 1600, 'inity': ground, 'version': 1}, {'initx': 3520, 'inity': ground, 'version': 5}, {'initx': 1520, 'inity': floorOne, 'version': 6}, {'initx': 1600, 'inity': floorOne, 'version': 6}, {'initx': 1680, 'inity': floorOne, 'version': 6}, {'initx': 640, 'inity': floorTwo, 'version': 1}, {'initx': 1920, 'inity': floorTwo, 'version': 1}, {'initx': 2560, 'inity': floorTwo, 'version': 5}, {'initx': 2400, 'inity': floorTwo, 'version': 5}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel6() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(80, ground, 'right', 'above'); createLevelElevator(720, ground, 'right', 'default'); createLevelElevator(2640, ground, 'right', 'default'); createLevelElevator(400, floorOne, 'left', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(1, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(640, floorOne, 30, 'full'); createLevelWall(1280, floorOne, 30, 'full'); createLevelWall(2560, floorOne, 30, 'full'); createLevelWall(3200, floorOne, 30, 'full'); createLevelWall(640, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelIce(1280, ground, 30, 'ice'); createLevelIce(1920, ground, 30, 'ice'); createLevelIce(3200, ground, 30, 'ice'); createLevelIce(3840, ground, 30, 'ice'); createStoryWalls(4800, ground); createSupplyLockers(1120, floorOne); createLevelDatabanks(4480, ground, 2); createLevelGates(4960, ground, 3040, floorOne); var v4 = [{'initx': 480, 'inity': ground}, {'initx': 1600, 'inity': ground}, {'initx': 3520, 'inity': ground}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 640, 'inity': ground, 'version': 1}, {'initx': 1560, 'inity': ground, 'version': 7}, {'initx': 1640, 'inity': ground, 'version': 5}, {'initx': 2200, 'inity': ground, 'version': 7}, {'initx': 2280, 'inity': ground, 'version': 5}, {'initx': 3480, 'inity': ground, 'version': 5}, {'initx': 3600, 'inity': ground, 'version': 1}, {'initx': 4540, 'inity': ground, 'version': 6}, {'initx': 4640, 'inity': ground, 'version': 4}, {'initx': 4740, 'inity': ground, 'version': 6}, {'initx': 4800, 'inity': ground, 'version': 5}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall11', lev.objects.getNextHighestDepth(), {'_x': 1040, '_y': ground}); _root.lev.objects.attachMovie('tutorialWall', 'tutorialWall12', lev.objects.getNextHighestDepth(), {'_x': 1280, '_y': ground}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel7() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(400, ground, 'left', 'default'); createLevelElevator(720, ground, 'right', 'default'); createLevelElevator(1360, ground, 'right', 'above'); createLevelElevator(1040, floorOne, 'left', 'default'); createLevelElevator(4880, floorOne, 'left', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(1280, ground, 30, 'full'); createLevelWall(640, floorOne, 30, 'full'); createLevelWall(1280, floorOne, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(1920, ground, 'door'); createLevelDoors(3840, ground, 'door'); createLevelDoors(4480, floorOne, 'door'); createLevelDoors(640, floorTwo, 'door'); createLevelDoors(1920, floorTwo, 'door'); createLevelDoors(4480, floorTwo, 'door'); createSupplyLockers(3360, ground); createSupplyLockers(2880, floorTwo); createWorkStations(2480, floorTwo); createLevelDatabanks(3200, floorOne, 3); createLevelDatabanks(320, floorTwo, 1); createLevelDatabanks(3200, floorTwo, 2); createLevelGates(4960, ground, 160, floorOne); var v4 = [{'initx': 1600, 'inity': floorTwo}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 640, 'inity': ground, 'version': 6}, {'initx': 2560, 'inity': ground, 'version': 5}, {'initx': 2880, 'inity': ground, 'version': 5}, {'initx': 3040, 'inity': ground, 'version': 3}, {'initx': 1600, 'inity': floorOne, 'version': 1}, {'initx': 2240, 'inity': floorOne, 'version': 5}, {'initx': 2560, 'inity': floorOne, 'version': 5}, {'initx': 3500, 'inity': floorOne, 'version': 7}, {'initx': 4160, 'inity': floorOne, 'version': 3}, {'initx': 280, 'inity': floorTwo, 'version': 6}, {'initx': 480, 'inity': floorTwo, 'version': 6}, {'initx': 3380, 'inity': floorTwo, 'version': 5}, {'initx': 3460, 'inity': floorTwo, 'version': 5}, {'initx': 3600, 'inity': floorTwo, 'version': 5}, {'initx': 3840, 'inity': floorTwo, 'version': 7}, {'initx': 4080, 'inity': floorTwo, 'version': 5}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel8() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(400, ground, 'left', 'default'); createLevelElevator(1680, ground, 'left', 'above'); createLevelElevator(3280, ground, 'right', 'above'); createLevelElevator(2320, floorOne, 'left', 'default'); createLevelElevator(2640, floorOne, 'right', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(2, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(640, ground, 30, 'full'); createLevelWall(1280, ground, 30, 'full'); createLevelWall(1920, ground, 30, 'full'); createLevelWall(3200, ground, 30, 'full'); createLevelWall(2560, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(1280, floorOne, 'door'); createLevelDoors(3840, floorOne, 'door'); createLevelDoors(4480, floorOne, 'door'); createLevelIce(3840, ground, 30, 'ice'); createSupplyLockers(1440, ground); createWorkStations(3840, floorTwo); createLevelDatabanks(1280, floorTwo, 1); createLevelDatabanks(4800, floorTwo, 2); createLevelGates(4960, ground, 4960, floorOne); var v4 = [{'initx': 3680, 'inity': ground}, {'initx': 160, 'inity': floorTwo - 109}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 4160, 'inity': ground, 'version': 5}, {'initx': 4260, 'inity': ground, 'version': 3}, {'initx': 960, 'inity': floorOne, 'version': 1}, {'initx': 2400, 'inity': floorOne, 'version': 5}, {'initx': 2560, 'inity': floorOne, 'version': 7}, {'initx': 2720, 'inity': floorOne, 'version': 3}, {'initx': 3520, 'inity': floorOne, 'version': 5}, {'initx': 640, 'inity': floorTwo, 'version': 5}, {'initx': 960, 'inity': floorTwo, 'version': 5}, {'initx': 960, 'inity': floorTwo, 'version': 3}, {'initx': 1280, 'inity': floorTwo, 'version': 3}, {'initx': 1920, 'inity': floorTwo, 'version': 1}, {'initx': 3520, 'inity': floorTwo, 'version': 7}, {'initx': 4160, 'inity': floorTwo, 'version': 3}, {'initx': 4160, 'inity': floorTwo, 'version': 5}, {'initx': 4200, 'inity': floorTwo, 'version': 3}, {'initx': 4400, 'inity': floorTwo, 'version': 5}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = [{'initx': 2080, 'inity': floorOne}]; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel9() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(720, ground, 'right', 'default'); createLevelElevator(2640, ground, 'right', 'default'); createLevelElevator(4880, ground, 'left', 'default'); createLevelElevator(4560, floorOne, 'right', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(1, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(640, floorOne, 30, 'full'); createLevelWall(1280, floorOne, 30, 'full'); createLevelWall(2560, floorOne, 30, 'full'); createLevelWall(3200, floorOne, 30, 'full'); createLevelWall(4480, floorOne, 30, 'full'); createLevelWall(4480, floorTwo, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createSupplyLockers(1120, floorOne); createLevelDatabanks(3520, ground, 2); createLevelGates(4960, floorTwo, 3040, floorOne); var v4 = [{'initx': 1600, 'inity': ground}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 1120, 'inity': ground, 'version': 6}, {'initx': 1280, 'inity': ground, 'version': 4}, {'initx': 1400, 'inity': ground, 'version': 6}, {'initx': 1920, 'inity': ground, 'version': 1}, {'initx': 1740, 'inity': ground, 'version': 6}, {'initx': 2240, 'inity': ground, 'version': 4}, {'initx': 2280, 'inity': ground, 'version': 6}, {'initx': 3000, 'inity': ground, 'version': 6}, {'initx': 3200, 'inity': ground, 'version': 4}, {'initx': 3300, 'inity': ground, 'version': 6}, {'initx': 4160, 'inity': ground, 'version': 7}, {'initx': 4800, 'inity': ground, 'version': 5}, {'initx': 4800, 'inity': ground, 'version': 5}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = [{'initx': 1920, 'inity': ground}, {'initx': 3840, 'inity': ground}]; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel10() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(1680, ground, 'left', 'default'); createLevelElevator(3280, ground, 'right', 'above'); createLevelElevator(4560, ground, 'right', 'default'); createLevelElevator(1040, floorOne, 'right', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(3, 0, levelEndX); buildFloorTwo(1, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(4480, ground, 30, 'full'); createLevelWall(1920, floorOne, 30, 'full'); createLevelWall(3200, floorOne, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(1280, ground, 'door'); createLevelDoors(3840, ground, 'door'); createLevelDoors(640, floorOne, 'door'); createLevelDoors(640, floorTwo, 'door_rightBtn'); createLevelDoors(1920, floorTwo, 'door'); createLevelDoors(2560, floorTwo, 'door'); createLevelDoors(3200, floorTwo, 'door'); createLevelDoors(3840, floorTwo, 'door'); createLevelIce(3840, floorOne, 30, 'ice'); createStoryWalls(800, floorTwo); createSupplyLockers(4240, ground); createWorkStations(480, ground); createWorkStations(3520, floorTwo); createLevelDatabanks(320, floorTwo, 1); createLevelDatabanks(3640, floorTwo, 3); createLevelGates(4640, floorTwo, 160, floorOne); var v4 = [{'initx': 2240, 'inity': floorTwo - 38}, {'initx': 4960, 'inity': floorTwo}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 960, 'inity': ground, 'version': 5}, {'initx': 2200, 'inity': ground, 'version': 5}, {'initx': 2300, 'inity': ground, 'version': 5}, {'initx': 2400, 'inity': ground, 'version': 6}, {'initx': 2560, 'inity': ground, 'version': 4}, {'initx': 2600, 'inity': ground, 'version': 6}, {'initx': 2740, 'inity': ground, 'version': 6}, {'initx': 480, 'inity': floorOne, 'version': 4}, {'initx': 800, 'inity': floorOne, 'version': 7}, {'initx': 1280, 'inity': floorOne, 'version': 5}, {'initx': 1420, 'inity': floorOne, 'version': 5}, {'initx': 3520, 'inity': floorOne, 'version': 5}, {'initx': 1640, 'inity': floorTwo, 'version': 7}, {'initx': 2880, 'inity': floorTwo, 'version': 5}, {'initx': 2880, 'inity': floorTwo, 'version': 3}, {'initx': 4000, 'inity': floorTwo, 'version': 6}, {'initx': 4160, 'inity': floorTwo, 'version': 4}, {'initx': 4220, 'inity': floorTwo, 'version': 6}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel11() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(80, ground, 'hole', 'default'); createLevelElevator(4240, ground, 'left', 'default'); buildGround(0, 0, levelEndX); buildFloorOne(2, 0, levelEndX); buildFloorTwo(0, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelDoors(640, ground, 'door_leftBtn'); createLevelDoors(1280, ground, 'door_outside_rightCap'); createLevelDoors(1920, ground, 'door_outside_leftCap'); createLevelDoors(3200, ground, 'door_outside_rightCap'); createLevelDoors(3840, ground, 'door_outside_leftCap'); createStoryWalls(2400, ground); createSupplyLockers(960, ground); createLevelDatabanks(2720, ground, 3); createLevelGates(4960, ground, 160, ground); var v4 = [{'initx': 2560, 'inity': floorOne}, {'initx': 4960, 'inity': floorOne}]; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = [{'initx': 960, 'inity': ground, 'version': 7}, {'initx': 3520, 'inity': ground, 'version': 7}, {'initx': 3520, 'inity': ground, 'version': 5}, {'initx': 480, 'inity': floorOne, 'version': 5}, {'initx': 2560, 'inity': floorOne, 'version': 5}, {'initx': 1920, 'inity': floorOne, 'version': 7}, {'initx': 2080, 'inity': floorOne, 'version': 7}, {'initx': 2560, 'inity': floorOne, 'version': 7}, {'initx': 2720, 'inity': floorOne, 'version': 7}, {'initx': 2880, 'inity': floorOne, 'version': 7}, {'initx': 3840, 'inity': floorOne, 'version': 7}, {'initx': 4960, 'inity': floorOne, 'version': 7}, {'initx': 4640, 'inity': floorOne, 'version': 7}]; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = [{'initx': 640, 'inity': floorOne}, {'initx': 3520, 'inity': floorOne}]; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel12() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); buildGround(0, 0, levelEndX); buildFloorOne(0, 0, levelEndX); buildFloorTwo(0, 0, levelEndX); createStoryWalls(2500, ground); var v4 = []; for (var v6 in v4) { createLevelChests(v4[v6], 1); } var v2 = []; for (var v5 in v2) { createLevelGuards(v2[v5], 1); } var v3 = []; for (var v7 in v3) { createLevelFumes(v3[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1b', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } frame 1 { function loadLevel66() { resetGame(); loadLevelGlobal(); setLevelZeroes(); createEmptyMovieClips(); createLevelElevator(400, ground, 'right', 'above'); createLevelElevator(1040, ground, 'left', 'default'); createLevelElevator(1360, ground, 'left', 'above'); createLevelElevator(4240, ground, 'left', 'above'); createLevelElevator(4560, ground, 'right', 'default'); createLevelElevator(80, floorOne, 'right', 'above'); buildGround(0, 0, levelEndX); buildFloorOne(5, 0, levelEndX); buildFloorTwo(1, 0, levelEndX); createLevelWall(0, ground, 30, 'full'); createLevelWall(0, floorOne, 30, 'full'); createLevelWall(0, floorTwo, 30, 'full'); createLevelWall(1280, ground, 30, 'full'); createLevelWall(640, floorOne, 30, 'full'); createLevelWall(4480, floorOne, 30, 'full'); createLevelWall(levelEndX, ground, 30, 'full'); createLevelWall(levelEndX, floorOne, 30, 'full'); createLevelWall(levelEndX, floorTwo, 30, 'full'); createLevelDoors(1920, ground, 'door'); createLevelDoors(3840, ground, 'door'); createLevelDoors(2560, floorOne, 'door'); createLevelDoors(2560, floorTwo, 'door'); createSupplyLockers(3280, ground); createSupplyLockers(3200, floorTwo); createWorkStations(4080, floorTwo); createLevelDatabanks(2560, ground, 1); createLevelDatabanks(3360, floorOne, 3); createLevelGates(4960, floorOne, 4960, floorTwo); var v5 = [{'initx': 800, 'inity': floorOne}, {'initx': 3840, 'inity': floorOne - 38}]; for (var v8 in v5) { createLevelChests(v5[v8], 1); } var v3 = [{'initx': 800, 'inity': ground, 'version': 4}, {'initx': 800, 'inity': ground, 'version': 3}, {'initx': 2560, 'inity': ground, 'version': 5}, {'initx': 2880, 'inity': ground, 'version': 1}, {'initx': 4800, 'inity': ground, 'version': 3}, {'initx': 800, 'inity': floorOne, 'version': 7}, {'initx': 1920, 'inity': floorOne, 'version': 1}, {'initx': 2080, 'inity': floorOne, 'version': 1}, {'initx': 3200, 'inity': floorOne, 'version': 1}, {'initx': 3500, 'inity': floorOne, 'version': 6}, {'initx': 3660, 'inity': floorOne, 'version': 6}, {'initx': 640, 'inity': floorTwo, 'version': 1}, {'initx': 3840, 'inity': floorTwo, 'version': 5}, {'initx': 4000, 'inity': floorTwo, 'version': 5}]; for (var v6 in v3) { createLevelGuards(v3[v6], 1); } var v4 = [{'initx': 4400, 'inity': floorTwo}, {'initx': 4560, 'inity': floorTwo}]; for (var v9 in v4) { createLevelFumes(v4[v9], 1); } var v2 = [{'initx': 200, 'inity': ground, 'scopex': 640, 'scopey': 140, 'patrol_dist': 160, 'patrolTowardRight': true, 'patrolTowardLeft': false, 'speed': 0, 'version': 1}]; for (var v7 in v2) { createLevelEscorts(v2[v7], 1); } createLevelBG2(); _root.fg2.attachMovie('bg_megatexture_level' + currentLevel, 'bg_megatexture', fg2.getNextHighestDepth(), {'_x': 2560, '_y': 0}); _root.sp1.attachMovie('fg_flashlight1', 'fg_flashlight', sp1.getNextHighestDepth(), {'_x': player._x, '_y': player._y}); orderLayers(); selectFloor(); levelRendered = true; miniMap(); } } } movieClip 887 tutorialPopup { frame 30 { stop(); } } movieClip 888 tutorialWall { } movieClip 891 { } movieClip 892 wall2000 { frame 16 { stop(); } frame 91 { stop(); } } movieClip 899 workStationMenu { } movieClip 905 clipReloadLoaderAni { frame 41 { stop(); } } frame 4 { stop(); _root.the_container.attachMovie('the_game', 'the_game1', this.getNextHighestDepth(), {'_x': 0, '_y': 0}); _root.the_container._xscale = 62.5; _root.the_container._yscale = 62.5; }




https://swfchan.com/53/263835/info.shtml
Created: 14/4 -2026 16:26:52 Last modified: 14/4 -2026 16:26:52 Server time: 14/04 -2026 22:30:32