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

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/86273344?noj=FRM86273344-5DC" width="1" height="1"></div>

Simpleton.swf

This is the info page for
Flash #39585

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


Text
Level 3 Clearance
Required

?

Play

Play

Settings

Settings

Simpleton

BY AARON GEISLER

Play More Games

Play More Games

Full

Full

Reduced

Reduced

None

None

Menu

Menu

Settings

Anti Aliasing

Bullet casings

Debris

Particle Alpha

Particle Density

Medium

Medium

Hard

Hard

Easy

Easy

Difficulty

ActionScript [AS3]

Section 1
//bar_root_18 (mainfla_fla.bar_root_18) package mainfla_fla { import flash.display.*; public dynamic class bar_root_18 extends MovieClip { public var barmask:MovieClip; } }//package mainfla_fla
Section 2
//BG_2 (mainfla_fla.BG_2) package mainfla_fla { import flash.display.*; public dynamic class BG_2 extends MovieClip { public function BG_2(){ addFrameScript(10, frame11); } function frame11(){ MovieClip(parent).gotoAndStop(2); } } }//package mainfla_fla
Section 3
//LOGOEND_43 (mainfla_fla.LOGOEND_43) package mainfla_fla { import flash.display.*; public dynamic class LOGOEND_43 extends MovieClip { public function LOGOEND_43(){ addFrameScript(132, frame133); } function frame133(){ MovieClip(root).play(); stop(); } } }//package mainfla_fla
Section 4
//LOGOPRELOAD_0_23 (mainfla_fla.LOGOPRELOAD_0_23) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_0_23 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_0_23(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 5
//LOGOPRELOAD_1_27 (mainfla_fla.LOGOPRELOAD_1_27) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_1_27 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_1_27(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 6
//LOGOPRELOAD_2_30 (mainfla_fla.LOGOPRELOAD_2_30) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_2_30 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_2_30(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 7
//LOGOPRELOAD_3_32 (mainfla_fla.LOGOPRELOAD_3_32) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_3_32 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_3_32(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 8
//LOGOPRELOAD_4_34 (mainfla_fla.LOGOPRELOAD_4_34) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_4_34 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_4_34(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 9
//LOGOPRELOAD_5_36 (mainfla_fla.LOGOPRELOAD_5_36) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_5_36 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_5_36(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 10
//LOGOPRELOAD_6_38 (mainfla_fla.LOGOPRELOAD_6_38) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_6_38 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_6_38(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 11
//LOGOPRELOAD_7_40 (mainfla_fla.LOGOPRELOAD_7_40) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class LOGOPRELOAD_7_40 extends MovieClip { public var thenextframe; public function LOGOPRELOAD_7_40(){ addFrameScript(0, frame1, 89, frame90); } function frame90(){ if (MovieClip(parent).isloaded){ MovieClip(parent).gotoAndStop(10); } else { thenextframe = (Math.ceil((Math.random() * 8)) + 1); if (thenextframe == MovieClip(parent).currentFrame){ MovieClip(parent).nextFrame(); } else { MovieClip(parent).gotoAndStop(thenextframe); }; }; } function frame1(){ if (Math.random() > 0.5){ scaleX = -(scaleX); x = (x - MovieClip(parent).shiftamt); }; } } }//package mainfla_fla
Section 12
//MainTimeline (mainfla_fla.MainTimeline) package mainfla_fla { import flash.events.*; import flash.text.*; import flash.media.*; import flash.display.*; import flash.net.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.printing.*; import flash.system.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public const necklength = 6; public const computerheight = 24; public const riflepickupammo = 20; public const bulletslowamount = 1.75; public const explosionsmokecolor = 0x5A5A5A; public const megazombieinaccuracy = 16; public const smgtracercolor = 0xFFFF00; public const weaponchance = 500; public const g = 0.15; public const grenadeammoamount = 3; public const lowerleglength = 8; public const rocketlivetime = 50; public const enemyBhealth = 65; public const enemyCseedistance = 800; public const berserkduration = 200; public const nailgunflashdistance = 8; public const pistolyoffset = 9; public const turretflashdistance = 8; public const bulletcasingrotatespeed = 25; public const kamikazepush = 6; public const rifleammosidelength = 12; public const noderadius = 20; public const megazombiegundistance = 12; public const linedebrislivetime = 250; public const impactsmokecolor = 0x828282; public const shotgunframe = 6; public const spinspeed = 12; public const weaponfadetime = 100; public const rifleammoamount = 30; public const laserlivetime = 100; public const enemyBaircontrolfactor = 0.1; public const playerf = 0.9; public const playerg; public const chainf = 0.5; public const weaponf = 0.75; public const chaing; public const naillivetime = 200; public const smgshootdelay = 3; public const weapong; public const playerwatercontrolfactor = 0.6; public const safetydisplacement = 0.15; public const enemyBshootdelay = 24; public const rpglength = 24; public const crateradius = 12; public const rifleflashdistance = 10; public const naildummytime = 30; public const smginaccuracy = 12; public const bulletbloodps = 2; public const riflecasingsize = 5; public const smgtraceralpha = 0.4; public const explosionflashcolor = 16494596; public const berserkmultiplier = 10; public const enemyBinaccuracy = 90; public const stringf = 0.75; public const stringg; public const grenadebarreldistance = 6; public const grenadeshootdistance = 5; public const turretbarreldistance = 24; public const rpgdamage = 200; public const pistolnum = 1; public const enemyAwatercontrolfactor = 0.4; public const chainsegmentlength = 10; public const fireskipnum = 7; public const playeraf = 0.99; public const smgammosidelength = 10; public const physicsobjectcolor = 0xFFF000; public const megazombiemaxshots = 5; public const impactflashcolor = 16501020; public const rocketdamage = 200; public const pointdebrisfadetime = 20; public const grenadenum = 2; public const smgholddistance = 10; public const neckconstraint = 12; public const enemyAaf = 0.99; public const degtorad = 0.0174532925199433; public const nailgunyoffset = 15; public const enemyAaircontrolfactor = 0.15; public const riflelength = 16; public const smgflashdistance = 6; public const bulletcasingfadetime = 10; public const rpgbarreldistance = 16; public const pistolflashdistance = 9; public const bulletcasingaf = 0.95; public const weaponlivetime = 500; public const nailgunnum = 9; public const rifletracercolor = 0xFFFF00; public const shotguntracercolor = 0xFFFF00; public const nailspeed = 25; public const smgcasingskip = 3; public const pistolpickupammo = 20; public const enemyAshootdistance = 16; public const itemchance = 300; public const characterpushratio = 0.08; public const rifledamage = 5; public const smgframe = 8; public const nailgunframe = 12; public const upperlegconstraint1 = 12; public const upperlegconstraint2 = 20; public const rpgyoffset = 8; public const playerjumpdelay = 5; public const chaindebrisf = 0.6; public const chaindebrisg; public const rocketradius = 150; public const enemyBwatercontrolfactor = 0.3; public const corpsef = 0.5; public const corpseg; public const muzzlesmokecolor = 0x828282; public const rifleholddistance = 16; public const grenadeshootdelay = 45; public const rpgflashdistance = 4; public const resttime = 90; public const turretdebrisparticles = 3; public const maxrifleammo = 60; public const shotgunholddistance = 14; public const enemyCshootdelay = 20; public const maxdelta = 5; public const enemyCdamage = 70; public const grenadeinaccuracy = 12; public const enemyBmaxmovespeed = 2.5; public const ratradius = 4; public const enemyCinaccuracy = 90; public const maxpistolammo = 48; public const grenadeyoffset = 8; public const maxnailgunammo = 48; public const enemyAhealth = 40; public const pistolammoamount = 20; public const grenadepush = 5; public const pickupf = 0.6; public const pickupg; public const pistolammosidelength = 10; public const rifleshootdelay = 5; public const boxdebrisaf = 0.96; public const turretshootdelay = 8; public const pointdebrislivetime = 200; public const enemyAf = 0.95; public const enemyAg; public const megazombieflashdistance = 8; public const chaindebrissegmentlength = 5; public const rifleinaccuracy = 4; public const turretbaselength = 24; public const rifletraceralpha = 0.75; public const shotguntraceralpha = 0.25; public const enemyBf = 0.95; public const enemyBg; public const enemyAseedistance = 800; public const nailgunshootdistance = 300; public const rpgpickupammo = 1; public const laserdamage = 20; public const enemyCf = 0.95; public const enemyCg; public const turretinaccuracy = 5; public const rpgholddistance = 4; public const turretshootdistance = 600; public const pistolcasingsize = 3; public const bulletcasinglivetime = 100; public const corpsegibs = 4; public const nailgunammosidelength = 12; public const enemyCwatercontrolfactor = 0.2; public const grenadedamage = 100; public const nailgunpickupammo = 24; public const turretside = -1; public const bulletcasingspeed = 3; public const lowerarmlength = 5; public const riflebarreldistance = 21; public const turretmaxswivel = 60; public const chainsawlength = 24; public const rifleyoffset = 9; public const megazombiedamage = 3; public const maxcorpses = 5; public const muzzleflashcolor = 0xFFFF00; public const messageduration = 300; public const chainaf = 0.99; public const crateheight = 24; public const enemyAmovedelay = 16; public const bulletcasingf = 0.5; public const bulletcasingg; public const chainsawdamage = 5; public const chaindebrissegments = 6; public const pistollength = 8; public const enemyCshootdistance = 16; public const chainsawholddistance = 10; public const weaponaf = 0.98; public const rifleshootdistance = 300; public const enemyBaf = 0.99; public const grenaderadius = 100; public const shotgunyoffset = 10; public const nailgunammoamount = 24; public const pickupaf = 0.99; public const pistoldamage = 4; public const rifleframe = 0; public const riflecasingskip = 2; public const playermoveacceleration = 0.3; public const riflenum = 0; public const barrelradius = 10; public const megazombierotatespeed = 3; public const pistolcasingframe = 0; public const shotgunpickupammo = 8; public const enemyBmovedelay = 20; public const nailpinspeed = 4; public const upperleglength = 8; public const smgbarreldistance = 11; public const chainsawshootdelay = 3; public const boxdebrisfadetime = 30; public const nailguncasingsize = 6; public const laserspeed = 10; public const smgyoffset = 9; public const turretdamage = 25; public const pointdebrisaf = 0.98; public const pistolholddistance = 12; public const chaindebrisaf = 0.97; public const megazombiebarreldistance = 24; public const corpseaf = 0.99; public const nailaf = 0.96; public const turrettracercolor = 0xFFFF00; public const safetydistance = 16; public const explosionbloodps = 6; public const enemyside = 1; public const smgshootdistance = 300; public const enemyCmovedelay = 12; public const pistolshootdistance = 300; public const limbfadetime = 40; public const chainsawbarreldistance = 8; public const rpgframe = 14; public const shotgunammoamount = 8; public const megazombieseedistance = 270; public const maxgrenadeammo = 6; public const nailmaxbleedtime = 60; public const pistolshootdelay = -1; public const shotgunflashdistance = 15; public const enemyBdamage = 55; public const shotgunnum = 3; public const pickupfadetime = 100; public const grenaderotatespeed = 80; public const shotgunammosidelength = 10; public const pistolinaccuracy = 8; public const shotguncasingsize = 6; public const crowradius = 4; public const nailgunholddistance = 7; public const smgcasingframe = 0; public const riflerecieverdistance = 7; public const ragdollheight; public const pistolframe = 2; public const healthsidelength = 12; public const shotgunlength = 24; public const smglength = 8; public const enemyCmoveacceleration = 0.3; public const grenadefadetime = 1; public const bulletpushradius = 6; public const boxdebrislivetime = 300; public const turrettraceralpha = 80; public const chaindebrisfadetime = 35; public const corpsefadetime = 50; public const pistolbarreldistance = 12; public const limbg; public const limbf = 0.9; public const berserkdecay = 0.75; public const nailgunlength = 24; public const shotgundamage = 8; public const smgdamage = 5; public const enemyCaf = 0.99; public const playerjumpspeed = -4; public const enemyBseedistance = 800; public const nailgundamage = 15; public const enemyCmaxmovespeed = 2; public const shotgunrecieverdistance = 4; public const computerradius = 12; public const stringsegmentlength = 12; public const nailgunbarreldistance = 19; public const limblivetime = 200; public const playermaxmovespeed = 3; public const maxlookdelta = 60; public const pistolcasingskip = 1; public const nailgunshootdelay = 9; public const chainsawyoffset = 12; public const rpginaccuracy = 5; public const enemyChealth = 30; public const linedebrisg; public const pointdebrisrotatespeed = 15; public const lowerarmconstraint = 4; public const rocketpush = 6; public const linedebrisf = 0.75; public const maxshotgunammo = 24; public const nailguncasingframe = 3; public const stringaf = 0.98; public const nailguninaccuracy = 10; public const upperarmconstraint = 6; public const nailslowamount = 3; public const pickuplivetime = 1500; public const barrelheight = 20; public const smgpickupammo = 30; public const enemyBmoveacceleration = 0.4; public const chainsawshootdistance = 25; public const kamikazedamage = 100; public const enemychance = 70; public const radtodeg = 57.2957795130823; public const playeraircontrolfactor = 0.25; public const grenadeg; public const grenadeframe = 4; public const turretrotatespeed = 2; public const chainsawframe = 10; public const bulletcasingdirection = 20; public const rpgnum = 10; public const chainsawnum = 5; public const grenadef = 0.5; public const lowerlegconstraint = 5; public const grenadelivetime = 150; public const grenadeammosidelength = 18; public const naildamage = 15; public const chestlength = 7; public const chaindebrislivetime = 250; public const corpselivetime = 300; public const shotgunshootdelay = 20; public const megazombiehealth = 30; public const enemyBshootdistance = 24; public const shotguninaccuracy = 16; public const smgammoamount = 40; public const healthamount = 200; public const kamikazeradius = 100; public const nailguncasingskip = 1; public const shotguncasingframe = 2; public const riflecasingframe = 1; public const pistoltracercolor = 0xFFFF00; public const upperarmlength = 5; public const grenadeaf = 0.995; public const rocketspeed = 20; public const hsbloodps = 4; public const linedebrislength = 16; public const headshotmultiplier = 4; public const boxdebrisf = 0.5; public const boxdebrisg; public const maxrpgammo = 1; public const turretseedistance = 600; public const minbulletcasingspeed = 1; public const enemyAdamage = 35; public const enemyAmaxmovespeed = 3; public const megazombieside = 1; public const smgcasingsize = 3; public const enemyAmoveacceleration = 0.5; public const boxdebrissidelength = 8; public const bulletpushspeed = 4; public const linedebrisfadetime = 25; public const smgrecieverdistance = 4; public const pointdebrisf = 0.7; public const pointdebrisg; public const shotgunshootdistance = 300; public const nailgunrecieverdistance = 4; public const linedebrisaf = 0.98; public const pistolrecieverdistance = 8; public const maxberserkamount = 300; public const smgnum = 4; public const shotgunbarreldistance = 20; public const enemyAshootdelay = 16; public const turrethealth = 30; public const killberserkamount = 60; public const nailfadetime = 50; public const limbaf = 0.97; public const shotguncasingskip = 1; public const maxrestdelta = 1; public const enemyAinaccuracy = 90; public const maxbloodps = 5; public const enemyCaircontrolfactor = 0.1; public const chestconstraint = 11.326; public const playerside = 0; public const maxsmgammo = 90; public const pistoltraceralpha = 0.5; public const megazombieshootdelay = 3; public var line:Array; public var vstring:Array; public var killzone:Array; public var string:Array; public var playerweapon:uint; public var messagetextdelay:uint; public var raindrops:int; public var fullbtn0:SimpleButton; public var fullbtn1:SimpleButton; public var fullbtn2:SimpleButton; public var fullbtn3:SimpleButton; public var fullbtn4:SimpleButton; public var megazombiedie:Sound; public var o:uint; public var i:uint; public var q:uint; public var u:uint; public var p:Array; public var t:uint; public var playerhealth:uint; public var walldoor:Array; public var z:uint; public var r:uint; public var isplayer:Boolean; public var nonebtn0:SimpleButton; public var nonebtn1:SimpleButton; public var nonebtn3:SimpleButton; public var yposition:Number; public var vobjectline:Array; public var gps:uint; public var berserkbar:MovieClip; public var alternatenum:uint; public var movetrail:Array; public var numberofps:int; public var tdtp:Array; public var rope:Array; public var fires:uint; public var hinge:Array; public var selectedp:int; public var nailgunammo:Array; public var electricbuzz:Sound; public var bodyAs:uint; public var wait:int; public var pistol:Array; public var winzone:Array; public var chainsaw:Array; public var hardbtn:SimpleButton; public var bodyBs:uint; public var vbox:Array; public var xposition:Number; public var pickuptext:String; public var players:int; public var chaindistance:Number; public var killzones:uint; public var enemyA:Array; public var enemyB:Array; public var enemyC:Array; public var bodyCs:uint; public var tempnormal:Number; public var floordoor:Array; public var rocketshoot:Sound; public var weapons:uint; public var bodyDs:uint; public var chains:uint; public var wateraffector:Array; public var particlequalityselection:MovieClip; public var waterspray:Sound; public var blast:Array; public var backgroundmappropscontainer:Sprite; public var berserkscreen:MovieClip; public var playerrpgammo:uint; public var rifleshoot:Sound; public var health:Array; public var playerpistolammo:uint; public var linedebris:Array; public var strings:uint; public var bool1; public var bool2:Boolean; public var bool3:Boolean; public var bool4:Boolean; public var bool5:Boolean; public var bool6:Boolean; public var hitzones:uint; public var lowerlegs:uint; public var nodes:uint; public var debrisqualityselection:MovieClip; public var dooropen:Sound; public var leftlegdamage:uint; public var boxdebris:Array; public var pointdebris:Array; public var foundbullet:int; public var explosion:Sound; public var easybtn:SimpleButton; public var screenflash:MovieClip; public var shotgunammos:uint; public var chance:int; public var cursor:MovieClip; public var blastdamage:Number; public var midgroundmappropscontainer:Sprite; public var hit:Array; public var playersmgammo:uint; public var playergrenadeammo:uint; public var rpgs:uint; public var lowerarm:Array; public var boxes:uint; public var watermarkbtn0:MovieClip; public var crate:Array; public var bodypartscontainer; public var graphicsquality:uint; public var lowerarms:uint; public var rockets:uint; public var spawnpointdirection:Number; public var possiblelines:uint; public var damagezones:uint; public var clicktime:uint; public var hudmessagetext:TextField; public var movefactor:Number; public var chaindebriss:uint; public var corpses:uint; public var zombiedie:Sound; public var hinges:uint; public var computers:uint; public var legsoffset:Number; public var metalcrash:Sound; public var bullet:Array; public var pistolshoot:Sound; public var bodynormal:Number; public var crates:uint; public var grenadeammo:Array; public var shotguns:uint; public var background:MovieClip; public var schannel:SoundChannel; public var textformat1:TextFormat; public var textformat2:TextFormat; public var textformat3:TextFormat; public var megazombieengine:Sound; public var clicking:Boolean; public var url:URLRequest; public var pickups:uint; public var vline:Array; public var barrels:uint; public var point:Array; public var hitzone:Array; public var effectscontainer:Sprite; public var hudhealthtext:TextField; public var enemyAs; public var loopchannel:SoundChannel; public var particlealphaselection:MovieClip; public var enemyBs; public var torso:Array; public var enemycontainer:Sprite; public var weapondisplays:uint; public var floordoors:uint; public var reducedbtn0:SimpleButton; public var reducedbtn1:SimpleButton; public var reducedbtn4:SimpleButton; public var enemyCs; public var physicscontainer:Sprite; public var reducedbtn2:SimpleButton; public var pkey1:Boolean; public var spinlight:Array; public var spawnfacedirection:Number; public var pkey8:Boolean; public var pkey3:Boolean; public var pkey4:Boolean; public var pkey5:Boolean; public var pkey2:Boolean; public var loopchannel2:SoundChannel; public var fire:Array; public var smgammos:uint; public var nailgunammos:uint; public var nailguns:uint; public var pkey7:Boolean; public var ammodisplay:MovieClip; public var playerhasrifle:Boolean; public var pkeya:Boolean; public var playershotgunammo:uint; public var megazombies; public var pkeyd:Boolean; public var pkey6:Boolean; public var pkeyq:Boolean; public var vrope:Array; public var pkeyspace:Boolean; public var upperarm:Array; public var fade:MovieClip; public var pkeyw:Boolean; public var particlealpha:uint; public var turretbarrels; public var drawnline:Array; public var bigcrash:Sound; public var chain:Array; public var countedcorpses:uint; public var ammopickup:Sound; public var rocket:Array; public var healthdisplay:MovieClip; public var bulletcasings:uint; public var currentnode:int; public var bulletcasingselection:MovieClip; public var collisionlines:uint; public var temppdistance:Number; public var crowwing:Array; public var debrisquality:uint; public var teleport:Sound; public var playerhasrpg:Boolean; public var squish:Sound; public var nailgun:Array; public var bulletcasing:Array; public var lowestpnum2:int; public var gplayerdamage:Number; public var found:Boolean; public var weaponpickup:Sound; public var segments:uint; public var difficulty:uint; public var upperlegs:uint; public var grenadeexplode:Sound; public var shotgunammo:Array; public var healthpickup:Sound; public var chainsawstart:Sound; public var tsin:Array; public var vgp:Array; public var shell1:Sound; public var shell3:Sound; public var shell4:Sound; public var shell5:Sound; public var shell2:Sound; public var rat:Array; public var megazombieguns; public var megazombieintro:Sound; public var backdrop:MovieClip; public var rightlegdamage:uint; public var tdistance:Array; public var wateraffectors:uint; public var dchance:Number; public var menubtn:SimpleButton; public var playerhaschainsaw:Boolean; public var leftarmdamage:uint; public var projectilecontainer:Sprite; public var crows:uint; public var turretbases; public var highestchance:int; public var torsos:uint; public var deathcounter:uint; public var rainfall:Sound; public var waterfall:Sound; public var beginbtn:SimpleButton; public var turretshoot:Sound; public var playerhasnailgun:Boolean; public var nails:uint; public var upperarms:uint; public var foreground:MovieClip; public var bestcx:Number; public var bestcy:Number; public var city:Array; public var pickuptextdelay:uint; public var maskmc:MovieClip; public var hydrantspray:Sound; public var healthtext:String; public var playerdamage:Sound; public var rifleammo:Array; public var healths:uint; public var grenadebounce1:Sound; public var grenadebounce2:Sound; public var grenadebounce3:Sound; public var rifleammos:uint; public var waterpool:Array; public var messagetext:String; public var counter1:int; public var counter2:int; public var counter3:int; public var counter4:int; public var counter5:int; public var counter6:int; public var nailhit:Sound; public var crowcaw:Sound; public var rpg:Array; public var turretexplode:Sound; public var explosiondistance:Number; public var nail:Array; public var inmap:Boolean; public var chainsawrev:Sound; public var maxmovespeed:Number; public var movetrails:uint; public var hitsomething:Boolean; public var alarm:Sound; public var lowestframerate:uint; public var plane:Sound; public var berserkdisplay:MovieClip; public var vhinge:Array; public var foregroundmappropscontainer:Sprite; public var playerhassmg:Boolean; public var crow:Array; public var rifles:uint; public var bcchance:Number; public var deltahs:Number; public var playerhaspistol:Boolean; public var bodyA:Array; public var player:Array; public var bodyD:Array; public var bodyB:Array; public var vdrawnline:Array; public var bodyC:Array; public var limbs:uint; public var optionsbtn:SimpleButton; public var smallcrash:Sound; public var hudammotext:TextField; public var stringdistance:Number; public var lasers:uint; public var item:Array; public var temporaryhs:Number; public var objectdirection:Number; public var menubtn2:SimpleButton; public var objectlines:uint; public var cities:uint; public var bestsurfacedirection:Number; public var chaindebris:Array; public var corpse:Array; public var lowerleg:Array; public var rain:Array; public var directiondelta:Number; public var mapnumber:int; public var bullets:uint; public var objectline:Array; public var foundblast:int; public var tempdistance:Number; public var playerrifleammo:uint; public var shotgunshoot:Sound; public var linedebriss:uint; public var mofunzonebtn:SimpleButton; public var impacty:Number; public var impactx:Number; public var shotgun:Array; public var randsound:int; public var lasershoot:Sound; public var healthbar:MovieClip; public var pistolammos:uint; public var pdistance:Number; public var deltavs:Number; public var cy:Number; public var df:uint; public var cx:Number; public var possiblelinenum:Array; public var weaponscontainer:Sprite; public var tcos:Array; public var turretbarrel:Array; public var fog:MovieClip; public var pistolammo:Array; public var smgs:uint; public var groundoffset:Number; public var spinlights:uint; public var gp:Array; public var pickupscontainer:Sprite; public var rats:uint; public var points:uint; public var ammotext:String; public var grenades:uint; public var fontformat:Font; public var megazombieexhaust:Sound; public var megazombie:Array; public var berserk:Sound; public var waterpools:uint; public var showphysicsobjects:Boolean; public var megazombiegun:Array; public var smg:Array; public var grenade:Array; public var debriscontainer:Sprite; public var blasts:uint; public var vcollisionline:Array; public var ragdolls:uint; public var crowwings:uint; public var tempx2:Number; public var smgammo:Array; public var tempx1:Number; public var surfacedirection:Number; public var tempy2:Number; public var ropes:uint; public var drawnlines:uint; public var tempy1:Number; public var playerhasshotgun:Boolean; public var deltahs2:Number; public var box:Array; public var pistols:uint; public var head:Array; public var hudpickuptext:TextField; public var node:Array; public var ps:uint; public var vwaterpool:Array; public var music:Sound; public var enemies:uint; public var clickedbutton:Boolean; public var upperleg:Array; public var boxdebriss:uint; public var vragdoll:Array; public var drip:Sound; public var rightarmdamage:uint; public var gundirection:Number; public var moregamesbtn:SimpleButton; public var u2:int; public var dryfire:Sound; public var collisionline:Array; public var debugmode:Boolean; public var ratsqueak:Sound; public var heads:uint; public var bulletcasingquality:uint; public var damagetaken:Number; public var npccontainer:Sprite; public var mediumbtn:SimpleButton; public var rifle:Array; public var laser:Array; public var pointdebriss:uint; public var grenadeammos:uint; public var messagestring:String; public var legAs:uint; public var vpoint:Array; public var smgshoot:Sound; public var lowestpdistance:Number; public var walldoors:uint; public var legBs:uint; public var lines:uint; public var playerhasgrenade:Boolean; public var computer:Array; public var legCs:uint; public var weapondisplay:Array; public var legDs:uint; public var hits:uint; public var temprotation:Number; public var ragdoll:Array; public var qualityselection:MovieClip; public var cutscene:Boolean; public var damagezone:Array; public var barrel:Array; public var playernailgunammo:uint; public var particlequality:uint; public var links:uint; public var turretbase:Array; public var limb:Array; public var winzones:uint; public var chainsaws:uint; public var legA:Array; public var legC:Array; public var legD:Array; public var link:Array; public var legB:Array; public function MainTimeline(){ pickupg = g; weapong = g; playerg = g; enemyCg = g; enemyBg = g; enemyAg = g; stringg = g; pointdebrisg = g; linedebrisg = g; boxdebrisg = g; chaindebrisg = g; limbg = g; corpseg = g; bulletcasingg = g; chaing = g; grenadeg = (g * 0.5); ragdollheight = ((((necklength + Math.sqrt((((chestlength * 0.5) * (chestlength * 0.5)) + (chestconstraint * chestconstraint)))) + upperleglength) + lowerleglength) * 0.5); super(); addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } public function restoreplayerinfo(){ player[0].weapon = playerweapon; player[0].damage = gplayerdamage; player[0].rifleammo = playerrifleammo; player[0].hasrifle = playerhasrifle; player[0].pistolammo = playerpistolammo; player[0].haspistol = playerhaspistol; player[0].grenadeammo = playergrenadeammo; player[0].hasgrenade = playerhasgrenade; player[0].shotgunammo = playershotgunammo; player[0].hasshotgun = playerhasshotgun; player[0].smgammo = playersmgammo; player[0].hassmg = playerhassmg; player[0].nailgunammo = playernailgunammo; player[0].hasnailgun = playerhasnailgun; player[0].rpgammo = playerrpgammo; player[0].hasrpg = playerhasrpg; player[0].haschainsaw = playerhaschainsaw; } public function turretexplosion(_arg1:Number, _arg2:Number){ turretexplode.play(); q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 10) + 10), (Math.random() * 360), ((Math.random() * 1) + 1), 0.95, -0.05, ((Math.random() * 20) + 20), explosionsmokecolor, true); q = (q + 1); }; } public function approxdistance2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:int; var _local6:int; _local5 = Math.round(Math.abs((_arg1 - _arg3))); _local6 = Math.round(Math.abs((_arg2 - _arg4))); return (tdistance[_local5][_local6]); } public function createcrate(_arg1:Number, _arg2:Number, _arg3:uint){ crate[crates] = new cratemc(); midgroundmappropscontainer.addChild(crate[crates]); crate[crates].active = true; crate[crates].visible = true; crate[crates].x = _arg1; crate[crates].y = _arg2; crate[crates].frame = _arg3; crate[crates].hitzonenum = hitzones; createhitzone(crate[crates].x, (crate[crates].y + (crateheight * 0.5)), crateradius); crates = (crates + 1); } public function beginbtnclick(_arg1){ gotoAndPlay(5); } public function createlowerleg(_arg1){ lowerleg[lowerlegs] = new lowerlegmc(); bodypartscontainer.addChild(lowerleg[lowerlegs]); lowerleg[lowerlegs].visible = true; lowerleg[lowerlegs].active = true; lowerleg[lowerlegs].x = -100; lowerleg[lowerlegs].y = -100; lowerleg[lowerlegs].frame = _arg1; lowerleg[lowerlegs].gotoAndPlay((_arg1 + 1)); lowerlegs = (lowerlegs + 1); } public function nailgunmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 4) + 4), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 4) + 2), 0.85, -0.05, ((Math.random() * 15) + 15), 0xD0D0D0, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 6) + 6), 0, 0, 0, 0, 8, 0xD0D0D0, false); } public function createspinlight(_arg1:Number, _arg2:Number){ spinlight[spinlights] = new spinlightmc(); backgroundmappropscontainer.addChild(spinlight[spinlights]); spinlight[spinlights].active = true; spinlight[spinlights].visible = true; spinlight[spinlights].x = _arg1; spinlight[spinlights].y = _arg2; spinlights = (spinlights + 1); } public function dirtblast(_arg1:Number, _arg2:Number){ q = 0; while (q < 6) { creategp(_arg1, _arg2, ((Math.random() * 8) + 12), ((Math.random() * 60) + 69), ((Math.random() * 3) + 1), 0.96, 0.03, ((Math.random() * 20) + 40), 7623990, true); q = (q + 1); }; } public function createhead(_arg1){ head[heads] = new headmc(); bodypartscontainer.addChild(head[heads]); head[heads].visible = true; head[heads].active = true; head[heads].x = -100; head[heads].y = -100; head[heads].frame = _arg1; head[heads].gotoAndPlay((_arg1 + 1)); heads = (heads + 1); } public function menustep2(_arg1){ Mouse.show(); if (graphicsquality == 0){ qualityselection.x = fullbtn0.x; qualityselection.y = fullbtn0.y; }; if (graphicsquality == 1){ qualityselection.x = reducedbtn0.x; qualityselection.y = reducedbtn0.y; }; if (graphicsquality == 2){ qualityselection.x = nonebtn0.x; qualityselection.y = nonebtn0.y; }; if (bulletcasingquality == 0){ bulletcasingselection.x = fullbtn1.x; bulletcasingselection.y = fullbtn1.y; }; if (bulletcasingquality == 1){ bulletcasingselection.x = reducedbtn1.x; bulletcasingselection.y = reducedbtn1.y; }; if (bulletcasingquality == 2){ bulletcasingselection.x = nonebtn1.x; bulletcasingselection.y = nonebtn1.y; }; if (debrisquality == 0){ debrisqualityselection.x = fullbtn2.x; debrisqualityselection.y = fullbtn2.y; }; if (debrisquality == 1){ debrisqualityselection.x = reducedbtn2.x; debrisqualityselection.y = reducedbtn2.y; }; if (particlealpha == 0){ particlealphaselection.x = fullbtn3.x; particlealphaselection.y = fullbtn3.y; }; if (particlealpha == 1){ particlealphaselection.x = nonebtn3.x; particlealphaselection.y = nonebtn3.y; }; if (particlequality == 0){ particlequalityselection.x = fullbtn4.x; particlequalityselection.y = fullbtn4.y; }; if (particlequality == 1){ particlequalityselection.x = reducedbtn4.x; particlequalityselection.y = reducedbtn4.y; }; } public function megazombieexplosion(_arg1:Number, _arg2:Number){ megazombiedie.play(); q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 4) + 16), (Math.random() * 360), ((Math.random() * 3) + 3), 0.9, -0.03, ((Math.random() * 10) + 40), explosionsmokecolor, true); q = (q + 1); }; q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 4) + 16), (Math.random() * 360), ((Math.random() * 3) + 3), 0.9, 0, ((Math.random() * 10) + 10), 0xFFFF00, true); q = (q + 1); }; q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 4) + 16), (Math.random() * 360), ((Math.random() * 3) + 3), 0.9, 0, ((Math.random() * 10) + 10), 0xFFB300, true); q = (q + 1); }; q = 0; while (q < 8) { creategp(_arg1, _arg2, ((Math.random() * 4) + 16), (Math.random() * 360), ((Math.random() * 2) + 3), 0.92, 0.03, ((Math.random() * 20) + 50), 13644595, true); q = (q + 1); }; } public function createnode(_arg1:Number, _arg2:Number){ node[nodes] = new Object(); node[nodes].x = _arg1; node[nodes].y = _arg2; node[nodes].active = true; nodes = (nodes + 1); } public function kamikazeexplosion(_arg1:Number, _arg2:Number){ grenadeexplode.play(); q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 12) + 16), (Math.random() * 360), ((Math.random() * 3) + 1), 0.92, -0.05, ((Math.random() * 30) + 30), explosionsmokecolor, true); q = (q + 1); }; q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 10) + 10), (Math.random() * 360), ((Math.random() * 3) + 1), 0.95, 0, ((Math.random() * 8) + 8), explosionflashcolor, true); q = (q + 1); }; q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 6) + 6), (Math.random() * 360), ((Math.random() * 3) + 2), 0.97, 0, ((Math.random() * 10) + 10), 13644595, true); q = (q + 1); }; } public function keyup(_arg1:KeyboardEvent){ if (_arg1.keyCode == 32){ pkeyspace = false; }; if (_arg1.keyCode == 81){ pkeyq = false; }; if (_arg1.keyCode == 68){ pkeyd = false; }; if (_arg1.keyCode == 87){ pkeyw = false; }; if (_arg1.keyCode == 65){ pkeya = false; }; if (_arg1.keyCode == 49){ pkey1 = false; }; if (_arg1.keyCode == 50){ pkey2 = false; }; if (_arg1.keyCode == 51){ pkey3 = false; }; if (_arg1.keyCode == 52){ pkey4 = false; }; if (_arg1.keyCode == 53){ pkey5 = false; }; if (_arg1.keyCode == 54){ pkey6 = false; }; if (_arg1.keyCode == 55){ pkey7 = false; }; if (_arg1.keyCode == 56){ pkey8 = false; }; } public function createhitzone(_arg1:Number, _arg2:Number, _arg3:Number){ hitzone[hitzones] = new Object(); hitzone[hitzones].x = _arg1; hitzone[hitzones].y = _arg2; hitzone[hitzones].active = false; hitzone[hitzones].radius = _arg3; hitzones = (hitzones + 1); } public function createshotgunammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ shotgunammo[shotgunammos] = new shotgunammomc(); pickupscontainer.addChild(shotgunammo[shotgunammos]); shotgunammo[shotgunammos].active = true; shotgunammo[shotgunammos].visible = true; shotgunammo[shotgunammos].fade = _arg3; shotgunammo[shotgunammos].x = -500; shotgunammo[shotgunammos].y = -500; shotgunammo[shotgunammos].livetime = 0; shotgunammo[shotgunammos].boxnum = boxes; createbox(_arg1, _arg2, shotgunammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); shotgunammos = (shotgunammos + 1); } public function spawnpickups(_arg1:Number, _arg2:Number){ if (countpickups() == 0){ if (Math.floor((Math.random() * itemchance)) == 0){ item = []; if (player[0].hassmg == true){ item[0] = (((maxsmgammo - player[0].smgammo) / maxsmgammo) * 2); } else { item[0] = 0; }; if (player[0].hasrifle == true){ item[1] = (((maxrifleammo - player[0].rifleammo) / maxrifleammo) * 2); } else { item[1] = 0; }; if (player[0].haspistol == true){ item[2] = (((maxpistolammo - player[0].pistolammo) / maxpistolammo) * 2); } else { item[2] = 0; }; if (player[0].hasshotgun == true){ item[3] = (((maxshotgunammo - player[0].shotgunammo) / maxshotgunammo) * 2); } else { item[3] = 0; }; if (player[0].hasnailgun == true){ item[4] = (((maxnailgunammo - player[0].nailgunammo) / maxnailgunammo) * 2); } else { item[4] = 0; }; item[5] = ((player[0].damage / playerhealth) * 3); chance = -1; highestchance = 1; z = 0; while (z < 6) { if (item[z] > highestchance){ chance = z; highestchance = item[z]; }; z = (z + 1); }; if (chance == 0){ createsmgammo(_arg1, _arg2, true); }; if (chance == 1){ createrifleammo(_arg1, _arg2, true); }; if (chance == 2){ createpistolammo(_arg1, _arg2, true); }; if (chance == 3){ createshotgunammo(_arg1, _arg2, true); }; if (chance == 3){ createshotgunammo(_arg1, _arg2, true); }; if (chance == 4){ createnailgunammo(_arg1, _arg2, true); }; if (chance == 5){ createhealth(_arg1, _arg2, true); }; if (chance != -1){ physicspush(_arg1, _arg2, 16, (Math.random() * 360), (Math.random() * 1.5)); teleportsparks(_arg1, _arg2); }; }; }; } public function segmentcollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Boolean{ var _local5:int; var _local6:uint; var _local7:Number; var _local8:Number; _local5 = 0; _local6 = 0; _local7 = 10000; _local8 = 10000; _local6 = 0; while (_local6 < collisionlines) { if (collisionline[_local6].active == true){ if (rectcollide(_arg1, _arg2, _arg3, _arg4, collisionline[_local6].x1, collisionline[_local6].y1, collisionline[_local6].x2, collisionline[_local6].y2) == true){ possiblelinenum[_local5] = _local6; _local5 = (_local5 + 1); }; }; _local6 = (_local6 + 1); }; _local6 = 0; while (_local6 < _local5) { if (linecollide(_arg1, _arg2, _arg3, _arg4, collisionline[possiblelinenum[_local6]].x1, collisionline[possiblelinenum[_local6]].y1, collisionline[possiblelinenum[_local6]].x2, collisionline[possiblelinenum[_local6]].y2, collisionline[possiblelinenum[_local6]].slope) == true){ _local8 = approxdistance(cx, cy, _arg1, _arg2); if (_local8 < _local7){ _local7 = _local8; bestcx = cx; bestcy = cy; bestsurfacedirection = surfacedirection; }; }; _local6 = (_local6 + 1); }; if (_local7 < 10000){ return (true); }; return (false); } public function createobjectline(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ objectline[objectlines] = new Object(); vobjectline[objectlines] = new Shape(); physicscontainer.addChild(vobjectline[objectlines]); objectline[objectlines].xwidth = (_arg3 * 0.25); objectline[objectlines].x = _arg1; objectline[objectlines].y = _arg2; objectline[objectlines].dx = 0; objectline[objectlines].dy = 0; objectline[objectlines].yheight = _arg3; objectline[objectlines].active = true; objectline[objectlines].firstpnum = ps; objectline[objectlines].wateraffectornum = wateraffectors; createp(_arg1, (_arg2 + (_arg3 * 0.5)), _arg1, _arg2, _arg4, _arg5, _arg6, true); createp(_arg1, (_arg2 + (_arg3 * 0.5)), _arg1, (_arg2 + _arg3), _arg4, _arg5, _arg6, true); createwateraffector(_arg1, (_arg2 + (_arg3 * 0.5)), (_arg3 * 0.5)); objectlines = (objectlines + 1); } public function finddirection(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = (_arg1 - _arg2); if (_local3 < -180){ _local3 = (_local3 + 360); }; if (_local3 > 180){ _local3 = (_local3 - 360); }; return (_local3); } public function countweapons(){ weapons = 0; z = 0; while (z < rifles) { if (rifle[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < shotguns) { if (shotgun[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < pistols) { if (pistol[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < smgs) { if (smg[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < nailguns) { if (nailgun[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < rpgs) { if ((((rpg[z].active == true)) && ((rpg[z].dummy == false)))){ weapons = (weapons + 1); }; z = (z + 1); }; z = 0; while (z < grenadeammos) { if (grenadeammo[z].active == true){ weapons = (weapons + 1); }; z = (z + 1); }; return (weapons); } public function createpoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:int, _arg8:Boolean){ var _local9:Number; var _local10:Number; _local9 = 0; _local10 = 0; point[points] = new Object(); vpoint[points] = new Shape(); physicscontainer.addChild(vpoint[points]); vpoint[points].x = _arg1; vpoint[points].y = _arg2; point[points].restcounter = 0; if (_arg6 == true){ point[points].atrest = false; } else { point[points].atrest = true; }; point[points].ignorecollisions = _arg8; point[points].x = _arg1; point[points].y = _arg2; vpoint[points].visible = true; point[points].active = true; point[points].firstpnum = ps; point[points].bouncetype = 0; createp(_arg1, _arg2, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); if (_arg7 > -1){ _local9 = (p[_arg7].x - p[_arg7].lx); _local10 = (p[_arg7].y - p[_arg7].ly); p[(ps - 1)].lx = (p[(ps - 1)].lx - _local9); p[(ps - 1)].ly = (p[(ps - 1)].ly - _local10); }; points = (points + 1); } public function approxdistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ var _local5:Number; var _local6:Number; _local5 = Math.abs((_arg1 - _arg3)); _local6 = Math.abs((_arg2 - _arg4)); if (_local5 > _local6){ return ((((_local6 * 1.4) + _local5) - _local6)); }; if (_local6 > _local5){ return ((((_local5 * 1.4) + _local6) - _local5)); }; if (_local5 == _local6){ return ((_local5 * 1.4)); }; } public function watersplash(_arg1, _arg2, _arg3){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 5) + 3), ((Math.random() * 30) + 75), ((Math.random() * 3) + 1), 0.96, 0.15, ((Math.random() * 20) + 20), _arg3, true); q = (q + 1); }; } public function computerexplosion(_arg1:Number, _arg2:Number){ electricbuzz.play(); q = 0; while (q < 7) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), (Math.random() * 4), 0.99, 0.05, ((Math.random() * 15) + 15), 0xFFFF00, true); q = (q + 1); }; q = 0; while (q < 7) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), (Math.random() * 360), Math.random(), 0.96, -0.08, ((Math.random() * 50) + 50), 0x4D4D4D, true); q = (q + 1); }; } public function riflemuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ rifleshoot.play(); q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 15) + 15), muzzlesmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 8) + 8), 0, 0, 0, 0, 3, muzzleflashcolor, false); } public function shotgunmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ shotgunshoot.play(); q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 10) + 10), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 15) + 15), muzzlesmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 8) + 8), 0, 0, 0, 0, 3, muzzleflashcolor, false); } public function createtorso(_arg1){ torso[torsos] = new torsomc(); bodypartscontainer.addChild(torso[torsos]); torso[torsos].visible = true; torso[torsos].active = true; torso[torsos].x = -100; torso[torsos].y = -100; torso[torsos].frame = _arg1; torso[torsos].gotoAndPlay((_arg1 + 1)); torsos = (torsos + 1); } public function lasermuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ lasershoot.play(); creategp(((_arg1 + (Math.random() * 8)) - 4), ((_arg2 + (Math.random() * 8)) - 4), ((Math.random() * 4) + 12), 0, 0, 0, 0, 8, 0xFF00, false); } public function stoprain(){ z = 0; while (z < raindrops) { rain[z].active = false; rain[z].visible = false; z = (z + 1); }; } public function easybtnclick(_arg1){ difficulty = 0; wait = -5; gotoAndPlay(6); } public function createpistolammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ pistolammo[pistolammos] = new pistolammomc(); pickupscontainer.addChild(pistolammo[pistolammos]); pistolammo[pistolammos].active = true; pistolammo[pistolammos].visible = true; pistolammo[pistolammos].fade = _arg3; pistolammo[pistolammos].x = -500; pistolammo[pistolammos].y = -500; pistolammo[pistolammos].livetime = 0; pistolammo[pistolammos].boxnum = boxes; createbox(_arg1, _arg2, pistolammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); pistolammos = (pistolammos + 1); } public function createlimb(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:int, _arg5:int, _arg6:int, _arg7:uint){ bloodspray(_arg1, _arg2, 3); squish.play(); limb[limbs] = new Object(); limb[limbs].active = true; limb[limbs].visible = true; limb[limbs].x = -1000; limb[limbs].y = -1000; limb[limbs].frame = _arg6; limb[limbs].livetime = 0; limb[limbs].segments = _arg4; limb[limbs].alpha = 1; limb[limbs].type = _arg3; limb[limbs].frame = _arg6; limb[limbs].facedirection = _arg7; limb[limbs].linenum = -1; limb[limbs].hingenum = -1; limb[limbs].firstupperlegnum = -1; limb[limbs].firstlowerarmnum = -1; limb[limbs].firstupperarmnum = -1; limb[limbs].firstlowerlegnum = -1; if (_arg4 == 1){ limb[limbs].linenum = lines; if (_arg3 == 0){ createline(_arg1, _arg2, _arg1, (_arg2 + lowerarmlength), limbaf, limbg, limbf, true, _arg5, false); limb[limbs].firstlowerarmnum = lowerarms; createlowerarm(_arg6); }; if (_arg3 == 1){ createline(_arg1, _arg2, _arg1, (_arg2 + lowerleglength), limbaf, limbg, limbf, true, _arg5, false); limb[limbs].firstlowerlegnum = lowerlegs; createlowerleg(_arg6); }; }; if (_arg4 == 2){ limb[limbs].hingenum = hinges; if (_arg3 == 0){ createhinge(_arg1, _arg2, upperarmlength, lowerarmlength, lowerarmconstraint, limbaf, limbg, limbf, true, _arg5, false); limb[limbs].firstlowerarmnum = lowerarms; limb[limbs].firstupperarmnum = upperarms; createlowerarm(_arg6); createupperarm(_arg6); }; if (_arg3 == 1){ createhinge(_arg1, _arg2, upperleglength, lowerleglength, lowerlegconstraint, limbaf, limbg, limbf, true, _arg5, false); limb[limbs].firstlowerlegnum = lowerlegs; limb[limbs].firstupperlegnum = upperlegs; createlowerleg(_arg6); createupperleg(_arg6); }; }; limbs = (limbs + 1); } public function chainbreak(_arg1:Number, _arg2:Number){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 2) + 2), (Math.random() * 360), ((Math.random() * 5) + 5), 0.96, 0.1, ((Math.random() * 10) + 10), 0xFFFF00, true); q = (q + 1); }; q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 3) + 3), (Math.random() * 360), (Math.random() * 3), 0.99, 0.05, ((Math.random() * 15) + 15), 0xFFFF00, true); q = (q + 1); }; } public function getplayerinfo(){ playerweapon = player[0].weapon; gplayerdamage = player[0].damage; playerrifleammo = player[0].rifleammo; playerhasrifle = player[0].hasrifle; playerpistolammo = player[0].pistolammo; playerhaspistol = player[0].haspistol; playergrenadeammo = player[0].grenadeammo; playerhasgrenade = player[0].hasgrenade; playershotgunammo = player[0].shotgunammo; playerhasshotgun = player[0].hasshotgun; playersmgammo = player[0].smgammo; playerhassmg = player[0].hassmg; playernailgunammo = player[0].nailgunammo; playerhasnailgun = player[0].hasnailgun; playerrpgammo = player[0].rpgammo; playerhasrpg = player[0].hasrpg; playerhaschainsaw = player[0].haschainsaw; } public function createlegB(){ legB[legBs] = new legBmc(); bodypartscontainer.addChild(legB[legBs]); legB[legBs].active = true; legB[legBs].visible = true; legB[legBs].x = -100; legB[legBs].y = -100; legB[legBs].frame = 0; legB[legBs].framerate = 1; legBs = (legBs + 1); } public function createlegC(){ legC[legCs] = new legCmc(); bodypartscontainer.addChild(legC[legCs]); legC[legCs].active = true; legC[legCs].visible = true; legC[legCs].x = -100; legC[legCs].y = -100; legC[legCs].frame = 0; legC[legCs].framerate = 1; legCs = (legCs + 1); } public function createlegD(){ legD[legDs] = new legDmc(); bodypartscontainer.addChild(legD[legDs]); legD[legDs].active = true; legD[legDs].visible = true; legD[legDs].x = -100; legD[legDs].y = -100; legD[legDs].frame = 0; legD[legDs].framerate = 1; legDs = (legDs + 1); } public function createnailgun(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ nailgun[nailguns] = new nailgunmc(); weaponscontainer.addChild(nailgun[nailguns]); nailgun[nailguns].active = true; nailgun[nailguns].visible = true; nailgun[nailguns].fade = _arg5; nailgun[nailguns].facedirection = _arg3; if (_arg3 == 1){ nailgun[nailguns].scaleX = -1; }; nailgun[nailguns].x = -1000; nailgun[nailguns].y = -1000; nailgun[nailguns].livetime = 0; nailgun[nailguns].pointdirection = _arg4; nailgun[nailguns].linenum = lines; createline((_arg1 - vectorx(_arg4, (nailgunlength * 0.5))), (_arg2 - vectory(_arg4, (nailgunlength * 0.5))), (_arg1 + vectorx(_arg4, (nailgunlength * 0.5))), (_arg2 + vectory(_arg4, (nailgunlength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); nailguns = (nailguns + 1); } public function createline(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Boolean, _arg9:int, _arg10:Boolean){ var _local11:Number; var _local12:Number; var _local13:uint; _local11 = 0; _local12 = 0; line[lines] = new Object(); vline[lines] = new Shape(); physicscontainer.addChild(vline[lines]); line[lines].restcounter = 0; if (_arg8 == true){ line[lines].atrest = false; } else { line[lines].atrest = true; }; line[lines].ignorecollisions = _arg10; line[lines].x = x; line[lines].y = y; line[lines].active = true; line[lines].linelength = approxdistance(_arg1, _arg2, _arg3, _arg4); line[lines].firstpnum = ps; createp(((_arg1 + _arg3) * 0.5), ((_arg2 + _arg4) * 0.5), _arg1, _arg2, _arg5, _arg6, _arg7, _arg8); createp(((_arg1 + _arg3) * 0.5), ((_arg2 + _arg4) * 0.5), _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); if (_arg9 > -1){ _local11 = (p[_arg9].x - p[_arg9].lx); _local12 = (p[_arg9].y - p[_arg9].ly); _local13 = (ps - 2); _local13 = (ps - 2); while (_local13 < ps) { p[_local13].lx = (p[_local13].lx - _local11); p[_local13].ly = (p[_local13].ly - _local12); _local13 = (_local13 + 1); }; }; lines = (lines + 1); } public function createlink(_arg1:uint){ link[links] = new linkmc(); debriscontainer.addChild(link[links]); link[links].active = true; link[links].visible = true; link[links].x = -1000; link[links].y = -1000; link[links].frame = _arg1; link[links].alpha = 1; links = (links + 1); } public function createlegA(){ legA[legAs] = new legAmc(); bodypartscontainer.addChild(legA[legAs]); legA[legAs].active = true; legA[legAs].visible = true; legA[legAs].x = -100; legA[legAs].y = -100; legA[legAs].frame = 0; legA[legAs].framerate = 1; legAs = (legAs + 1); } public function createmegazombie(_arg1:Number, _arg2:Number){ megazombie[megazombies] = new megazombiemc(); enemycontainer.addChild(megazombie[megazombies]); createmegazombiegun((_arg1 + 20), (_arg2 + 10), 270); megazombie[megazombies].movex = 0; megazombie[megazombies].movey = 0; megazombie[megazombies].movedirection = 90; megazombie[megazombies].movetargetx = 0; megazombie[megazombies].movetargety = -1; megazombie[megazombies].shots = 0; megazombie[megazombies].active = true; megazombie[megazombies].visible = true; megazombie[megazombies].x = _arg1; megazombie[megazombies].y = _arg2; megazombie[megazombies].cy = _arg2; megazombie[megazombies].cx = _arg1; megazombie[megazombies].woundtimer = 0; megazombie[megazombies].recovertimer = 0; loopchannel2 = megazombieengine.play(0, 1000); megazombie[megazombies].sounddelay = 0; megazombie[megazombies].stucktimer = 0; megazombie[megazombies].shootdelay = 0; megazombie[megazombies].burndelay = 0; megazombie[megazombies].damage = 0; megazombie[megazombies].targetdirection = 0; megazombie[megazombies].hastarget = false; megazombie[megazombies].restdirection = 270; megazombie[megazombies].pointdirection = 270; megazombie[megazombies].barrelnum = (megazombieguns - 1); megazombies = (megazombies + 1); } public function createupperleg(_arg1){ upperleg[upperlegs] = new upperlegmc(); bodypartscontainer.addChild(upperleg[upperlegs]); upperleg[upperlegs].visible = true; upperleg[upperlegs].active = true; upperleg[upperlegs].x = -100; upperleg[upperlegs].y = -100; upperleg[upperlegs].frame = _arg1; upperleg[upperlegs].gotoAndPlay((_arg1 + 1)); upperlegs = (upperlegs + 1); } public function createchain(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Boolean, _arg5:Number, _arg6:Number, _arg7:Boolean, _arg8:Boolean, _arg9:Boolean, _arg10:uint){ chain[chains] = new Object(); chain[chains].active = true; chain[chains].type = _arg10; chain[chains].x = -1000; chain[chains].y = -1000; chain[chains].ropenum = ropes; chaindistance = approxdistance(_arg1, _arg2, _arg5, _arg6); segments = Math.round((chaindistance / chainsegmentlength)); createrope(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, segments, chainsegmentlength, false, chainaf, chaing, chainf, true, -1, _arg9); chain[chains].linknum = links; alternatenum = 0; df = 0; df = 0; while (df < (segments - 1)) { createlink(((_arg10 * 2) + alternatenum)); if (alternatenum == 0){ alternatenum = 1; } else { alternatenum = 0; }; df = (df + 1); }; chains = (chains + 1); } public function reducedbtn1click(_arg1){ bulletcasingquality = 1; } public function menubtn2click(_arg1){ gotoAndPlay(3); } public function blockdistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number; var _local6:Number; _local5 = Math.abs((_arg1 - _arg3)); _local6 = Math.abs((_arg2 - _arg4)); return ((_local5 + _local6)); } public function createturretbarrel(_arg1:Number, _arg2:Number, _arg3:Number){ turretbarrel[turretbarrels] = new turretbarrelmc(); enemycontainer.addChild(turretbarrel[turretbarrels]); turretbarrel[turretbarrels].active = true; turretbarrel[turretbarrels].visible = true; turretbarrel[turretbarrels].x = _arg1; turretbarrel[turretbarrels].y = _arg2; turretbarrel[turretbarrels].rotation = -(_arg3); turretbarrels = (turretbarrels + 1); } public function verlet(_arg1:uint, _arg2:uint, _arg3:Number){ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = (p[_arg2].x - p[_arg1].x); _local5 = (p[_arg2].y - p[_arg1].y); _local6 = tdistance[Math.round(Math.abs(_local4))][Math.round(Math.abs(_local5))]; _local7 = 1; if (_local6 != 0){ _local7 = ((0.5 * (_local6 - _arg3)) / _local6); }; _local4 = (_local4 * _local7); _local5 = (_local5 * _local7); p[_arg1].x = (p[_arg1].x + _local4); p[_arg1].y = (p[_arg1].y + _local5); p[_arg2].x = (p[_arg2].x - _local4); p[_arg2].y = (p[_arg2].y - _local5); } public function fullbtn1click(_arg1){ bulletcasingquality = 0; } public function createbarrel(_arg1:Number, _arg2:Number, _arg3:uint){ barrel[barrels] = new barrelmc(); midgroundmappropscontainer.addChild(barrel[barrels]); barrel[barrels].active = true; barrel[barrels].visible = true; barrel[barrels].x = _arg1; barrel[barrels].y = _arg2; barrel[barrels].frame = _arg3; barrel[barrels].hitzonenum = hitzones; createhitzone(barrel[barrels].x, (barrel[barrels].y + (barrelheight * 0.5)), barrelradius); barrels = (barrels + 1); } public function createrope(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Boolean, _arg5:Number, _arg6:Number, _arg7:Boolean, _arg8:Boolean, _arg9:int, _arg10:Number, _arg11:Boolean, _arg12:Number, _arg13:Number, _arg14:Number, _arg15:Boolean, _arg16:int, _arg17:Boolean){ var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local24:int; var _local25:uint; _local18 = 0; _local19 = 0; _local20 = 0; _local21 = 0; _local22 = 0; _local23 = 0; _local24 = 0; rope[ropes] = new Object(); vrope[ropes] = new Shape(); physicscontainer.addChild(vrope[ropes]); rope[ropes].restcounter = 0; if (_arg15 == true){ rope[ropes].atrest = false; } else { rope[ropes].atrest = true; }; rope[ropes].x = ((_arg1 + _arg5) * 0.5); rope[ropes].y = ((_arg2 + _arg6) * 0.5); rope[ropes].active = true; rope[ropes].ignorecollisions = _arg17; rope[ropes].segmentlength = _arg10; rope[ropes].segments = _arg9; rope[ropes].elastic = _arg11; rope[ropes].firstpnum = ps; rope[ropes].maxlength = (_arg9 * _arg10); rope[ropes].attachedtoparticle1 = _arg3; rope[ropes].attachedtoparticle2 = _arg7; rope[ropes].locked1 = _arg4; rope[ropes].lockx1 = _arg1; rope[ropes].locky1 = _arg2; rope[ropes].locked2 = _arg8; rope[ropes].lockx2 = _arg5; rope[ropes].locky2 = _arg6; _local20 = (approxdistance(_arg1, _arg2, _arg5, _arg6) / _arg9); _local21 = directiontopoint(_arg1, _arg2, _arg5, _arg6); _local22 = _arg1; _local23 = _arg2; if (_arg3 == true){ _local24 = findclosestp(_arg1, _arg2); rope[ropes].attachedparticle1 = _local24; if (_local24 > -1){ _local22 = p[_local24].x; _local23 = p[_local24].y; }; }; createp(((_arg1 + _arg5) * 0.5), ((_arg2 + _arg6) * 0.5), _local22, _local23, _arg12, _arg13, _arg14, _arg15); _local25 = 0; _local25 = 0; while (_local25 < (_arg9 - 2)) { createp(((_arg1 + _arg5) * 0.5), ((_arg2 + _arg6) * 0.5), (p[(ps - 1)].x + vectorx2(_local21, _local20)), (p[(ps - 1)].y + vectory2(_local21, _local20)), _arg12, _arg13, _arg14, _arg15); _local25 = (_local25 + 1); }; _local22 = _arg5; _local23 = _arg6; if (_arg7 == true){ _local24 = findclosestp(_arg5, _arg6); rope[ropes].attachedparticle2 = _local24; if (_local24 > -1){ _local22 = p[_local24].x; _local23 = p[_local24].y; }; }; createp(((_arg1 + _arg5) * 0.5), ((_arg2 + _arg6) * 0.5), _local22, _local23, _arg12, _arg13, _arg14, true); if (_arg16 > -1){ _local18 = (p[_arg16].x - p[_arg16].lx); _local19 = (p[_arg16].y - p[_arg16].ly); _local25 = (ps - _arg9); while (_local25 < ps) { p[_local25].lx = (p[_local25].lx - _local18); p[_local25].ly = (p[_local25].ly - _local19); _local25 = (_local25 + 1); }; }; ropes = (ropes + 1); } public function pcollisions(_arg1:uint):int{ var _local2:int; var _local3:Number; var _local4:uint; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = 0; _local3 = 10000; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local4 = 0; while (_local4 < possiblelines) { if (linecollide(p[_arg1].sx, p[_arg1].sy, p[_arg1].x, p[_arg1].y, collisionline[possiblelinenum[_local4]].x1, collisionline[possiblelinenum[_local4]].y1, collisionline[possiblelinenum[_local4]].x2, collisionline[possiblelinenum[_local4]].y2, collisionline[possiblelinenum[_local4]].slope) == true){ _local5 = approxdistance(cx, cy, p[_arg1].sx, p[_arg1].sy); if (_local5 < _local3){ _local3 = _local5; bestcx = cx; bestcy = cy; bestsurfacedirection = surfacedirection; }; }; _local4 = (_local4 + 1); }; if (_local3 < 10000){ _local6 = directiontopoint(p[_arg1].sx, p[_arg1].sy, bestcx, bestcy); _local7 = (approxdistance(p[_arg1].x, p[_arg1].y, p[_arg1].lx, p[_arg1].ly) * p[_arg1].f); _local8 = (approxdistance(p[_arg1].x, p[_arg1].y, bestcx, bestcy) * p[_arg1].f); _local9 = correctdirection(((bestsurfacedirection + finddirection((bestsurfacedirection + 90), _local6)) + 270)); _local10 = Math.abs(finddirection((bestsurfacedirection + 90), _local6)); if (_local10 < 90){ _local10 = correctdirection((bestsurfacedirection - 90)); } else { _local10 = correctdirection((bestsurfacedirection + 90)); }; p[_arg1].sx = (bestcx + vectorx(_local10, safetydisplacement)); p[_arg1].sy = (bestcy + vectory(_local10, safetydisplacement)); p[_arg1].x = (p[_arg1].sx + vectorx(_local9, _local8)); p[_arg1].y = (p[_arg1].sy + vectory(_local9, _local8)); p[_arg1].lx = (p[_arg1].x - vectorx(_local9, _local7)); p[_arg1].ly = (p[_arg1].y - vectory(_local9, _local7)); _local2 = 1; } else { p[_arg1].sy = p[_arg1].y; p[_arg1].sx = p[_arg1].x; }; _local4 = 0; while (_local4 < objectlines) { if (objectline[_local4].active == true){ if (pointcollide(p[_arg1].x, p[_arg1].y, (objectline[_local4].x - (objectline[_local4].xwidth * 0.5)), objectline[_local4].y, (objectline[_local4].x + (objectline[_local4].xwidth * 0.5)), (objectline[_local4].y + objectline[_local4].yheight)) == true){ _local2 = 2; p[_arg1].x = (p[_arg1].x + (objectline[_local4].dx * characterpushratio)); p[_arg1].y = (p[_arg1].y + (objectline[_local4].dy * characterpushratio)); }; }; _local4 = (_local4 + 1); }; return (_local2); } public function createstring(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11){ vstring[strings] = new Shape(); string[strings] = new Object(); debriscontainer.addChild(vstring[strings]); string[strings].color = _arg10; string[strings].alpha = _arg11; string[strings].active = true; string[strings].x = -1000; string[strings].y = -1000; string[strings].ropenum = ropes; stringdistance = approxdistance(_arg1, _arg2, _arg5, _arg6); segments = Math.round((stringdistance / stringsegmentlength)); createrope(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, segments, stringsegmentlength, true, stringaf, stringg, stringf, true, -1, _arg9); strings = (strings + 1); } public function createcomputer(_arg1:Number, _arg2:Number){ computer[computers] = new computermc(); backgroundmappropscontainer.addChild(computer[computers]); computer[computers].active = true; computer[computers].visible = true; computer[computers].x = _arg1; computer[computers].y = _arg2; computer[computers].frame = 0; computer[computers].hitzonenum = hitzones; createhitzone(computer[computers].x, (computer[computers].y + (computerheight * 0.5)), computerradius); computers = (computers + 1); } public function createrifleammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ rifleammo[rifleammos] = new rifleammomc(); pickupscontainer.addChild(rifleammo[rifleammos]); rifleammo[rifleammos].active = true; rifleammo[rifleammos].visible = true; rifleammo[rifleammos].fade = _arg3; rifleammo[rifleammos].x = -500; rifleammo[rifleammos].y = -500; rifleammo[rifleammos].livetime = 0; rifleammo[rifleammos].boxnum = boxes; createbox(_arg1, _arg2, rifleammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); rifleammos = (rifleammos + 1); } public function teleportsparks(_arg1:Number, _arg2:Number){ teleport.play(); q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 4) + 8), (Math.random() * 360), (Math.random() * 2), 0.97, 0, ((Math.random() * 15) + 15), 5658340, true); q = (q + 1); }; } public function createwaterpool(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number){ var _local12:Number; var _local13:Number; var _local14:uint; _local12 = 0; _local13 = 0; _local14 = 0; waterpool[waterpools] = new Object(); vwaterpool[waterpools] = new Shape(); physicscontainer.addChild(vwaterpool[waterpools]); waterpool[waterpools].active = true; waterpool[waterpools].alpha = _arg11; vwaterpool[waterpools].visible = true; waterpool[waterpools].watercolor = _arg10; waterpool[waterpools].windamount = _arg8; waterpool[waterpools].xwidth = _arg3; waterpool[waterpools].depth = _arg4; waterpool[waterpools].windrandomness = (1 / _arg9); waterpool[waterpools].g = _arg6; waterpool[waterpools].points = _arg5; waterpool[waterpools].pointwidth = (_arg3 / _arg5); waterpool[waterpools].x = _arg1; waterpool[waterpools].y = _arg2; vwaterpool[waterpools].x = _arg1; vwaterpool[waterpools].y = _arg2; waterpool[waterpools].ffactor = _arg7; waterpool[waterpools].waterpx = new Array(); waterpool[waterpools].waterpy = new Array(); waterpool[waterpools].waterpvs = new Array(); _local14 = 0; while (_local14 < _arg5) { waterpool[waterpools].waterpx[_local14] = (_arg1 + (waterpool[waterpools].pointwidth * _local14)); waterpool[waterpools].waterpy[_local14] = _arg2; waterpool[waterpools].waterpvs[_local14] = 0; _local14 = (_local14 + 1); }; waterpools = (waterpools + 1); } function frame2(){ wait = 0; particlealpha = 0; particlequality = 0; debrisquality = 0; bulletcasingquality = 0; graphicsquality = 0; difficulty = 0; this.x = 0; this.y = 0; this.scaleX = 1; this.scaleY = 1; url = new URLRequest("http://www.mofunzone.com"); } function frame4(){ stop(); Mouse.show(); fullbtn0.addEventListener(MouseEvent.CLICK, fullbtn0click); reducedbtn0.addEventListener(MouseEvent.CLICK, reducedbtn0click); nonebtn0.addEventListener(MouseEvent.CLICK, nonebtn0click); fullbtn1.addEventListener(MouseEvent.CLICK, fullbtn1click); reducedbtn1.addEventListener(MouseEvent.CLICK, reducedbtn1click); nonebtn1.addEventListener(MouseEvent.CLICK, nonebtn1click); fullbtn2.addEventListener(MouseEvent.CLICK, fullbtn2click); reducedbtn2.addEventListener(MouseEvent.CLICK, reducedbtn2click); fullbtn3.addEventListener(MouseEvent.CLICK, fullbtn3click); nonebtn3.addEventListener(MouseEvent.CLICK, nonebtn3click); fullbtn4.addEventListener(MouseEvent.CLICK, fullbtn4click); reducedbtn4.addEventListener(MouseEvent.CLICK, reducedbtn4click); menubtn.addEventListener(MouseEvent.CLICK, menubtnclick); this.addEventListener(Event.ENTER_FRAME, menustep2); } function frame6(){ stop(); StageScaleMode.NO_SCALE; debugmode = false; showphysicsobjects = debugmode; pickuptextdelay = 0; pickuptext = ""; messagetextdelay = 0; messagetext = ""; messagestring = ""; ammotext = ""; healthtext = ""; isplayer = false; inmap = false; lowestframerate = 0; cutscene = false; deathcounter = 0; playerhealth = 0; if (difficulty == 0){ playerhealth = 600; }; if (difficulty == 1){ playerhealth = 450; }; if (difficulty == 2){ playerhealth = 300; }; if (graphicsquality == 0){ StageQuality.BEST; }; if (graphicsquality == 1){ StageQuality.HIGH; }; if (graphicsquality == 2){ StageQuality.MEDIUM; }; foreground = new MovieClip(); background = new MovieClip(); backdrop = new MovieClip(); cursor = new MovieClip(); background = new backgroundmc(); foreground = new foregroundmc(); backdrop = new backdropmc(); cursor = new cursormc(); addChild(backdrop); addChild(background); bool1 = false; bool2 = false; bool3 = false; bool4 = false; bool5 = false; bool6 = false; counter1 = 0; counter2 = 0; counter3 = 0; counter4 = 0; counter5 = 0; counter6 = 0; mapnumber = 0; xposition = 0; yposition = 0; rainfall = new Sound(); rainfall = new rainfallsound(); schannel = new SoundChannel(); loopchannel = new SoundChannel(); loopchannel2 = new SoundChannel(); smgshoot = new Sound(); smgshoot = new smgshootsound(); rifleshoot = new Sound(); rifleshoot = new rifleshootsound(); pistolshoot = new Sound(); pistolshoot = new pistolshootsound(); grenadeexplode = new Sound(); grenadeexplode = new grenadeexplodesound(); shotgunshoot = new Sound(); shotgunshoot = new shotgunshootsound(); turretshoot = new Sound(); turretshoot = new turretshootsound(); turretexplode = new Sound(); turretexplode = new turretexplodesound(); shell1 = new Sound(); shell1 = new shell1sound(); shell2 = new Sound(); shell2 = new shell2sound(); shell3 = new Sound(); shell3 = new shell3sound(); shell4 = new Sound(); shell4 = new shell4sound(); shell5 = new Sound(); shell5 = new shell5sound(); berserk = new Sound(); berserk = new berserksound(); teleport = new Sound(); teleport = new teleportsound(); grenadebounce1 = new Sound(); grenadebounce1 = new grenadebounce1sound(); grenadebounce2 = new Sound(); grenadebounce2 = new grenadebounce2sound(); grenadebounce3 = new Sound(); grenadebounce3 = new grenadebounce3sound(); ammopickup = new Sound(); ammopickup = new ammopickupsound(); weaponpickup = new Sound(); weaponpickup = new weaponpickupsound(); healthpickup = new Sound(); healthpickup = new healthpickupsound(); chainsawrev = new Sound(); chainsawrev = new chainsawrevsound(); chainsawstart = new Sound(); chainsawstart = new chainsawstartsound(); squish = new Sound(); squish = new squishsound(); ratsqueak = new Sound(); ratsqueak = new ratsqueaksound(); zombiedie = new Sound(); zombiedie = new zombiediesound(); playerdamage = new Sound(); playerdamage = new playerdamagesound(); crowcaw = new Sound(); crowcaw = new crowcawsound(); explosion = new Sound(); explosion = new explosionsound(); dryfire = new Sound(); dryfire = new dryfiresound(); drip = new Sound(); drip = new dripsound(); smallcrash = new Sound(); smallcrash = new smallcrashsound(); bigcrash = new Sound(); bigcrash = new bigcrashsound(); waterfall = new Sound(); waterfall = new waterfallsound(); waterspray = new Sound(); waterspray = new waterspraysound(); metalcrash = new Sound(); metalcrash = new metalcrashsound(); hydrantspray = new Sound(); hydrantspray = new hydrantspraysound(); electricbuzz = new Sound(); electricbuzz = new electricbuzzsound(); dooropen = new Sound(); dooropen = new dooropensound(); alarm = new Sound(); alarm = new alarmsound(); nailhit = new Sound(); nailhit = new nailhitsound(); music = new Sound(); music = new musicsound(); rocketshoot = new Sound(); rocketshoot = new rocketshootsound(); lasershoot = new Sound(); lasershoot = new lasershootsound(); plane = new Sound(); plane = new planesound(); megazombieintro = new Sound(); megazombieintro = new megazombieintrosound(); megazombiedie = new Sound(); megazombiedie = new megazombiediesound(); megazombieexhaust = new Sound(); megazombieexhaust = new megazombieexhaustsound(); megazombieengine = new Sound(); megazombieengine = new megazombieenginesound(); q = 0; numberofps = 0; node = new Array(); nodes = 0; winzone = new Array(); winzones = 0; killzone = new Array(); killzones = 0; damagezone = new Array(); damagezones = 0; item = new Array(); spawnfacedirection = 0; spawnpointdirection = 0; weapons = 0; pickups = 0; enemies = 0; currentnode = 0; found = false; chance = 0; highestchance = 0; playerweapon = chainsawnum; gplayerdamage = 0; playerrifleammo = 0; playerhasrifle = false; playerpistolammo = 0; playerhaspistol = false; playergrenadeammo = 0; playerhasgrenade = false; playershotgunammo = 0; playerhasshotgun = false; playersmgammo = 0; playerhassmg = false; playernailgunammo = 0; playerhasnailgun = false; playerrpgammo = 0; playerhasrpg = false; playerhaschainsaw = false; health = new Array(); healths = 0; shotgunammo = new Array(); shotgunammos = 0; smgammo = new Array(); smgammos = 0; pistolammo = new Array(); pistolammos = 0; grenadeammo = new Array(); grenadeammos = 0; rifleammo = new Array(); rifleammos = 0; nailgunammo = new Array(); nailgunammos = 0; pickupscontainer = new Sprite(); addChild(pickupscontainer); rifle = new Array(); rifles = 0; pistol = new Array(); pistols = 0; shotgun = new Array(); shotguns = 0; smg = new Array(); smgs = 0; nailgun = new Array(); nailguns = 0; rpg = new Array(); rpgs = 0; chainsaw = new Array(); chainsaws = 0; weaponscontainer = new Sprite(); addChild(weaponscontainer); tempx1 = 0; tempy1 = 0; tempx2 = 0; tempy2 = 0; temprotation = 0; players = 0; player = new Array(); deltahs = 0; deltavs = 0; maxmovespeed = 0; movefactor = 0; groundoffset = 0; deltahs2 = 0; temporaryhs = 0; bodynormal = 0; directiondelta = 0; legsoffset = 0; gundirection = 0; enemyC = new Array(); enemyCs = 0; enemyB = new Array(); enemyBs = 0; enemyA = new Array(); enemyAs = 0; turretbarrel = new Array(); turretbarrels = 0; turretbase = new Array(); turretbases = 0; megazombie = new Array(); megazombies = 0; megazombiegun = new Array(); megazombieguns = 0; enemycontainer = new Sprite(); addChild(enemycontainer); computer = new Array(); computers = 0; city = new Array(); cities = 0; backgroundmappropscontainer = new Sprite(); addChild(backgroundmappropscontainer); npccontainer = new Sprite(); addChild(npccontainer); rats = 0; rat = new Array(); crows = 0; crow = new Array(); crowwings = 0; crowwing = new Array(); barrel = new Array(); barrels = 0; crate = new Array(); crates = 0; midgroundmappropscontainer = new Sprite(); addChild(midgroundmappropscontainer); legA = new Array(); legAs = 0; legB = new Array(); legBs = 0; legC = new Array(); legCs = 0; legD = new Array(); legDs = 0; bodyA = new Array(); bodyAs = 0; bodyB = new Array(); bodyBs = 0; bodyC = new Array(); bodyCs = 0; bodyD = new Array(); bodyDs = 0; torsos = 0; torso = new Array(); upperlegs = 0; upperleg = new Array(); lowerlegs = 0; lowerleg = new Array(); upperarms = 0; upperarm = new Array(); lowerarms = 0; lowerarm = new Array(); heads = 0; head = new Array(); bodypartscontainer = new Sprite(); addChild(bodypartscontainer); vstring = new Array(); string = new Array(); strings = 0; pointdebriss = 0; pointdebris = new Array(); linedebriss = 0; linedebris = new Array(); boxdebriss = 0; boxdebris = new Array(); chaindebriss = 0; chaindebris = new Array(); limbs = 0; limb = new Array(); corpses = 0; corpse = new Array(); bulletcasing = new Array(); bulletcasings = 0; chain = new Array(); chains = 0; links = 0; link = new Array(); debriscontainer = new Sprite(); addChild(debriscontainer); dchance = 0; bcchance = 0; alternatenum = 0; df = 0; z = 0; segments = 0; chaindistance = 0; countedcorpses = 0; stringdistance = 0; grenades = 0; grenade = new Array(); nails = 0; nail = new Array(); lasers = 0; laser = new Array(); rockets = 0; rocket = new Array(); movetrails = 0; movetrail = new Array(); blast = new Array(); blasts = 0; bullet = new Array(); bullets = 0; hitzone = new Array(); hitzones = 0; hit = new Array(); hits = 0; i = 0; t = 0; foundbullet = 0; foundblast = 0; impactx = 0; impacty = 0; hitsomething = false; objectdirection = 0; tempnormal = 0; tempdistance = 0; damagetaken = 0; explosiondistance = 0; blastdamage = 0; randsound = 0; projectilecontainer = new Sprite(); addChild(projectilecontainer); leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; walldoor = new Array(); walldoors = 0; floordoor = new Array(); floordoors = 0; spinlight = new Array(); spinlights = 0; foregroundmappropscontainer = new Sprite(); addChild(foregroundmappropscontainer); physicscontainer = new Sprite(); addChild(physicscontainer); tsin = new Array(); tcos = new Array(); o = 0; u = 0; o = 0; while (o <= 360) { tsin[o] = Math.sin((o * degtorad)); tcos[o] = Math.cos((o * degtorad)); o = (o + 1); }; tdistance = new Array(); o = 0; while (o < 100) { tdistance[o] = new Array(); u = 0; while (u < 100) { tdistance[o][u] = Math.sqrt(((o * o) + (u * u))); u = (u + 1); }; o = (o + 1); }; tdtp = new Array(); o = 0; while (o < 101) { tdtp[o] = (Math.abs(Math.atan((o / 100))) * radtodeg); o = (o + 1); }; wateraffector = new Array(); wateraffectors = 0; possiblelinenum = new Array(); possiblelines = 0; p = new Array(); ps = 0; gp = new Array(); vgp = new Array(); gps = 0; objectline = new Array(); vobjectline = new Array(); objectlines = 0; hinge = new Array(); vhinge = new Array(); hinges = 0; drawnline = new Array(); vdrawnline = new Array(); drawnlines = 0; point = new Array(); vpoint = new Array(); points = 0; rope = new Array(); vrope = new Array(); ropes = 0; line = new Array(); vline = new Array(); lines = 0; collisionline = new Array(); vcollisionline = new Array(); collisionlines = 0; waterpool = new Array(); vwaterpool = new Array(); waterpools = 0; ragdoll = new Array(); vragdoll = new Array(); ragdolls = 0; box = new Array(); vbox = new Array(); boxes = 0; bestcx = 0; bestcy = 0; bestsurfacedirection = 0; cx = 0; cy = 0; surfacedirection = 0; addChild(foreground); r = 0; weapondisplays = 0; weapondisplay = new Array(); r = 0; while (r < 8) { weapondisplay[r] = new weapondisplaymc(); addChild(weapondisplay[r]); weapondisplay[r].active = true; weapondisplay[r].frame = r; weapondisplays = (weapondisplays + 1); r = (r + 1); }; ammodisplay = new MovieClip(); healthdisplay = new MovieClip(); healthbar = new MovieClip(); berserkdisplay = new MovieClip(); berserkbar = new MovieClip(); hudpickuptext = new TextField(); hudhealthtext = new TextField(); hudammotext = new TextField(); hudmessagetext = new TextField(); fontformat = new format2(); textformat1 = new TextFormat(); textformat1.font = fontformat.fontName; textformat1.align = TextFormatAlign.CENTER; textformat1.color = 0xFFFFFF; textformat2 = new TextFormat(); textformat2.font = fontformat.fontName; textformat2.align = TextFormatAlign.LEFT; textformat2.color = 0xFFFFFF; clickedbutton = false; textformat3 = new TextFormat(); textformat3.font = fontformat.fontName; textformat3.align = TextFormatAlign.RIGHT; textformat3.color = 0xFFFFFF; hudpickuptext.embedFonts = true; hudhealthtext.embedFonts = true; hudammotext.embedFonts = true; hudmessagetext.embedFonts = true; hudpickuptext.defaultTextFormat = textformat1; hudhealthtext.defaultTextFormat = textformat2; hudammotext.defaultTextFormat = textformat2; hudmessagetext.defaultTextFormat = textformat1; hudpickuptext.width = 600; hudhealthtext.width = 200; hudammotext.width = 200; hudmessagetext.width = 600; hudpickuptext.selectable = false; hudhealthtext.selectable = false; hudammotext.selectable = false; hudmessagetext.selectable = false; berserkdisplay = new berserkdisplaymc(); berserkbar = new berserkbarmc(); berserkbar.fadedirection = 1; ammodisplay = new ammodisplaymc(); healthdisplay = new healthdisplaymc(); healthbar = new healthbarmc(); watermarkbtn0 = new MovieClip(); watermarkbtn0 = new watermarkbtn(); addChild(watermarkbtn0); addChild(hudpickuptext); addChild(hudhealthtext); addChild(healthbar); addChild(berserkbar); addChild(healthdisplay); addChild(berserkdisplay); addChild(ammodisplay); addChild(hudammotext); addChild(hudmessagetext); addChild(cursor); effectscontainer = new Sprite(); addChild(effectscontainer); rain = new Array(); raindrops = 0; if (particlequality == 0){ raindrops = 16; } else { raindrops = 8; }; z = 0; while (z < raindrops) { rain[z] = new rainmc(); effectscontainer.addChild(rain[z]); rain[z].active = true; rain[z].visible = true; rain[z].x = (Math.random() * 600); rain[z].y = (Math.random() * 300); rain[z].vs = ((Math.random() * 5) + 3); rain[z].height = (rain[z].vs * 2); if (particlealpha == 0){ rain[z].alpha = (rain[z].vs * 0.1); }; rain[z].alpha = 100; z = (z + 1); }; stoprain(); fog = new MovieClip(); fog = new fogmc(); effectscontainer.addChild(fog); stopfog(); screenflash = new MovieClip(); screenflash = new screenflashmc(); effectscontainer.addChild(screenflash); stopflash(); fire = new Array(); fires = 0; berserkscreen = new MovieClip(); berserkscreen = new berserkscreenmc(); effectscontainer.addChild(berserkscreen); stopberserkscreen(); fade = new MovieClip(); fade = new fademc(); effectscontainer.addChild(fade); stopfade(); clicking = false; clicktime = 0; pkeyq = false; pkeyspace = false; pkeya = false; pkeyd = false; pkeyw = false; pkey1 = false; pkey2 = false; pkey3 = false; pkey4 = false; pkey5 = false; pkey6 = false; pkey7 = false; pkey8 = false; selectedp = 0; pdistance = 0; lowestpnum2 = 0; lowestpdistance = 0; u2 = 0; temppdistance = 0; this.addEventListener(Event.ENTER_FRAME, step); stage.addEventListener(MouseEvent.MOUSE_DOWN, mousedown); stage.addEventListener(MouseEvent.MOUSE_UP, mouseup); stage.addEventListener(KeyboardEvent.KEY_DOWN, keydown, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_UP, keyup, false, 0, true); loadmap(1); } function frame5(){ stop(); Mouse.show(); menubtn2.addEventListener(MouseEvent.CLICK, menubtn2click); easybtn.addEventListener(MouseEvent.CLICK, easybtnclick); mediumbtn.addEventListener(MouseEvent.CLICK, mediumbtnclick); hardbtn.addEventListener(MouseEvent.CLICK, hardbtnclick); } public function countcorpses():int{ countedcorpses = 0; z = 0; while (z < corpses) { if (corpse[z].active == true){ countedcorpses = (countedcorpses + 1); }; z = (z + 1); }; return (countedcorpses); } public function electricsparks(_arg1:Number, _arg2:Number){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 2) + 2), (Math.random() * 360), (Math.random() * 4), 0.99, 0.05, ((Math.random() * 10) + 10), 0xFFFF00, true); q = (q + 1); }; } function frame3(){ stop(); Mouse.show(); optionsbtn.addEventListener(MouseEvent.CLICK, optionsbtnclick); beginbtn.addEventListener(MouseEvent.CLICK, beginbtnclick); mofunzonebtn.addEventListener(MouseEvent.CLICK, mofunzonebtnclick); moregamesbtn.addEventListener(MouseEvent.CLICK, moregamesbtnclick); } public function nuclearblast(_arg1:Number, _arg2:Number){ startflash(); explosion.play(); q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 10) + 20), ((Math.random() * 20) + 80), (Math.random() * 10), 0.85, -0.04, ((Math.random() * 50) + 150), explosionsmokecolor, false); q = (q + 1); }; q = 0; while (q < 15) { creategp(_arg1, (_arg2 - 30), ((Math.random() * 10) + 20), (Math.random() * 360), ((Math.random() * 5) + 1), 0.92, -0.1, ((Math.random() * 50) + 150), explosionsmokecolor, false); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 10) + 30), 0, 0, 0.92, -0.12, ((Math.random() * 50) + 100), 0xFFFF00, false); q = 0; while (q < 6) { creategp((_arg1 + 1), (_arg2 - 4), ((Math.random() * 10) + 20), ((Math.random() * 10) - 5), ((Math.random() * 2) + 1), 0.97, -0.005, ((Math.random() * 50) + 100), explosionsmokecolor, false); creategp((_arg1 - 1), (_arg2 - 4), ((Math.random() * 10) + 20), ((Math.random() * 10) + 175), ((Math.random() * 2) + 1), 0.97, -0.005, ((Math.random() * 50) + 100), explosionsmokecolor, false); q = (q + 1); }; } public function fullbtn3click(_arg1){ particlealpha = 0; } public function bulletcollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:int){ objectdirection = directiontopoint(_arg1, _arg2, _arg3, _arg4); hitsomething = false; hits = 0; t = 0; while (t < bullets) { if (bullet[t].active == true){ if (bullet[t].side != _arg5){ if (linecollide(bullet[t].x1, bullet[t].y1, bullet[t].x2, bullet[t].y2, _arg1, _arg2, _arg3, _arg4, objectdirection) == true){ hitsomething = true; hit[hits] = new Object(); hit[hits].damage = bullet[t].damage; hit[hits].y = cy; hit[hits].x = cx; hit[hits].dismember = bullet[t].dismember; hit[hits].bulletdirection = directiontopoint(bullet[t].x1, bullet[t].y1, bullet[t].x2, bullet[t].y2); hits = (hits + 1); }; }; }; t = (t + 1); }; return (hitsomething); } public function createkillzone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ killzone[killzones] = new Object(); killzone[killzones].x1 = _arg1; killzone[killzones].y1 = _arg2; killzone[killzones].x2 = _arg3; killzone[killzones].y2 = _arg4; killzone[killzones].active = true; killzones = (killzones + 1); } public function createchaindebris(_arg1:Number, _arg2:Number, _arg3:int){ dchance = 0; if (debrisquality == 1){ dchance = Math.floor((Math.random() * 2)); }; if (dchance == 0){ chaindebris[chaindebriss] = new Object(); chaindebris[chaindebriss].active = true; chaindebris[chaindebriss].type = _arg3; chaindebris[chaindebriss].alpha = 1; chaindebris[chaindebriss].livetime = 0; chaindebris[chaindebriss].x = -1000; chaindebris[chaindebriss].y = -1000; chaindebris[chaindebriss].frame = _arg3; chaindebris[chaindebriss].ropenum = ropes; createrope(_arg1, _arg2, false, false, _arg1, (_arg2 - 1), false, false, chaindebrissegments, chaindebrissegmentlength, false, chaindebrisaf, chaindebrisg, chaindebrisf, true, -1, false); chaindebris[chaindebriss].linknum = links; chaindebris[chaindebriss].segments = chaindebrissegments; alternatenum = 0; df = 0; df = 0; while (df < (chaindebrissegments - 1)) { createlink(((_arg3 * 2) + alternatenum)); if (alternatenum == 0){ alternatenum = 1; } else { alternatenum = 0; }; df = (df + 1); }; chaindebriss = (chaindebriss + 1); }; } public function nonebtn1click(_arg1){ bulletcasingquality = 2; } public function startfog(){ fog.active = true; fog.visible = true; fog.y = 230; fog.x = (Math.random() * -100); fog.alpha = 0.2; } public function createpistol(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ pistol[pistols] = new pistolmc(); weaponscontainer.addChild(pistol[pistols]); pistol[pistols].active = true; pistol[pistols].visible = true; pistol[pistols].fade = _arg5; pistol[pistols].facedirection = _arg3; if (_arg3 == 1){ pistol[pistols].scaleX = -1; }; pistol[pistols].x = -1000; pistol[pistols].y = -1000; pistol[pistols].livetime = 0; pistol[pistols].pointdirection = _arg4; pistol[pistols].linenum = lines; createline((_arg1 - vectorx(_arg4, (pistollength * 0.5))), (_arg2 - vectory(_arg4, (pistollength * 0.5))), (_arg1 + vectorx(_arg4, (pistollength * 0.5))), (_arg2 + vectory(_arg4, (pistollength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); pistols = (pistols + 1); } public function createwalldoor(_arg1:Number, _arg2:Number){ walldoor[walldoors] = new walldoormc(); backgroundmappropscontainer.addChild(walldoor[walldoors]); walldoor[walldoors].active = true; walldoor[walldoors].visible = true; walldoor[walldoors].x = _arg1; walldoor[walldoors].y = _arg2; walldoors = (walldoors + 1); } public function countpickups(){ pickups = 0; z = 0; while (z < rifleammos) { if (rifleammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < shotgunammos) { if (shotgunammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < pistolammos) { if (pistolammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < smgammos) { if (smgammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < nailgunammos) { if (nailgunammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < grenadeammos) { if (grenadeammo[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; z = 0; while (z < healths) { if (health[z].active == true){ pickups = (pickups + 1); }; z = (z + 1); }; return (pickups); } public function createdamagezone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){ damagezone[damagezones] = new Object(); damagezone[damagezones].damage = _arg5; damagezone[damagezones].x1 = _arg1; damagezone[damagezones].y1 = _arg2; damagezone[damagezones].x2 = _arg3; damagezone[damagezones].y2 = _arg4; damagezone[damagezones].active = true; damagezones = (damagezones + 1); } public function createrat(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Boolean){ rat[rats] = new ratmc(); npccontainer.addChild(rat[rats]); rat[rats].active = true; rat[rats].visible = true; rat[rats].x = _arg1; rat[rats].y = _arg2; rat[rats].frame = 0; rat[rats].hitzonenum = hitzones; createhitzone(rat[rats].x, rat[rats].y, ratradius); rat[rats].facedirection = _arg3; if (_arg3 == 1){ rat[rats].scaleX = -1; }; rat[rats].scared = _arg4; rats = (rats + 1); } public function createmegazombiegun(_arg1:Number, _arg2:Number, _arg3:Number){ megazombiegun[megazombieguns] = new megazombiegunmc(); enemycontainer.addChild(megazombiegun[megazombieguns]); megazombiegun[megazombieguns].active = true; megazombiegun[megazombieguns].visible = true; megazombiegun[megazombieguns].x = _arg1; megazombiegun[megazombieguns].y = _arg2; megazombiegun[megazombieguns].rotation = -(_arg3); megazombieguns = (megazombieguns + 1); } public function createenemyA(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Boolean, _arg5:Boolean){ enemyA[enemyAs] = new Object(); enemyA[enemyAs].active = true; enemyA[enemyAs].shootdelay = 0; enemyA[enemyAs].onfire = _arg5; enemyA[enemyAs].damage = 0; enemyA[enemyAs].framedelay = 0; enemyA[enemyAs].slow = 0; enemyA[enemyAs].x = -1000; enemyA[enemyAs].y = -1000; enemyA[enemyAs].lastnode = -1; enemyA[enemyAs].hastarget = false; enemyA[enemyAs].targetx = 0; enemyA[enemyAs].targety = 0; enemyA[enemyAs].movedelay = 0; enemyA[enemyAs].movedirection = _arg3; enemyA[enemyAs].patrolling = _arg4; enemyA[enemyAs].facedirection = _arg3; enemyA[enemyAs].objectlinenum = objectlines; createobjectline(_arg1, _arg2, (ragdollheight * 2), enemyAaf, enemyAg, enemyAf); enemyA[enemyAs].firstlegnum = legBs; createlegB(); createlegB(); legB[enemyA[enemyAs].firstlegnum].framerate = 0; legB[(enemyA[enemyAs].firstlegnum + 1)].framerate = 0; if (_arg3 == 0){ legB[enemyA[enemyAs].firstlegnum].frame = 4; legB[(enemyA[enemyAs].firstlegnum + 1)].frame = 14; } else { legB[enemyA[enemyAs].firstlegnum].frame = 14; legB[(enemyA[enemyAs].firstlegnum + 1)].frame = 4; }; enemyA[enemyAs].bodynum = bodyBs; createbodyB(); enemyAs = (enemyAs + 1); } public function createenemyB(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Boolean, _arg5:Boolean){ enemyB[enemyBs] = new Object(); enemyB[enemyBs].active = true; enemyB[enemyBs].shootdelay = 0; enemyB[enemyBs].damage = 0; enemyB[enemyBs].framedelay = 0; enemyB[enemyBs].slow = 0; enemyB[enemyBs].kamikaze = _arg5; enemyB[enemyBs].x = -1000; enemyB[enemyBs].y = -1000; enemyB[enemyBs].lastnode = -1; enemyB[enemyBs].hastarget = false; enemyB[enemyBs].targetx = 0; enemyB[enemyBs].targety = 0; enemyB[enemyBs].movedelay = 0; enemyB[enemyBs].movedirection = _arg3; enemyB[enemyBs].patrolling = _arg4; enemyB[enemyBs].facedirection = 0; enemyB[enemyBs].objectlinenum = objectlines; createobjectline(_arg1, _arg2, (ragdollheight * 2), enemyBaf, enemyBg, enemyBf); enemyB[enemyBs].firstlegnum = legCs; createlegC(); createlegC(); legC[enemyB[enemyBs].firstlegnum].framerate = 0; legC[(enemyB[enemyBs].firstlegnum + 1)].framerate = 0; if (_arg3 == 0){ legC[enemyB[enemyBs].firstlegnum].frame = 4; legC[(enemyB[enemyBs].firstlegnum + 1)].frame = 14; } else { legC[enemyB[enemyBs].firstlegnum].frame = 14; legC[(enemyB[enemyBs].firstlegnum + 1)].frame = 4; }; enemyB[enemyBs].bodynum = bodyCs; createbodyC(); enemyBs = (enemyBs + 1); } public function createenemyC(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Boolean){ enemyC[enemyCs] = new Object(); enemyC[enemyCs].active = true; enemyC[enemyCs].shootdelay = 0; enemyC[enemyCs].damage = 0; enemyC[enemyCs].framedelay = 0; enemyC[enemyCs].slow = 0; enemyC[enemyCs].x = -1000; enemyC[enemyCs].y = -1000; enemyC[enemyCs].lastnode = -1; enemyC[enemyCs].hastarget = false; enemyC[enemyCs].targetx = 0; enemyC[enemyCs].targety = 0; enemyC[enemyCs].movedelay = 0; enemyC[enemyCs].movedirection = _arg3; enemyC[enemyCs].patrolling = _arg4; enemyC[enemyCs].facedirection = 0; enemyC[enemyCs].objectlinenum = objectlines; createobjectline(_arg1, _arg2, (ragdollheight * 2), enemyCaf, enemyCg, enemyCf); enemyC[enemyCs].firstlegnum = legDs; createlegD(); createlegD(); legD[enemyC[enemyCs].firstlegnum].framerate = 0; legD[(enemyC[enemyCs].firstlegnum + 1)].framerate = 0; if (_arg3 == 0){ legD[enemyC[enemyCs].firstlegnum].frame = 4; legD[(enemyC[enemyCs].firstlegnum + 1)].frame = 14; } else { legD[enemyC[enemyCs].firstlegnum].frame = 14; legD[(enemyC[enemyCs].firstlegnum + 1)].frame = 4; }; enemyC[enemyCs].bodynum = bodyDs; createbodyD(); enemyCs = (enemyCs + 1); } public function createturretbase(_arg1:Number, _arg2:Number, _arg3:Number){ createturretbarrel(_arg1, _arg2, _arg3); turretbase[turretbases] = new turretbasemc(); enemycontainer.addChild(turretbase[turretbases]); turretbase[turretbases].active = true; turretbase[turretbases].visible = true; turretbase[turretbases].x = _arg1; turretbase[turretbases].y = _arg2; turretbase[turretbases].shootdelay = 0; turretbase[turretbases].damage = 0; turretbase[turretbases].targetdirection = _arg3; turretbase[turretbases].hastarget = false; turretbase[turretbases].x1 = (_arg1 + vectorx(correctdirection((_arg3 - 90)), (turretbaselength * 0.5))); turretbase[turretbases].x2 = (_arg1 - vectorx(correctdirection((_arg3 - 90)), (turretbaselength * 0.5))); turretbase[turretbases].y1 = (_arg2 + vectory(correctdirection((_arg3 - 90)), (turretbaselength * 0.5))); turretbase[turretbases].y2 = (_arg2 - vectory(correctdirection((_arg3 - 90)), (turretbaselength * 0.5))); turretbase[turretbases].restdirection = _arg3; turretbase[turretbases].pointdirection = _arg3; turretbase[turretbases].barrelnum = (turretbarrels - 1); turretbase[turretbases].rotation = -(_arg3); turretbases = (turretbases + 1); } public function linecollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):Boolean{ var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:int; var _local14:int; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local10 = true; _local11 = 0; _local12 = 0; _local13 = -1; _local14 = -1; _local15 = 0; _local16 = 0; _local17 = 0; _local18 = 0; if ((_arg1 - _arg3) == 0){ _local13 = 1; }; if ((_arg5 - _arg7) == 0){ _local14 = 1; }; if ((_arg2 - _arg4) == 0){ _local13 = 0; }; if ((_arg6 - _arg8) == 0){ _local14 = 0; }; if ((_local13 + _local14) == -2){ _local15 = ((_arg2 - _arg4) / (_arg1 - _arg3)); _local16 = ((_arg6 - _arg8) / (_arg5 - _arg7)); if ((_local16 - _local15) != 0){ _local17 = ((-(_local15) * _arg1) + _arg2); _local18 = ((-(_local16) * _arg5) + _arg6); _local12 = (((_local17 * _local16) - (_local18 * _local15)) / (_local16 - _local15)); _local11 = ((_local18 - _local17) / (_local15 - _local16)); } else { _local10 = false; }; } else { if (_local13 != _local14){ if (((!((_local13 == -1))) && (!((_local14 == -1))))){ if ((((_local13 == 0)) && ((_local14 == 1)))){ _local11 = _arg5; _local12 = _arg2; }; if ((((_local13 == 1)) && ((_local14 == 0)))){ _local11 = _arg1; _local12 = _arg6; }; } else { if (_local13 == -1){ _local15 = ((_arg2 - _arg4) / (_arg1 - _arg3)); _local17 = ((-(_local15) * _arg1) + _arg2); if (_local14 == 0){ _local12 = _arg6; _local11 = ((_local12 - _local17) / _local15); } else { _local11 = _arg5; _local12 = ((_local15 * _local11) + _local17); }; } else { _local16 = ((_arg6 - _arg8) / (_arg5 - _arg7)); _local18 = ((-(_local16) * _arg5) + _arg6); if (_local13 == 0){ _local12 = _arg2; _local11 = ((_local12 - _local18) / _local16); } else { _local11 = _arg1; _local12 = ((_local16 * _local11) + _local18); }; }; }; } else { _local10 = false; }; }; if (_arg1 <= _arg3){ if ((((_local11 < _arg1)) || ((_local11 > _arg3)))){ _local10 = false; }; } else { if ((((_local11 > _arg1)) || ((_local11 < _arg3)))){ _local10 = false; }; }; if (_arg2 < _arg4){ if ((((_local12 < _arg2)) || ((_local12 > _arg4)))){ _local10 = false; }; } else { if ((((_local12 > _arg2)) || ((_local12 < _arg4)))){ _local10 = false; }; }; if (_arg5 <= _arg7){ if ((((_local11 < _arg5)) || ((_local11 > _arg7)))){ _local10 = false; }; } else { if ((((_local11 > _arg5)) || ((_local11 < _arg7)))){ _local10 = false; }; }; if (_arg6 <= _arg8){ if ((((_local12 < _arg6)) || ((_local12 > _arg8)))){ _local10 = false; }; } else { if ((((_local12 > _arg6)) || ((_local12 < _arg8)))){ _local10 = false; }; }; if (_local10 == true){ cx = _local11; cy = _local12; surfacedirection = _arg9; return (true); }; return (false); } public function mouseup(_arg1:MouseEvent){ clicking = false; clicktime = 0; } public function rifleimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 6) + 6), 0, 0, 0, 0, 5, impactflashcolor, false); } public function correctdirection(_arg1:Number):Number{ var _local2:Number; _local2 = _arg1; while ((((_local2 < 0)) || ((_local2 >= 360)))) { if (_local2 < 0){ _local2 = (_local2 + 360); }; if (_local2 >= 360){ _local2 = (_local2 - 360); }; }; return (_local2); } public function createhealth(_arg1:Number, _arg2:Number, _arg3:Boolean){ health[healths] = new healthmc(); pickupscontainer.addChild(health[healths]); health[healths].active = true; health[healths].visible = true; health[healths].fade = _arg3; health[healths].x = -500; health[healths].y = -500; health[healths].livetime = 0; health[healths].boxnum = boxes; createbox(_arg1, _arg2, healthsidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); healths = (healths + 1); } public function nonebtn3click(_arg1){ particlealpha = 1; } public function createchainsaw(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ chainsaw[chainsaws] = new chainsawmc(); weaponscontainer.addChild(chainsaw[chainsaws]); chainsaw[chainsaws].active = true; chainsaw[chainsaws].visible = true; chainsaw[chainsaws].fade = _arg5; chainsaw[chainsaws].facedirection = _arg3; if (_arg3 == 1){ chainsaw[chainsaws].scaleX = -1; }; chainsaw[chainsaws].x = -1000; chainsaw[chainsaws].y = -1000; chainsaw[chainsaws].livetime = 0; chainsaw[chainsaws].pointdirection = _arg4; chainsaw[chainsaws].linenum = lines; createline((_arg1 - vectorx(_arg4, (chainsawlength * 0.5))), (_arg2 - vectory(_arg4, (chainsawlength * 0.5))), (_arg1 + vectorx(_arg4, (chainsawlength * 0.5))), (_arg2 + vectory(_arg4, (chainsawlength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); chainsaws = (chainsaws + 1); } public function hardbtnclick(_arg1){ difficulty = 2; wait = -5; gotoAndPlay(6); } public function createcollisionline(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ collisionline[collisionlines] = new Object(); vcollisionline[collisionlines] = new Shape(); physicscontainer.addChild(vcollisionline[collisionlines]); collisionline[collisionlines].x = _arg1; collisionline[collisionlines].y = _arg2; vcollisionline[collisionlines].x = _arg1; vcollisionline[collisionlines].y = _arg2; vcollisionline[collisionlines].visible = true; collisionline[collisionlines].active = true; collisionline[collisionlines].x1 = _arg1; collisionline[collisionlines].y1 = _arg2; collisionline[collisionlines].x2 = _arg3; collisionline[collisionlines].y2 = _arg4; collisionline[collisionlines].slope = directiontopoint(_arg1, _arg2, _arg3, _arg4); collisionlines = (collisionlines + 1); } public function mousedown(_arg1:MouseEvent){ clicking = true; clicktime = (clicktime + 1); } public function step(_arg1){ var h:uint; var j:uint; var z:uint; var f:uint; var k:uint; var s:uint; var d:uint; var temporaryx:Number; var temporaryy:Number; var tempdx:Number; var tempdy:Number; var bouncetype:int; var checkliquids:Boolean; var l:uint; var tempattachp:int; var hitsomething2:Boolean; var hitsomething3:Boolean; var foundplayer:Boolean; var currentnode:int; var temptargetdirection:Number; var mzmovespeed:Number; var mzmovey:Number; var currenths:Number; var currentvs:Number; var lasths:Number; var lastvs:Number; var temprotation:Number; var battleduration = ??pushnamespace ; var temporarydistance:Number; var dx:Number; var dy:Number; var d1:Number; var d2:Number; var olddirection:Number; var newdirection:Number; var currentdirection:Number; var verletiteration:uint; var watercolor:*; var Event = _arg1; if (wait == -5){ backdrop.gotoAndPlay((backdrop.frame + 1)); background.gotoAndPlay((background.frame + 1)); foreground.gotoAndPlay((foreground.frame + 1)); cursor.x = mouseX; cursor.y = mouseY; Mouse.hide(); if (cutscene == false){ if ((((player[0].berserk == false)) || ((player[0].active == false)))){ healthtext = ""; } else { healthtext = ""; }; if ((((player[0].active == true)) && ((mapnumber > 1)))){ if (player[0].berserk == false){ if (player[0].berserkamount > maxberserkamount){ player[0].berserkamount = 0; player[0].berserk = true; player[0].berserkcounter = berserkduration; startberserkscreen(); berserkpuff(player[0].x, (player[0].y + 4)); pickuptext = "Rampage!"; pickuptextdelay = messageduration; }; if (player[0].berserkamount > 0){ player[0].berserkamount = (player[0].berserkamount - berserkdecay); }; if (player[0].berserkamount < 0){ player[0].berserkamount = 0; }; } else { if (player[0].berserkcounter > 0){ player[0].berserkamount = 0; berserksparks(player[0].x, (player[0].y + 4)); player[0].berserkcounter = (player[0].berserkcounter - 1); } else { player[0].berserk = false; }; }; } else { player[0].berserkamount = 0; }; if (pickuptextdelay == 0){ pickuptext = ""; } else { pickuptextdelay = (pickuptextdelay - 1); }; if (player[0].active == false){ if (player[0].damage >= playerhealth){ deathcounter = (deathcounter + 1); }; }; if (deathcounter > 90){ messagetext = "Press SPACE to restart or Q to quit."; if (pkeyspace == true){ loadmap(mapnumber); restoreplayerinfo(); }; if (pkeyq == true){ resetgame(); backdrop.visible = false; background.visible = false; foreground.visible = false; cursor.visible = false; wait = 0; gotoAndPlay(1); }; } else { messagetext = messagestring; if (messagetextdelay == 0){ messagetext = ""; } else { messagetextdelay = (messagetextdelay - 1); }; }; } else { healthtext = ""; }; cutscene = false; cursor.visible = true; if (mapnumber >= 16){ cursor.visible = false; cutscene = true; }; if (cutscene == false){ x = ((-(player[0].x) * 2) + 300); y = ((-(player[0].y) * 2) + 150); scaleX = 2; scaleY = 2; maskmc.x = (-(x) * 0.5); maskmc.y = (-(y) * 0.5); if (maskmc.x < 0){ maskmc.x = 0; }; if (maskmc.x > 300){ maskmc.x = 300; }; if (maskmc.y > 150){ maskmc.y = 150; }; if (maskmc.y < 0){ maskmc.y = 0; }; if (x > 0){ x = 0; }; if (x < -600){ x = -600; }; if (y > 0){ y = 0; }; if (y < -300){ y = -300; }; backdrop.scaleX = 0.5; backdrop.scaleY = 0.5; backdrop.x = (-0.5 * x); backdrop.y = (-0.5 * y); } else { x = 0; y = 0; scaleX = 1; scaleY = 1; backdrop.scaleX = 1; backdrop.scaleY = 1; backdrop.x = 0; backdrop.y = 0; maskmc.x = 0; maskmc.y = 0; maskmc.scaleX = 2; maskmc.scaleY = 2; }; watermarkbtn0.x = (maskmc.x + 5); watermarkbtn0.y = (maskmc.y + 120); watermarkbtn0.scaleY = 0.5; watermarkbtn0.scaleX = 0.5; if (watermarkbtn0.visible == true){ if (pointcollide(mouseX, mouseY, watermarkbtn0.x, watermarkbtn0.y, (watermarkbtn0.x + 100), (watermarkbtn0.y + 200)) == true){ if ((((clicking == true)) && ((clickedbutton == false)))){ clickedbutton = true; navigateToURL(url, "_blank"); }; watermarkbtn0.gotoAndStop(2); } else { watermarkbtn0.gotoAndStop(1); }; }; h = 0; while (h < weapondisplays) { if (weapondisplay[h].active == true){ if ((((inmap == true)) && ((cutscene == false)))){ if (player[0].weapon == chainsawnum){ ammodisplay.visible = false; } else { ammodisplay.visible = true; }; weapondisplay[h].x = ((maskmc.x + 20) + (h * 25)); weapondisplay[h].y = (maskmc.y + 5); weapondisplay[h].visible = true; weapondisplay[h].gotoAndPlay((weapondisplay[h].frame + 1)); if (weapondisplay[h].frame == 0){ if (player[0].haschainsaw == true){ if (player[0].weapon == chainsawnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 1){ if ((((player[0].haspistol == true)) && ((player[0].pistolammo > 0)))){ if (player[0].weapon == pistolnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 2){ if ((((player[0].hasrifle == true)) && ((player[0].rifleammo > 0)))){ if (player[0].weapon == riflenum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 3){ if ((((player[0].hassmg == true)) && ((player[0].smgammo > 0)))){ if (player[0].weapon == smgnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 4){ if ((((player[0].hasshotgun == true)) && ((player[0].shotgunammo > 0)))){ if (player[0].weapon == shotgunnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 5){ if (player[0].grenadeammo > 0){ if (player[0].weapon == grenadenum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 6){ if (player[0].nailgunammo > 0){ if (player[0].weapon == nailgunnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; if (weapondisplay[h].frame == 7){ if (player[0].rpgammo > 0){ if (player[0].weapon == rpgnum){ weapondisplay[h].alpha = 1; } else { weapondisplay[h].alpha = 0.5; }; } else { weapondisplay[h].alpha = 0; }; }; } else { weapondisplay[h].visible = false; }; }; h = (h + 1); }; if ((((inmap == true)) && ((cutscene == false)))){ if (player[0].berserk == false){ berserkbar.alpha = (player[0].berserkamount / maxberserkamount); berserkbar.scaleX = (player[0].berserkamount / maxberserkamount); if (berserkbar.scaleX < 0){ berserkbar.scaleX = 0; }; if (berserkbar.scaleX > 1){ berserkbar.scaleX = 1; }; } else { berserkbar.scaleX = 1; berserkbar.alpha = 1; }; healthbar.alpha = 0.6; healthbar.scaleX = ((playerhealth - player[0].damage) / playerhealth); if (healthbar.scaleX < 0){ healthbar.scaleX = 0; }; if (healthbar.scaleX <= 0.25){ healthbar.gotoAndPlay(4); }; if ((((healthbar.scaleX > 0.25)) && ((healthbar.scaleX <= 0.5)))){ healthbar.gotoAndPlay(3); }; if ((((healthbar.scaleX > 0.5)) && ((healthbar.scaleX <= 0.75)))){ healthbar.gotoAndPlay(2); }; if ((((healthbar.scaleX > 0.75)) && ((healthbar.scaleX <= 1)))){ healthbar.gotoAndPlay(1); }; } else { berserkdisplay.visible = false; berserkbar.visible = false; ammodisplay.visible = false; healthdisplay.visible = false; healthbar.visible = false; pickuptext = ""; healthtext = ""; ammotext = ""; messagetext = ""; h = 0; while (h < weapondisplays) { (weapondisplay[h].visilbe == false); h = (h + 1); }; }; hudpickuptext.text = pickuptext; hudhealthtext.text = healthtext; hudammotext.text = ammotext; hudmessagetext.text = messagetext; hudpickuptext.x = (maskmc.x - 150); hudpickuptext.y = (maskmc.y + 100); hudhealthtext.x = (maskmc.x + 5); hudhealthtext.y = (maskmc.y + 125); hudammotext.x = (maskmc.x + 235); hudammotext.y = (maskmc.y + 125); hudmessagetext.x = (maskmc.x - 150); hudmessagetext.y = (maskmc.y + 40); ammodisplay.x = (maskmc.x + 215); ammodisplay.y = (maskmc.y + 125); berserkdisplay.x = (maskmc.x + 229); berserkdisplay.y = (maskmc.y + 5); berserkbar.x = (maskmc.x + 261); berserkbar.y = (maskmc.y + 16); healthdisplay.x = (maskmc.x + 122); healthdisplay.y = (maskmc.y + 125); healthbar.x = (maskmc.x + 144); healthbar.y = (maskmc.y + 131); h = 0; j = 0; z = 0; f = 0; k = 0; s = 0; d = 0; temporaryx = 0; temporaryy = 0; tempdx = 0; tempdy = 0; bouncetype = 0; checkliquids = false; h = 0; while (h < gps) { if (gp[h].active == true){ gp[h].vs = (gp[h].vs + gp[h].g); gp[h].vs = (gp[h].vs * gp[h].af); gp[h].hs = (gp[h].hs * gp[h].af); gp[h].x = (gp[h].x + gp[h].hs); gp[h].y = (gp[h].y + gp[h].vs); vgp[h].x = gp[h].x; vgp[h].y = gp[h].y; gp[h].gptime = (gp[h].gptime - 1); if (gp[h].gptime <= 0){ gp[h].active = false; }; if (particlealpha == 0){ vgp[h].alpha = (gp[h].gptime / gp[h].gpstarttime); } else { vgp[h].scaleX = (gp[h].gptime / gp[h].gpstarttime); vgp[h].scaleY = (gp[h].gptime / gp[h].gpstarttime); }; } else { vgp[h].visible = false; }; h = (h + 1); }; if (showphysicsobjects == true){ h = 0; while (h < collisionlines) { if (collisionline[h].active == true){ vcollisionline[h].visible = true; var _local3 = vcollisionline[h].graphics; with (_local3) { clear(); lineStyle(1, physicsobjectcolor, 1); moveTo(0, 0); lineTo((collisionline[h].x2 - collisionline[h].x1), (collisionline[h].y2 - collisionline[h].y1)); }; } else { vcollisionline[h].visible = false; }; h = (h + 1); }; }; h = 0; while (h < drawnlines) { if (drawnline[h].active == true){ drawnline[h].active = false; } else { vdrawnline[h].visible = false; }; h = (h + 1); }; h = 0; while (h < points) { if (point[h].active == true){ if (point[h].atrest == false){ pphysics(point[h].firstpnum, true); possiblelines = 0; if (point[h].ignorecollisions == false){ temporaryx = p[point[h].firstpnum].x; temporaryy = p[point[h].firstpnum].y; j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - safetydistance), (temporaryy - safetydistance), (temporaryx + safetydistance), (temporaryy + safetydistance), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; point[h].bouncetype = pcollisions(point[h].firstpnum); }; z = point[h].firstpnum; while (z < (point[h].firstpnum + 1)) { j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; z = (z + 1); }; if (point[h].ignorecollisions == false){ tempdx = -(point[h].x); tempdy = -(point[h].y); point[h].x = p[point[h].firstpnum].x; point[h].y = p[point[h].firstpnum].y; tempdx = Math.abs((tempdx + point[h].x)); tempdy = Math.abs((tempdy + point[h].y)); if ((((tempdx <= maxrestdelta)) && ((tempdy <= maxrestdelta)))){ point[h].restcounter = (point[h].restcounter + 1); } else { point[h].restcounter = 0; }; if (point[h].restcounter >= resttime){ point[h].atrest = true; p[point[h].firstpnum].active = false; }; }; } else { point[h].x = p[point[h].firstpnum].x; point[h].y = p[point[h].firstpnum].y; }; if (showphysicsobjects == true){ _local3 = vpoint[h].graphics; with (_local3) { vpoint[h].x = point[h].x; vpoint[h].y = point[h].y; clear(); lineStyle(1, physicsobjectcolor, 100); moveTo(0, -3); lineTo(0, 0); }; }; } else { if (vpoint[h].parent != null){ vpoint[h].parent.removeChild(vpoint[h]); }; p[point[h].firstpnum].active = false; vpoint[h].visible = false; }; h = (h + 1); }; h = 0; while (h < waterpools) { temporarydistance = 0; if (waterpool[h].active == true){ f = 1; while (f < (waterpool[h].points - 2)) { if (Math.round((Math.random() * waterpool[h].windrandomness)) == 0){ waterpool[h].waterpvs[f] = (waterpool[h].waterpvs[f] + waterpool[h].windamount); }; f = (f + 1); }; k = 0; while (k < wateraffectors) { if (wateraffector[k].active == true){ if (rectcollide((wateraffector[k].x - wateraffector[k].radius), (wateraffector[k].y - wateraffector[k].radius), (wateraffector[k].x + wateraffector[k].radius), (wateraffector[k].y + wateraffector[k].radius), waterpool[h].x, (waterpool[h].y - (waterpool[h].depth / 3)), (waterpool[h].x + waterpool[h].xwidth), (waterpool[h].y + (waterpool[h].depth / 3))) == true){ f = 1; while (f < (waterpool[h].points - 2)) { temporarydistance = blockdistance(wateraffector[k].x, wateraffector[k].y, waterpool[h].waterpx[f], waterpool[h].waterpy[f]); if (temporarydistance <= wateraffector[k].radius){ waterpool[h].waterpvs[f] = ((wateraffector[k].y - wateraffector[k].ly) * 1.41); }; f = (f + 1); }; }; }; k = (k + 1); }; f = 1; while (f < (waterpool[h].points - 1)) { waterpool[h].waterpy[f] = (waterpool[h].waterpy[f] + waterpool[h].waterpvs[f]); if (waterpool[h].waterpy[f] > waterpool[h].y){ waterpool[h].waterpvs[f] = (waterpool[h].waterpvs[f] - waterpool[h].g); }; if (waterpool[h].waterpy[f] < waterpool[h].y){ waterpool[h].waterpvs[f] = (waterpool[h].waterpvs[f] + waterpool[h].g); }; if (waterpool[h].waterpy[f] > (waterpool[h].y + waterpool[h].depth)){ waterpool[h].waterpy[f] = (waterpool[h].y + waterpool[h].depth); }; if (waterpool[h].waterpy[f] < (waterpool[h].y - waterpool[h].depth)){ waterpool[h].waterpy[f] = (waterpool[h].y - waterpool[h].depth); }; f = (f + 1); }; f = 0; while (f < (waterpool[h].points - 1)) { dx = 0; dy = 0; d1 = 0; d2 = 0; dx = (waterpool[h].waterpx[(f + 1)] - waterpool[h].waterpx[f]); dy = (waterpool[h].waterpy[(f + 1)] - waterpool[h].waterpy[f]); d1 = (Math.abs(dx) + Math.abs(dy)); d2 = ((0.5 * (d1 - waterpool[h].pointwidth)) / d1); dx = (dx * d2); dy = (dy * d2); waterpool[h].waterpx[f] = (waterpool[h].waterpx[f] + dx); waterpool[h].waterpy[f] = (waterpool[h].waterpy[f] + dy); waterpool[h].waterpx[(f + 1)] = (waterpool[h].waterpx[(f + 1)] - dx); waterpool[h].waterpy[(f + 1)] = (waterpool[h].waterpy[(f + 1)] - dy); f = (f + 1); }; waterpool[h].waterpx[(waterpool[h].points - 1)] = (waterpool[h].x + waterpool[h].xwidth); waterpool[h].waterpx[0] = waterpool[h].x; waterpool[h].waterpy[0] = waterpool[h].y; waterpool[h].waterpy[(waterpool[h].points - 1)] = waterpool[h].y; vwaterpool[h].x = waterpool[h].x; vwaterpool[h].y = waterpool[h].y; _local3 = vwaterpool[h].graphics; with (_local3) { clear(); lineStyle(1, 0, 0); beginFill(waterpool[h].watercolor, waterpool[h].alpha); moveTo(0, 0); f = 0; while (f < (waterpool[h].points - 1)) { lineTo((waterpool[h].waterpx[(f + 1)] - waterpool[h].x), (waterpool[h].waterpy[(f + 1)] - waterpool[h].y)); f = (f + 1); }; lineTo((waterpool[h].waterpx[(waterpool[h].points - 1)] - waterpool[h].x), ((waterpool[h].waterpy[0] + waterpool[h].depth) - waterpool[h].y)); lineTo((waterpool[h].waterpx[0] - waterpool[h].x), ((waterpool[h].waterpy[0] + waterpool[h].depth) - waterpool[h].y)); endFill(); }; } else { if (vwaterpool[h].parent != null){ vwaterpool[h].parent.removeChild(vwaterpool[h]); }; vwaterpool[h].visible = false; }; h = (h + 1); }; h = 0; while (h < boxes) { if (box[h].active == true){ if (box[h].atrest == false){ temporaryx = ((p[box[h].firstpnum].x + p[(box[h].firstpnum + 2)].x) * 0.5); temporaryy = ((p[box[h].firstpnum].y + p[(box[h].firstpnum + 2)].y) * 0.5); checkliquids = false; d = 0; while (d < waterpools) { if (waterpool[d].active == true){ if (rectcollide(waterpool[d].x, waterpool[d].y, (waterpool[d].x + waterpool[d].xwidth), (waterpool[d].y + waterpool[d].depth), (temporaryx - (box[h].sidelength + safetydistance)), (temporaryy - (box[h].sidelength + safetydistance)), (temporaryx + (box[h].sidelength + safetydistance)), (temporaryy + (box[h].sidelength + safetydistance))) == true){ checkliquids = true; d = (waterpools + 1); }; }; d = (d + 1); }; z = box[h].firstpnum; while (z < (box[h].firstpnum + 4)) { pphysics(z, checkliquids); z = (z + 1); }; if (box[h].ignorecollisions == false){ temporaryx = ((p[box[h].firstpnum].x + p[(box[h].firstpnum + 2)].x) * 0.5); temporaryy = ((p[box[h].firstpnum].y + p[(box[h].firstpnum + 2)].y) * 0.5); possiblelines = 0; j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - (box[h].sidelength + safetydistance)), (temporaryy - (box[h].sidelength + safetydistance)), (temporaryx + (box[h].sidelength + safetydistance)), (temporaryy + (box[h].sidelength + safetydistance)), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; z = box[h].firstpnum; while (z < (box[h].firstpnum + 4)) { pcollisions(z); z = (z + 1); }; }; z = box[h].firstpnum; while (z < (box[h].firstpnum + 4)) { j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; z = (z + 1); }; verlet(box[h].firstpnum, (box[h].firstpnum + 1), box[h].sidelength); verlet((box[h].firstpnum + 1), (box[h].firstpnum + 2), box[h].sidelength); verlet((box[h].firstpnum + 2), (box[h].firstpnum + 3), box[h].sidelength); verlet((box[h].firstpnum + 3), box[h].firstpnum, box[h].sidelength); verlet(box[h].firstpnum, (box[h].firstpnum + 2), (box[h].sidelength * 1.41)); verlet((box[h].firstpnum + 1), (box[h].firstpnum + 3), (box[h].sidelength * 1.41)); wateraffector[box[h].wateraffectornum].ly = wateraffector[box[h].wateraffectornum].y; wateraffector[box[h].wateraffectornum].x = ((p[box[h].firstpnum].x + p[(box[h].firstpnum + 2)].x) * 0.5); wateraffector[box[h].wateraffectornum].y = ((p[box[h].firstpnum].y + p[(box[h].firstpnum + 2)].y) * 0.5); if (box[h].ignorecollisions == false){ tempdx = -(box[h].x); tempdy = -(box[h].y); box[h].x = ((p[box[h].firstpnum].x + p[(box[h].firstpnum + 2)].x) * 0.5); box[h].y = ((p[box[h].firstpnum].y + p[(box[h].firstpnum + 2)].y) * 0.5); tempdx = Math.abs((tempdx + box[h].x)); tempdy = Math.abs((tempdy + box[h].y)); if ((((tempdx <= maxrestdelta)) && ((tempdy <= maxrestdelta)))){ box[h].restcounter = (box[h].restcounter + 1); } else { box[h].restcounter = 0; }; if (box[h].restcounter >= resttime){ wateraffector[box[h].wateraffectornum].active = false; box[h].atrest = true; s = box[h].firstpnum; while (s < (box[h].firstpnum + 4)) { p[s].active = false; s = (s + 1); }; }; }; } else { box[h].x = ((p[box[h].firstpnum].x + p[(box[h].firstpnum + 2)].x) * 0.5); box[h].y = ((p[box[h].firstpnum].y + p[(box[h].firstpnum + 2)].y) * 0.5); }; if (showphysicsobjects == true){ _local3 = vbox[h].graphics; with (_local3) { vbox[h].x = box[h].x; vbox[h].y = box[h].y; clear(); lineStyle(1, physicsobjectcolor, 1); moveTo((p[box[h].firstpnum].x - box[h].x), (p[box[h].firstpnum].y - box[h].y)); lineTo((p[(box[h].firstpnum + 1)].x - box[h].x), (p[(box[h].firstpnum + 1)].y - box[h].y)); lineTo((p[(box[h].firstpnum + 2)].x - box[h].x), (p[(box[h].firstpnum + 2)].y - box[h].y)); lineTo((p[(box[h].firstpnum + 3)].x - box[h].x), (p[(box[h].firstpnum + 3)].y - box[h].y)); lineTo((p[(box[h].firstpnum + 0)].x - box[h].x), (p[(box[h].firstpnum + 0)].y - box[h].y)); }; }; } else { vbox[h].visible = false; if (vbox[h].parent != null){ vbox[h].parent.removeChild(vbox[h]); }; s = box[h].firstpnum; while (s < (box[h].firstpnum + 4)) { p[s].active = false; s = (s + 1); }; wateraffector[box[h].wateraffectornum].active = false; }; h = (h + 1); }; h = 0; while (h < ragdolls) { olddirection = 0; newdirection = 0; currentdirection = 0; if (ragdoll[h].active == true){ if (ragdoll[h].atrest == false){ temporaryx = ((p[(ragdoll[h].firstpnum + 4)].x + p[(ragdoll[h].firstpnum + 5)].x) * 0.5); temporaryy = ((p[(ragdoll[h].firstpnum + 4)].y + p[(ragdoll[h].firstpnum + 5)].y) * 0.5); checkliquids = false; d = 0; while (d < waterpools) { if (waterpool[d].active == true){ if (rectcollide(waterpool[d].x, waterpool[d].y, (waterpool[d].x + waterpool[d].xwidth), (waterpool[d].y + waterpool[d].depth), (temporaryx - (ragdollheight + safetydistance)), (temporaryy - (ragdollheight + safetydistance)), (temporaryx + (ragdollheight + safetydistance)), (temporaryy + (ragdollheight + safetydistance))) == true){ checkliquids = true; d = (waterpools + 1); }; }; d = (d + 1); }; olddirection = directiontopoint(p[(ragdoll[h].firstpnum + 2)].x, p[(ragdoll[h].firstpnum + 2)].y, p[(ragdoll[h].firstpnum + 3)].x, p[(ragdoll[h].firstpnum + 3)].y); z = ragdoll[h].firstpnum; while (z < (ragdoll[h].firstpnum + 14)) { if (p[z].active == true){ pphysics(z, checkliquids); }; z = (z + 1); }; if (ragdoll[h].ignorecollisions == false){ temporaryx = ((p[(ragdoll[h].firstpnum + 4)].x + p[(ragdoll[h].firstpnum + 5)].x) * 0.5); temporaryy = ((p[(ragdoll[h].firstpnum + 4)].y + p[(ragdoll[h].firstpnum + 5)].y) * 0.5); possiblelines = 0; j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - (ragdollheight + safetydistance)), (temporaryy - (ragdollheight + safetydistance)), (temporaryx + (ragdollheight + safetydistance)), (temporaryy + (ragdollheight + safetydistance)), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; z = ragdoll[h].firstpnum; while (z < (ragdoll[h].firstpnum + 14)) { if (p[z].active == true){ pcollisions(z); }; z = (z + 1); }; }; z = ragdoll[h].firstpnum; while (z < (ragdoll[h].firstpnum + 14)) { if (p[z].active == true){ j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; }; z = (z + 1); }; verletiteration = 0; verletiteration = 0; while (verletiteration < 3) { if (approxdistance(p[ragdoll[h].firstpnum].x, p[ragdoll[h].firstpnum].y, p[(ragdoll[h].firstpnum + 5)].x, p[(ragdoll[h].firstpnum + 5)].y) < neckconstraint){ verlet((ragdoll[h].firstpnum + 0), (ragdoll[h].firstpnum + 5), neckconstraint); }; if (approxdistance(p[ragdoll[h].firstpnum].x, p[ragdoll[h].firstpnum].y, p[(ragdoll[h].firstpnum + 4)].x, p[(ragdoll[h].firstpnum + 4)].y) < neckconstraint){ verlet((ragdoll[h].firstpnum + 0), (ragdoll[h].firstpnum + 4), neckconstraint); }; if (p[(ragdoll[h].firstpnum + 11)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 11)].x, p[(ragdoll[h].firstpnum + 11)].y, p[(ragdoll[h].firstpnum + 1)].x, p[(ragdoll[h].firstpnum + 1)].y) < upperarmconstraint){ verlet((ragdoll[h].firstpnum + 11), (ragdoll[h].firstpnum + 1), upperarmconstraint); }; }; if (p[(ragdoll[h].firstpnum + 13)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 13)].x, p[(ragdoll[h].firstpnum + 13)].y, p[(ragdoll[h].firstpnum + 3)].x, p[(ragdoll[h].firstpnum + 3)].y) < lowerarmconstraint){ verlet((ragdoll[h].firstpnum + 13), (ragdoll[h].firstpnum + 3), lowerarmconstraint); }; }; if (p[(ragdoll[h].firstpnum + 10)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 10)].x, p[(ragdoll[h].firstpnum + 10)].y, p[(ragdoll[h].firstpnum + 1)].x, p[(ragdoll[h].firstpnum + 1)].y) < upperarmconstraint){ verlet((ragdoll[h].firstpnum + 10), (ragdoll[h].firstpnum + 1), upperarmconstraint); }; }; if (p[(ragdoll[h].firstpnum + 12)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 12)].x, p[(ragdoll[h].firstpnum + 12)].y, p[(ragdoll[h].firstpnum + 2)].x, p[(ragdoll[h].firstpnum + 2)].y) < lowerarmconstraint){ verlet((ragdoll[h].firstpnum + 12), (ragdoll[h].firstpnum + 2), lowerarmconstraint); }; }; if (p[(ragdoll[h].firstpnum + 8)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 8)].x, p[(ragdoll[h].firstpnum + 8)].y, p[(ragdoll[h].firstpnum + 4)].x, p[(ragdoll[h].firstpnum + 4)].y) < lowerlegconstraint){ verlet((ragdoll[h].firstpnum + 8), (ragdoll[h].firstpnum + 4), lowerlegconstraint); }; }; if (p[(ragdoll[h].firstpnum + 9)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 9)].x, p[(ragdoll[h].firstpnum + 9)].y, p[(ragdoll[h].firstpnum + 5)].x, p[(ragdoll[h].firstpnum + 5)].y) < lowerlegconstraint){ verlet((ragdoll[h].firstpnum + 9), (ragdoll[h].firstpnum + 5), lowerlegconstraint); }; }; if (p[(ragdoll[h].firstpnum + 7)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 7)].x, p[(ragdoll[h].firstpnum + 7)].y, p[(ragdoll[h].firstpnum + 1)].x, p[(ragdoll[h].firstpnum + 1)].y) < upperlegconstraint2){ verlet((ragdoll[h].firstpnum + 7), (ragdoll[h].firstpnum + 1), upperlegconstraint2); }; if (approxdistance2(p[(ragdoll[h].firstpnum + 7)].x, p[(ragdoll[h].firstpnum + 7)].y, p[(ragdoll[h].firstpnum + 2)].x, p[(ragdoll[h].firstpnum + 2)].y) < upperlegconstraint1){ verlet((ragdoll[h].firstpnum + 7), (ragdoll[h].firstpnum + 2), upperlegconstraint1); }; }; if (p[(ragdoll[h].firstpnum + 6)].active == true){ if (approxdistance2(p[(ragdoll[h].firstpnum + 6)].x, p[(ragdoll[h].firstpnum + 6)].y, p[(ragdoll[h].firstpnum + 1)].x, p[(ragdoll[h].firstpnum + 1)].y) < upperlegconstraint2){ verlet((ragdoll[h].firstpnum + 6), (ragdoll[h].firstpnum + 1), upperlegconstraint2); }; if (approxdistance2(p[(ragdoll[h].firstpnum + 6)].x, p[(ragdoll[h].firstpnum + 6)].y, p[(ragdoll[h].firstpnum + 3)].x, p[(ragdoll[h].firstpnum + 3)].y) < upperlegconstraint1){ verlet((ragdoll[h].firstpnum + 6), (ragdoll[h].firstpnum + 3), upperlegconstraint1); }; }; verlet(ragdoll[h].firstpnum, (ragdoll[h].firstpnum + 1), necklength); verlet((ragdoll[h].firstpnum + 1), (ragdoll[h].firstpnum + 2), chestlength); verlet((ragdoll[h].firstpnum + 2), (ragdoll[h].firstpnum + 4), chestlength); verlet((ragdoll[h].firstpnum + 4), (ragdoll[h].firstpnum + 5), chestlength); verlet((ragdoll[h].firstpnum + 3), (ragdoll[h].firstpnum + 5), chestlength); verlet((ragdoll[h].firstpnum + 1), (ragdoll[h].firstpnum + 3), chestlength); verlet((ragdoll[h].firstpnum + 3), (ragdoll[h].firstpnum + 2), chestconstraint); verlet((ragdoll[h].firstpnum + 1), (ragdoll[h].firstpnum + 5), chestconstraint); verlet((ragdoll[h].firstpnum + 1), (ragdoll[h].firstpnum + 4), chestconstraint); verlet((ragdoll[h].firstpnum + 2), (ragdoll[h].firstpnum + 5), chestconstraint); verlet((ragdoll[h].firstpnum + 3), (ragdoll[h].firstpnum + 4), chestconstraint); if (p[(ragdoll[h].firstpnum + 11)].active == true){ verlet((ragdoll[h].firstpnum + 3), (ragdoll[h].firstpnum + 11), upperarmlength); if (p[(ragdoll[h].firstpnum + 13)].active == true){ verlet((ragdoll[h].firstpnum + 11), (ragdoll[h].firstpnum + 13), lowerarmlength); }; }; if (p[(ragdoll[h].firstpnum + 10)].active == true){ verlet((ragdoll[h].firstpnum + 2), (ragdoll[h].firstpnum + 10), upperarmlength); if (p[(ragdoll[h].firstpnum + 12)].active == true){ verlet((ragdoll[h].firstpnum + 10), (ragdoll[h].firstpnum + 12), lowerarmlength); }; }; if (p[(ragdoll[h].firstpnum + 7)].active == true){ verlet((ragdoll[h].firstpnum + 5), (ragdoll[h].firstpnum + 7), upperleglength); if (p[(ragdoll[h].firstpnum + 9)].active == true){ verlet((ragdoll[h].firstpnum + 7), (ragdoll[h].firstpnum + 9), lowerleglength); }; }; if (p[(ragdoll[h].firstpnum + 6)].active == true){ verlet((ragdoll[h].firstpnum + 4), (ragdoll[h].firstpnum + 6), upperleglength); if (p[(ragdoll[h].firstpnum + 8)].active == true){ verlet((ragdoll[h].firstpnum + 6), (ragdoll[h].firstpnum + 8), lowerleglength); }; }; verletiteration = (verletiteration + 1); }; currentdirection = directiontopoint(p[(ragdoll[h].firstpnum + 2)].x, p[(ragdoll[h].firstpnum + 2)].y, p[(ragdoll[h].firstpnum + 3)].x, p[(ragdoll[h].firstpnum + 3)].y); if (Math.abs(finddirection(currentdirection, olddirection)) >= 45){ ragdoll[h].deformed = true; }; wateraffector[ragdoll[h].wateraffectornum].ly = wateraffector[ragdoll[h].wateraffectornum].y; wateraffector[ragdoll[h].wateraffectornum].x = ((p[(ragdoll[h].firstpnum + 4)].x + p[(ragdoll[h].firstpnum + 5)].x) * 0.5); wateraffector[ragdoll[h].wateraffectornum].y = ((p[(ragdoll[h].firstpnum + 4)].y + p[(ragdoll[h].firstpnum + 5)].y) * 0.5); if (ragdoll[h].ignorecollisions == false){ tempdx = -(ragdoll[h].x); tempdy = -(ragdoll[h].y); ragdoll[h].x = ((p[(ragdoll[h].firstpnum + 4)].x + p[(ragdoll[h].firstpnum + 5)].x) * 0.5); ragdoll[h].y = ((p[(ragdoll[h].firstpnum + 4)].y + p[(ragdoll[h].firstpnum + 5)].y) * 0.5); tempdx = Math.abs((tempdx + ragdoll[h].x)); tempdy = Math.abs((tempdy + ragdoll[h].y)); if ((((tempdx <= maxrestdelta)) && ((tempdy <= maxrestdelta)))){ ragdoll[h].restcounter = (ragdoll[h].restcounter + 1); } else { ragdoll[h].restcounter = 0; }; if (ragdoll[h].restcounter >= resttime){ wateraffector[ragdoll[h].wateraffectornum].active = false; ragdoll[h].atrest = true; s = ragdoll[h].firstpnum; while (s < (ragdoll[h].firstpnum + 14)) { p[s].active = false; s = (s + 1); }; }; }; } else { ragdoll[h].x = ((p[(ragdoll[h].firstpnum + 4)].x + p[(ragdoll[h].firstpnum + 5)].x) * 0.5); ragdoll[h].y = ((p[(ragdoll[h].firstpnum + 4)].y + p[(ragdoll[h].firstpnum + 5)].y) * 0.5); }; if (showphysicsobjects == true){ _local3 = vragdoll[h].graphics; with (_local3) { vragdoll[h].x = ragdoll[h].x; vragdoll[h].y = ragdoll[h].y; clear(); lineStyle(1, physicsobjectcolor, 100); moveTo((p[ragdoll[h].firstpnum] - ragdoll[h].x), (p[ragdoll[h].firstpnum].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 1)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 1)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 2)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 2)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 4)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 4)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 5)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 5)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 3)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 3)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 1)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 1)].y - ragdoll[h].y)); moveTo((p[(ragdoll[h].firstpnum + 3)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 3)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 11)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 11)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 13)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 13)].y - ragdoll[h].y)); moveTo((p[(ragdoll[h].firstpnum + 2)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 2)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 10)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 10)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 12)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 12)].y - ragdoll[h].y)); moveTo((p[(ragdoll[h].firstpnum + 5)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 5)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 7)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 7)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 9)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 9)].y - ragdoll[h].y)); moveTo((p[(ragdoll[h].firstpnum + 4)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 4)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 6)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 6)].y - ragdoll[h].y)); lineTo((p[(ragdoll[h].firstpnum + 8)].x - ragdoll[h].x), (p[(ragdoll[h].firstpnum + 8)].y - ragdoll[h].y)); }; }; } else { vragdoll[h].visible = false; if (vragdoll[h].parent != null){ vragdoll[h].parent.removeChild(vragdoll[h]); }; s = ragdoll[h].firstpnum; while (s < (ragdoll[h].firstpnum + 14)) { p[s].active = false; s = (s + 1); }; wateraffector[ragdoll[h].wateraffectornum].active = false; }; h = (h + 1); }; h = 0; while (h < lines) { if (line[h].active == true){ if (line[h].atrest == false){ pphysics(line[h].firstpnum, true); pphysics((line[h].firstpnum + 1), true); possiblelines = 0; if (line[h].ignorecollisions == false){ temporaryx = ((p[line[h].firstpnum].x + p[(line[h].firstpnum + 1)].x) * 0.5); temporaryy = ((p[line[h].firstpnum].y + p[(line[h].firstpnum + 1)].y) * 0.5); j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - (line[h].linelength + safetydistance)), (temporaryy - (line[h].linelength + safetydistance)), (temporaryx + (line[h].linelength + safetydistance)), (temporaryy + (line[h].linelength + safetydistance)), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; pcollisions(line[h].firstpnum); pcollisions((line[h].firstpnum + 1)); }; z = line[h].firstpnum; while (z < (line[h].firstpnum + 2)) { j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; z = (z + 1); }; verlet(line[h].firstpnum, (line[h].firstpnum + 1), line[h].linelength); if (line[h].ignorecollisions == false){ tempdx = -(line[h].x); tempdy = -(line[h].y); line[h].x = ((p[line[h].firstpnum].x + p[(line[h].firstpnum + 1)].x) * 0.5); line[h].y = ((p[line[h].firstpnum].y + p[(line[h].firstpnum + 1)].y) * 0.5); tempdx = Math.abs((tempdx + line[h].x)); tempdy = Math.abs((tempdy + line[h].y)); if ((((tempdx <= maxrestdelta)) && ((tempdy <= maxrestdelta)))){ line[h].restcounter = (line[h].restcounter + 1); } else { line[h].restcounter = 0; }; if (line[h].restcounter >= resttime){ line[h].atrest = true; p[line[h].firstpnum].active = false; p[(line[h].firstpnum + 1)].active = false; }; }; } else { line[h].x = ((p[line[h].firstpnum].x + p[(line[h].firstpnum + 1)].x) * 0.5); line[h].y = ((p[line[h].firstpnum].y + p[(line[h].firstpnum + 1)].y) * 0.5); }; if (showphysicsobjects == true){ _local3 = vline[h].graphics; with (_local3) { vline[h].x = line[h].x; vline[h].y = line[h].y; clear(); lineStyle(1, physicsobjectcolor, 100); moveTo((p[line[h].firstpnum].x - line[h].x), (p[line[h].firstpnum].y - line[h].y)); lineTo((p[(line[h].firstpnum + 1)].x - line[h].x), (p[(line[h].firstpnum + 1)].y - line[h].y)); }; }; } else { vline[h].visible = false; if (vline[h].parent != null){ vline[h].parent.removeChild(vline[h]); }; p[line[h].firstpnum].active = false; p[(line[h].firstpnum + 1)].active = false; }; h = (h + 1); }; h = 0; while (h < objectlines) { if (objectline[h].active == true){ pphysics(objectline[h].firstpnum, true); pphysics((objectline[h].firstpnum + 1), true); possiblelines = 0; temporaryx = ((p[objectline[h].firstpnum].x + p[(objectline[h].firstpnum + 1)].x) * 0.5); temporaryy = ((p[objectline[h].firstpnum].y + p[(objectline[h].firstpnum + 1)].y) * 0.5); j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - safetydistance), ((temporaryy - (objectline[h].yheight * 0.5)) - safetydistance), (temporaryx + safetydistance), ((temporaryy + (objectline[h].yheight * 0.5)) + safetydistance), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; pcollisions2(objectline[h].firstpnum); pcollisions2((objectline[h].firstpnum + 1)); temporaryx = ((p[objectline[h].firstpnum].x + p[(objectline[h].firstpnum + 1)].x) * 0.5); temporaryy = ((p[objectline[h].firstpnum].y + p[(objectline[h].firstpnum + 1)].y) * 0.5); p[objectline[h].firstpnum].x = temporaryx; p[(objectline[h].firstpnum + 1)].x = temporaryx; p[objectline[h].firstpnum].y = (temporaryy - (objectline[h].yheight * 0.5)); p[(objectline[h].firstpnum + 1)].y = (temporaryy + (objectline[h].yheight * 0.5)); wateraffector[objectline[h].wateraffectornum].ly = wateraffector[objectline[h].wateraffectornum].y; wateraffector[objectline[h].wateraffectornum].x = temporaryx; wateraffector[objectline[h].wateraffectornum].y = temporaryy; objectline[h].dx = (p[objectline[h].firstpnum].x - objectline[h].x); objectline[h].dy = (p[objectline[h].firstpnum].y - objectline[h].y); objectline[h].x = p[objectline[h].firstpnum].x; objectline[h].y = p[objectline[h].firstpnum].y; if (showphysicsobjects == true){ _local3 = vobjectline[h].graphics; with (_local3) { vobjectline[h].x = objectline[h].x; vobjectline[h].y = objectline[h].y; clear(); lineStyle(1, physicsobjectcolor, 100); moveTo(0, 0); lineTo((p[(objectline[h].firstpnum + 1)].x - objectline[h].x), (p[(objectline[h].firstpnum + 1)].y - objectline[h].y)); }; }; } else { vobjectline[h].visible = false; if (vobjectline[h].parent != null){ vobjectline[h].parent.removeChild(vobjectline[h]); }; p[objectline[h].firstpnum].active = false; p[(objectline[h].firstpnum + 1)].active = false; wateraffector[objectline[h].wateraffectornum].active = false; }; h = (h + 1); }; h = 0; while (h < ropes) { if (rope[h].active == true){ if (rope[h].atrest == false){ temporaryx = 0; temporaryy = 0; d = rope[h].firstpnum; while (d < (rope[h].firstpnum + rope[h].segments)) { temporaryx = (temporaryx + p[d].x); temporaryy = (temporaryy + p[d].y); d = (d + 1); }; temporaryx = (temporaryx / rope[h].segments); temporaryy = (temporaryy / rope[h].segments); checkliquids = false; d = 0; while (d < waterpools) { if (waterpool[d].active == true){ if (rectcollide(waterpool[d].x, waterpool[d].y, (waterpool[d].x + waterpool[d].xwidth), (waterpool[d].y + waterpool[d].depth), (temporaryx - (rope[h].maxlength + safetydistance)), (temporaryy - (rope[h].maxlength + safetydistance)), (temporaryx + (rope[h].maxlength + safetydistance)), (temporaryy + (rope[h].maxlength + safetydistance))) == true){ checkliquids = true; d = (waterpools + 1); }; }; d = (d + 1); }; z = rope[h].firstpnum; while (z < (rope[h].firstpnum + rope[h].segments)) { pphysics(z, checkliquids); z = (z + 1); }; if (rope[h].ignorecollisions == false){ possiblelines = 0; j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - (rope[h].maxlength + safetydistance)), (temporaryy - (rope[h].maxlength + safetydistance)), (temporaryx + (rope[h].maxlength + safetydistance)), (temporaryy + (rope[h].maxlength + safetydistance)), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; z = rope[h].firstpnum; while (z < (rope[h].firstpnum + rope[h].segments)) { pcollisions(z); z = (z + 1); }; }; z = rope[h].firstpnum; while (z < (rope[h].firstpnum + rope[h].segments)) { j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; z = (z + 1); }; d = rope[h].firstpnum; while (d < ((rope[h].firstpnum + rope[h].segments) - 1)) { if (rope[h].elastic == false){ verlet(d, (d + 1), rope[h].segmentlength); } else { if (approxdistance(p[d].x, p[d].y, p[(d + 1)].x, p[(d + 1)].y) > rope[h].segmentlength){ verlet(d, (d + 1), rope[h].segmentlength); }; }; d = (d + 1); }; if (rope[h].attachedtoparticle1 == true){ if (p[rope[h].attachedparticle1].active == true){ verlet(rope[h].attachedparticle1, rope[h].firstpnum, 0.1); } else { rope[h].attachedtoparticle1 = false; }; }; if (rope[h].locked1 == true){ p[rope[h].firstpnum].x = rope[h].lockx1; p[rope[h].firstpnum].y = rope[h].locky1; }; if (rope[h].attachedtoparticle2 == true){ if (p[rope[h].attachedparticle2].active == true){ verlet(rope[h].attachedparticle2, ((rope[h].firstpnum + rope[h].segments) - 1), 0.1); } else { rope[h].attachedtoparticle2 = false; }; }; if (rope[h].locked2 == true){ p[((rope[h].firstpnum + rope[h].segments) - 1)].x = rope[h].lockx2; p[((rope[h].firstpnum + rope[h].segments) - 1)].y = rope[h].locky2; }; tempdx = -(rope[h].x); tempdy = -(rope[h].y); temporaryx = 0; temporaryy = 0; d = rope[h].firstpnum; while (d < (rope[h].firstpnum + rope[h].segments)) { temporaryx = (temporaryx + p[d].x); temporaryy = (temporaryy + p[d].y); d = (d + 1); }; temporaryx = (temporaryx / rope[h].segments); temporaryy = (temporaryy / rope[h].segments); rope[h].x = temporaryx; rope[h].y = temporaryy; tempdx = Math.abs((tempdx + rope[h].x)); tempdy = Math.abs((tempdy + rope[h].y)); if (rope[h].ignorecollisions == false){ if ((((tempdx <= (maxrestdelta * 0.25))) && ((tempdy <= (maxrestdelta * 0.25))))){ rope[h].restcounter = (rope[h].restcounter + 1); } else { rope[h].restcounter = 0; }; if (rope[h].restcounter >= resttime){ rope[h].atrest = true; rope[h].attachedtoparticle1 = false; rope[h].attachedtoparticle2 = false; s = rope[h].firstpnum; while (s < (rope[h].firstpnum + rope[h].segments)) { p[s].active = false; s = (s + 1); }; }; }; } else { temporaryx = 0; temporaryy = 0; d = rope[h].firstpnum; while (d < (rope[h].firstpnum + rope[h].segments)) { temporaryx = (temporaryx + p[d].x); temporaryy = (temporaryy + p[d].y); d = (d + 1); }; temporaryx = (temporaryx / rope[h].segments); temporaryy = (temporaryy / rope[h].segments); rope[h].x = temporaryx; rope[h].y = temporaryy; }; if (showphysicsobjects == true){ _local3 = vrope[h].graphics; with (_local3) { vrope[h].x = rope[h].x; vrope[h].y = rope[h].y; clear(); lineStyle(1, physicsobjectcolor, 100); moveTo((p[rope[h].firstpnum].x - rope[h].x), (p[rope[h].firstpnum].y - rope[h].y)); d = rope[h].firstpnum; while (d < ((rope[h].firstpnum + rope[h].segments) - 1)) { lineTo((p[(d + 1)].x - rope[h].x), (p[(d + 1)].y - rope[h].y)); d = (d + 1); }; }; }; } else { if (vrope[h].parent != null){ vrope[h].parent.removeChild(vrope[h]); }; vrope[h].visible = false; s = rope[h].firstpnum; while (s < (rope[h].firstpnum + rope[h].segments)) { p[s].active = false; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < hinges) { if (hinge[h].active == true){ if (hinge[h].atrest == false){ temporaryx = p[(hinge[h].firstpnum + 1)].x; temporaryy = p[(hinge[h].firstpnum + 1)].y; checkliquids = false; d = 0; while (d < waterpools) { if (waterpool[d].active == true){ if (rectcollide(waterpool[d].x, waterpool[d].y, (waterpool[d].x + waterpool[d].xwidth), (waterpool[d].y + waterpool[d].depth), (temporaryx - (hinge[h].hingelength + safetydistance)), (temporaryy - (hinge[h].hingelength + safetydistance)), (temporaryx + (hinge[h].hingelength + safetydistance)), (temporaryy + (hinge[h].hingelength + safetydistance))) == true){ checkliquids = true; d = (waterpools + 1); }; }; d = (d + 1); }; z = hinge[h].firstpnum; while (z < (hinge[h].firstpnum + 3)) { pphysics(z, checkliquids); z = (z + 1); }; if (hinge[h].ignorecollisions == false){ temporaryx = p[(hinge[h].firstpnum + 1)].x; temporaryy = p[(hinge[h].firstpnum + 1)].y; possiblelines = 0; j = 0; while (j < collisionlines) { if (collisionline[j].active == true){ if (rectcollide((temporaryx - (hinge[h].hingelength + safetydistance)), (temporaryy - (hinge[h].hingelength + safetydistance)), (temporaryx + (hinge[h].hingelength + safetydistance)), (temporaryy + (hinge[h].hingelength + safetydistance)), collisionline[j].x1, collisionline[j].y1, collisionline[j].x2, collisionline[j].y2) == true){ possiblelinenum[possiblelines] = j; possiblelines = (possiblelines + 1); }; }; j = (j + 1); }; z = hinge[h].firstpnum; while (z < (hinge[h].firstpnum + 3)) { pcollisions(z); z = (z + 1); }; }; z = hinge[h].firstpnum; while (z < (hinge[h].firstpnum + 3)) { j = 0; while (j < objectlines) { if (objectline[j].active == true){ if (pointcollide(p[z].x, p[z].y, (objectline[j].x - (objectline[j].xwidth * 0.5)), objectline[j].y, (objectline[j].x + (objectline[j].xwidth * 0.5)), (objectline[j].y + objectline[j].yheight)) == true){ bouncetype = 2; p[z].x = (p[z].x + (objectline[j].dx * characterpushratio)); p[z].y = (p[z].y + (objectline[j].dy * characterpushratio)); }; }; j = (j + 1); }; z = (z + 1); }; verlet(hinge[h].firstpnum, (hinge[h].firstpnum + 1), hinge[h].length1); verlet((hinge[h].firstpnum + 1), (hinge[h].firstpnum + 2), hinge[h].length2); if (approxdistance(p[hinge[h].firstpnum].x, p[hinge[h].firstpnum].y, p[(hinge[h].firstpnum + 2)].x, p[(hinge[h].firstpnum + 2)].y) < hinge[h].hingedistance){ verlet(hinge[h].firstpnum, (hinge[h].firstpnum + 2), hinge[h].hingedistance); }; if (hinge[h].ignorecollisions == false){ tempdx = -(hinge[h].x); tempdy = -(hinge[h].y); hinge[h].x = p[(hinge[h].firstpnum + 1)].x; hinge[h].y = p[(hinge[h].firstpnum + 1)].y; tempdx = Math.abs((tempdx + hinge[h].x)); tempdy = Math.abs((tempdy + hinge[h].y)); if ((((tempdx <= maxrestdelta)) && ((tempdy <= maxrestdelta)))){ hinge[h].restcounter = (hinge[h].restcounter + 1); } else { hinge[h].restcounter = 0; }; if (hinge[h].restcounter >= resttime){ hinge[h].atrest = true; s = hinge[h].firstpnum; while (s < (hinge[h].firstpnum + 3)) { p[s].active = false; s = (s + 1); }; }; }; } else { hinge[h].x = p[(hinge[h].firstpnum + 1)].x; hinge[h].y = p[(hinge[h].firstpnum + 1)].y; }; if (showphysicsobjects == true){ _local3 = vhinge[h].graphics; with (_local3) { vhinge[h].x = hinge[h].x; vhinge[h].y = hinge[h].y; clear(); lineStyle(1, physicsobjectcolor, 1); moveTo((p[hinge[h].firstpnum].x - hinge[h].x), (p[hinge[h].firstpnum].y - hinge[h].y)); lineTo((p[(hinge[h].firstpnum + 1)].x - hinge[h].x), (p[(hinge[h].firstpnum + 1)].y - hinge[h].y)); lineTo((p[(hinge[h].firstpnum + 2)].x - hinge[h].x), (p[(hinge[h].firstpnum + 2)].y - hinge[h].y)); }; }; } else { vhinge[h].visible = false; if (vhinge[h].parent != null){ vhinge[h].parent.removeChild(vhinge[h]); }; s = hinge[h].firstpnum; while (s < (hinge[h].firstpnum + 3)) { p[s].active = false; s = (s + 1); }; }; h = (h + 1); }; l = 0; h = 0; while (h < players) { if (player[h].active == true){ deltahs = 0; deltavs = 0; if (player[h].berserk == true){ maxmovespeed = 5; } else { maxmovespeed = playermaxmovespeed; }; movefactor = playeraircontrolfactor; d = 0; while (d < waterpools) { if ((((((((p[(objectline[player[h].objectlinenum].firstpnum + 1)].x > waterpool[d].x)) && ((p[(objectline[player[h].objectlinenum].firstpnum + 1)].x < (waterpool[d].x + waterpool[d].xwidth))))) && ((p[(objectline[player[h].objectlinenum].firstpnum + 1)].y > waterpool[d].y)))) && ((p[(objectline[player[h].objectlinenum].firstpnum + 1)].y < (waterpool[d].y + waterpool[d].depth))))){ movefactor = playerwatercontrolfactor; }; d = (d + 1); }; groundoffset = 0; if (segmentcollide(p[(objectline[player[h].objectlinenum].firstpnum + 1)].x, p[(objectline[player[h].objectlinenum].firstpnum + 1)].y, p[(objectline[player[h].objectlinenum].firstpnum + 1)].x, (p[(objectline[player[h].objectlinenum].firstpnum + 1)].y + 2)) == true){ movefactor = 1; groundoffset = (p[(objectline[player[h].objectlinenum].firstpnum + 1)].y - bestcy); }; if (player[h].damage < 0){ player[h].damage = 0; }; if (player[h].rifleammo > maxrifleammo){ player[h].rifleammo = maxrifleammo; }; if (player[h].pistolammo > maxpistolammo){ player[h].pistolammo = maxpistolammo; }; if (player[h].shotgunammo > maxshotgunammo){ player[h].shotgunammo = maxshotgunammo; }; if (player[h].smgammo > maxsmgammo){ player[h].smgammo = maxsmgammo; }; if (player[h].rpgammo > maxrpgammo){ player[h].rpgammo = maxrpgammo; }; if (player[h].nailgunammo > maxnailgunammo){ player[h].nailgunammo = maxnailgunammo; }; if (player[h].weapon == riflenum){ ammotext = player[h].rifleammo; bodyA[player[h].bodynum].frame = rifleframe; }; if (player[h].weapon == pistolnum){ ammotext = player[h].pistolammo; bodyA[player[h].bodynum].frame = pistolframe; }; if (player[h].weapon == grenadenum){ ammotext = player[h].grenadeammo; if (bodyA[player[h].bodynum].frame > grenadeframe){ player[h].framedelay = (player[h].framedelay - 1); if (player[h].framedelay <= 0){ bodyA[player[h].bodynum].frame = grenadeframe; }; } else { bodyA[player[h].bodynum].frame = grenadeframe; }; }; if (player[h].weapon == shotgunnum){ ammotext = player[h].shotgunammo; bodyA[player[h].bodynum].frame = shotgunframe; }; if (player[h].weapon == smgnum){ ammotext = player[h].smgammo; bodyA[player[h].bodynum].frame = smgframe; }; if (player[h].weapon == nailgunnum){ ammotext = player[h].nailgunammo; bodyA[player[h].bodynum].frame = nailgunframe; }; if (player[h].weapon == rpgnum){ ammotext = player[h].rpgammo; bodyA[player[h].bodynum].frame = rpgframe; }; if (player[h].weapon == chainsawnum){ ammotext = ""; bodyA[player[h].bodynum].frame = chainsawframe; if (Math.floor((Math.random() * 45)) == 0){ chainsawpuff((player[h].bodyx + vectorx(player[h].gundirection, chainsawbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawbarreldistance))); }; }; if (pkey3 == true){ if ((((player[h].hasrifle == true)) && ((player[h].rifleammo > 0)))){ player[h].weapon = riflenum; }; }; if (pkey2 == true){ if ((((player[h].haspistol == true)) && ((player[h].pistolammo > 0)))){ player[h].weapon = pistolnum; }; }; if (pkey6 == true){ if ((((player[h].hasgrenade == true)) && ((player[h].grenadeammo > 0)))){ player[h].weapon = grenadenum; }; }; if (pkey4 == true){ if ((((player[h].hassmg == true)) && ((player[h].smgammo > 0)))){ player[h].weapon = smgnum; }; }; if (pkey5 == true){ if ((((player[h].hasshotgun == true)) && ((player[h].shotgunammo > 0)))){ player[h].weapon = shotgunnum; }; }; if (pkey1 == true){ if ((((player[h].haschainsaw == true)) && (!((player[h].weapon == chainsawnum))))){ chainsawstart.play(); player[h].weapon = chainsawnum; }; }; if (pkey7 == true){ if ((((player[h].hasnailgun == true)) && ((player[h].nailgunammo > 0)))){ player[h].weapon = nailgunnum; }; }; if (pkey8 == true){ if ((((player[h].hasrpg == true)) && ((player[h].rpgammo > 0)))){ player[h].weapon = rpgnum; }; }; if (player[h].berserk == true){ if (player[h].weapon != chainsawnum){ schannel.stop(); player[h].weapon = chainsawnum; }; }; if (clicking == true){ if (player[h].weapon == riflenum){ if ((((player[h].shootdelay == 0)) && ((player[h].rifleammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + rifleyoffset), (player[h].bodyx + vectorx(player[h].gundirection, riflebarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, riflebarreldistance))) == false){ if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, riflebarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, riflebarreldistance)), ((player[h].lookdirection + (Math.random() * rifleinaccuracy)) - (rifleinaccuracy * 0.5)), rifleshootdistance, rifledamage, playerside, rifletracercolor, rifletraceralpha, false) == true){ rifleimpact(impactx, impacty); }; player[h].rifleammo = (player[h].rifleammo - 1); player[h].shootdelay = rifleshootdelay; bodyA[player[h].bodynum].frame = (rifleframe + 1); if (Math.floor((Math.random() * riflecasingskip)) == 0){ createbulletcasing((player[h].bodyx + vectorx(player[h].gundirection, riflerecieverdistance)), (player[h].bodyy + vectory(player[h].gundirection, riflerecieverdistance)), riflecasingsize, correctdirection(((player[h].bodynormal + (Math.random() * bulletcasingdirection)) - (bulletcasingdirection * 0.5))), ((Math.random() * bulletcasingspeed) + minbulletcasingspeed), ((Math.random() * bulletcasingrotatespeed) - (bulletcasingrotatespeed * 0.5)), riflecasingframe); }; riflemuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (riflebarreldistance + rifleflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (riflebarreldistance + rifleflashdistance))), player[h].gundirection); }; } else { if ((((player[h].rifleammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == pistolnum){ if ((((player[h].shootdelay == 0)) && ((player[h].pistolammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + pistolyoffset), (player[h].bodyx + vectorx(player[h].gundirection, pistolbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolbarreldistance))) == false){ if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, pistolbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolbarreldistance)), ((player[h].lookdirection + (Math.random() * pistolinaccuracy)) - (pistolinaccuracy * 0.5)), pistolshootdistance, pistoldamage, playerside, pistoltracercolor, pistoltraceralpha, false) == true){ pistolimpact(impactx, impacty); }; player[h].pistolammo = (player[h].pistolammo - 1); player[h].shootdelay = pistolshootdelay; bodyA[player[h].bodynum].frame = (pistolframe + 1); if (Math.floor((Math.random() * pistolcasingskip)) == 0){ createbulletcasing((player[h].bodyx + vectorx(player[h].gundirection, pistolrecieverdistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolrecieverdistance)), pistolcasingsize, correctdirection(((player[h].bodynormal + (Math.random() * bulletcasingdirection)) - (bulletcasingdirection * 0.5))), ((Math.random() * bulletcasingspeed) + minbulletcasingspeed), ((Math.random() * bulletcasingrotatespeed) - (bulletcasingrotatespeed * 0.5)), pistolcasingframe); }; pistolmuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (pistolbarreldistance + pistolflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (pistolbarreldistance + pistolflashdistance))), player[h].gundirection); }; } else { if ((((player[h].pistolammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == grenadenum){ if ((((player[h].shootdelay == 0)) && ((player[h].grenadeammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + grenadeyoffset), (player[h].bodyx + vectorx(player[h].gundirection, grenadebarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, grenadebarreldistance))) == false){ creategrenade((player[h].bodyx + vectorx(player[h].gundirection, grenadebarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, grenadebarreldistance)), ((player[h].lookdirection + (Math.random() * grenadeinaccuracy)) - (grenadeinaccuracy * 0.5)), grenadeshootdistance, ((Math.random() * grenaderotatespeed) - (grenaderotatespeed * 0.5)), -1); player[h].grenadeammo = (player[h].grenadeammo - 1); player[h].shootdelay = grenadeshootdelay; player[h].framedelay = (grenadeshootdelay * 0.5); bodyA[player[h].bodynum].frame = (grenadeframe + 1); if (player[h].grenadeammo == 0){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; }; }; }; }; if (player[h].weapon == shotgunnum){ if ((((player[h].shootdelay == 0)) && ((player[h].shotgunammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + shotgunyoffset), (player[h].bodyx + vectorx(player[h].gundirection, shotgunbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunbarreldistance))) == false){ l = 0; while (l < 3) { if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, shotgunbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunbarreldistance)), ((player[h].lookdirection + (Math.random() * shotguninaccuracy)) - (shotguninaccuracy * 0.5)), shotgunshootdistance, shotgundamage, playerside, shotguntracercolor, shotguntraceralpha, true) == true){ shotgunimpact(impactx, impacty); }; l = (l + 1); }; player[h].shotgunammo = (player[h].shotgunammo - 1); player[h].shootdelay = shotgunshootdelay; bodyA[player[h].bodynum].frame = (shotgunframe + 1); if (Math.floor((Math.random() * shotguncasingskip)) == 0){ createbulletcasing((player[h].bodyx + vectorx(player[h].gundirection, shotgunrecieverdistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunrecieverdistance)), shotguncasingsize, correctdirection(((player[h].bodynormal + (Math.random() * bulletcasingdirection)) - (bulletcasingdirection * 0.5))), ((Math.random() * bulletcasingspeed) + minbulletcasingspeed), ((Math.random() * bulletcasingrotatespeed) - (bulletcasingrotatespeed * 0.5)), shotguncasingframe); }; shotgunmuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (shotgunbarreldistance + shotgunflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (shotgunbarreldistance + shotgunflashdistance))), player[h].gundirection); }; } else { if ((((player[h].shotgunammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == smgnum){ if ((((player[h].shootdelay == 0)) && ((player[h].smgammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + smgyoffset), (player[h].bodyx + vectorx(player[h].gundirection, smgbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, smgbarreldistance))) == false){ if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, smgbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, smgbarreldistance)), ((player[h].lookdirection + (Math.random() * smginaccuracy)) - (smginaccuracy * 0.5)), smgshootdistance, smgdamage, playerside, smgtracercolor, smgtraceralpha, false) == true){ smgimpact(impactx, impacty); }; player[h].smgammo = (player[h].smgammo - 1); player[h].shootdelay = smgshootdelay; bodyA[player[h].bodynum].frame = (smgframe + 1); if (Math.floor((Math.random() * smgcasingskip)) == 0){ createbulletcasing((player[h].bodyx + vectorx(player[h].gundirection, smgrecieverdistance)), (player[h].bodyy + vectory(player[h].gundirection, smgrecieverdistance)), smgcasingsize, correctdirection(((player[h].bodynormal + (Math.random() * bulletcasingdirection)) - (bulletcasingdirection * 0.5))), ((Math.random() * bulletcasingspeed) + minbulletcasingspeed), ((Math.random() * bulletcasingrotatespeed) - (bulletcasingrotatespeed * 0.5)), smgcasingframe); }; smgmuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (smgbarreldistance + smgflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (smgbarreldistance + smgflashdistance))), player[h].gundirection); }; } else { if ((((player[h].smgammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == rpgnum){ if ((((player[h].shootdelay == 0)) && ((player[h].rpgammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + rpgyoffset), (player[h].bodyx + vectorx(player[h].gundirection, rpgbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgbarreldistance))) == false){ player[h].weapon = chainsawnum; player[h].hasrpg = false; player[h].shootdelay = 30; dryfire.play(); rocketshoot.play(); createrocket((player[h].bodyx + vectorx(player[h].gundirection, rpgbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgbarreldistance)), ((player[h].lookdirection + (Math.random() * rpginaccuracy)) - (rpginaccuracy * 0.5)), playerside); player[h].rpgammo = (player[h].rpgammo - 1); createrpg((player[h].bodyx + vectorx(player[h].gundirection, rpgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum, true); rpgmuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (rpgbarreldistance + rpgflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (rpgbarreldistance + rpgflashdistance))), player[h].gundirection); rpgmuzzleflash((player[h].bodyx - vectorx(player[h].gundirection, (rpgholddistance + rpgflashdistance))), (player[h].bodyy - vectory(player[h].gundirection, (rpgholddistance + rpgflashdistance))), (player[h].gundirection + 180)); }; } else { if ((((player[h].rpgammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == nailgunnum){ if ((((player[h].shootdelay == 0)) && ((player[h].nailgunammo > 0)))){ if (segmentcollide(player[h].x, (player[h].y + nailgunyoffset), (player[h].bodyx + vectorx(player[h].gundirection, nailgunbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunbarreldistance))) == false){ createnail((player[h].bodyx + vectorx(player[h].gundirection, nailgunbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunbarreldistance)), ((player[h].lookdirection + (Math.random() * nailguninaccuracy)) - (nailguninaccuracy * 0.5)), playerside); player[h].nailgunammo = (player[h].nailgunammo - 1); player[h].shootdelay = nailgunshootdelay; bodyA[player[h].bodynum].frame = (nailgunframe + 1); if (Math.floor((Math.random() * nailguncasingskip)) == 0){ createbulletcasing((player[h].bodyx + vectorx(player[h].gundirection, nailgunrecieverdistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunrecieverdistance)), nailguncasingsize, correctdirection(((player[h].bodynormal + (Math.random() * bulletcasingdirection)) - (bulletcasingdirection * 0.5))), ((Math.random() * bulletcasingspeed) + minbulletcasingspeed), ((Math.random() * bulletcasingrotatespeed) - (bulletcasingrotatespeed * 0.5)), nailguncasingframe); }; nailgunmuzzleflash((player[h].bodyx + vectorx(player[h].gundirection, (nailgunbarreldistance + nailgunflashdistance))), (player[h].bodyy + vectory(player[h].gundirection, (nailgunbarreldistance + nailgunflashdistance))), player[h].gundirection); }; } else { if ((((player[h].nailgunammo <= 0)) && ((player[h].shootdelay == 0)))){ player[h].weapon = chainsawnum; player[h].shootdelay = 30; dryfire.play(); }; }; }; if (player[h].weapon == chainsawnum){ if (player[h].shootdelay == 0){ if (player[h].berserk == true){ if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, chainsawbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawbarreldistance)), player[h].lookdirection, chainsawshootdistance, (chainsawdamage * berserkmultiplier), playerside, 0xFFFFFF, 0, false) == true){ chainsawimpact(impactx, impacty); }; } else { if (createbullet((player[h].bodyx + vectorx(player[h].gundirection, chainsawbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawbarreldistance)), player[h].lookdirection, chainsawshootdistance, chainsawdamage, playerside, 0xFFFFFF, 0, true) == true){ chainsawimpact(impactx, impacty); }; }; chainsawsmoke((player[h].bodyx + vectorx(player[h].gundirection, chainsawbarreldistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawbarreldistance))); if (clicktime == 1){ clicktime = 2; schannel = chainsawrev.play(0, 50); }; player[h].shootdelay = chainsawshootdelay; bodyA[player[h].bodynum].frame = (chainsawframe + 1); player[h].framedelay = 5; }; }; } else { if (player[h].shootdelay == -1){ player[h].shootdelay = 0; }; }; if (clicking == false){ schannel.stop(); }; if (player[h].weapon != chainsawnum){ schannel.stop(); }; if (player[h].shootdelay > 0){ player[h].shootdelay = (player[h].shootdelay - 1); }; if (pkeya == true){ deltahs = (deltahs - (playermoveacceleration * movefactor)); }; if (pkeyd == true){ deltahs = (deltahs + (playermoveacceleration * movefactor)); }; deltahs2 = 0; if (player[h].slow > 0){ if (deltahs > 0){ deltahs2 = (-(player[h].slow) * 0.5); }; if (deltahs < 0){ deltahs2 = (player[h].slow * 0.5); }; player[h].slow = 0; }; if (pkeyw == true){ if (((!((movefactor == playeraircontrolfactor))) && ((player[h].jumpdelay == -1)))){ player[h].jumpdelay = playerjumpdelay; if (player[h].berserk == false){ deltavs = (playerjumpspeed * movefactor); } else { deltavs = (-5 * movefactor); }; if (movefactor == 1){ jumpdust(((player[h].x + (Math.random() * 10)) - 5), (((player[h].y + (ragdollheight * 2)) + (Math.random() * 10)) - 5)); }; }; } else { if (player[h].jumpdelay == 0){ player[h].jumpdelay = -1; }; }; if (player[h].jumpdelay > 0){ player[h].jumpdelay = (player[h].jumpdelay - 1); }; temporaryhs = (p[(objectline[player[h].objectlinenum].firstpnum + 1)].x - p[(objectline[player[h].objectlinenum].firstpnum + 1)].lx); if (Math.abs(((temporaryhs + deltahs) + deltahs2)) < maxmovespeed){ p[(objectline[player[h].objectlinenum].firstpnum + 1)].x = ((p[(objectline[player[h].objectlinenum].firstpnum + 1)].x + deltahs) + deltahs2); p[objectline[player[h].objectlinenum].firstpnum].x = ((p[objectline[player[h].objectlinenum].firstpnum].x + deltahs) + deltahs2); } else { if (Math.abs(temporaryhs) < maxmovespeed){ if (temporaryhs > 0){ p[(objectline[player[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[player[h].objectlinenum].firstpnum + 1)].lx + maxmovespeed); p[objectline[player[h].objectlinenum].firstpnum].x = (p[objectline[player[h].objectlinenum].firstpnum].lx + maxmovespeed); } else { p[(objectline[player[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[player[h].objectlinenum].firstpnum + 1)].lx - maxmovespeed); p[objectline[player[h].objectlinenum].firstpnum].x = (p[objectline[player[h].objectlinenum].firstpnum].lx - maxmovespeed); }; }; }; if (objectline[player[h].objectlinenum].x < 1){ p[objectline[player[h].objectlinenum].firstpnum].x = 1; p[(objectline[player[h].objectlinenum].firstpnum + 1)].x = 1; }; if (objectline[player[h].objectlinenum].x > 599){ p[objectline[player[h].objectlinenum].firstpnum].x = 599; p[(objectline[player[h].objectlinenum].firstpnum + 1)].x = 599; }; p[(objectline[player[h].objectlinenum].firstpnum + 1)].y = (p[(objectline[player[h].objectlinenum].firstpnum + 1)].y + deltavs); p[objectline[player[h].objectlinenum].firstpnum].y = (p[objectline[player[h].objectlinenum].firstpnum].y + deltavs); temporaryhs = Math.abs((p[(objectline[player[h].objectlinenum].firstpnum + 1)].x - p[(objectline[player[h].objectlinenum].firstpnum + 1)].lx)); if (deltahs > 0){ player[h].walkdirection = 0; }; if (deltahs < 0){ player[h].walkdirection = 1; }; legA[player[h].firstlegnum].framerate = 1; if (deltahs == 0){ if (player[h].walkdirection == 0){ if (legA[player[h].firstlegnum].frame == 4){ legA[player[h].firstlegnum].framerate = 0; }; } else { if (legA[player[h].firstlegnum].frame == 14){ legA[player[h].firstlegnum].framerate = 0; }; }; }; if (movefactor == playeraircontrolfactor){ legA[player[h].firstlegnum].framerate = 0; }; if (player[h].walkdirection == 0){ legA[player[h].firstlegnum].scaleX = 1; legA[(player[h].firstlegnum + 1)].scaleX = 1; } else { legA[player[h].firstlegnum].scaleX = -1; legA[(player[h].firstlegnum + 1)].scaleX = -1; }; legA[(player[h].firstlegnum + 1)].frame = (legA[player[h].firstlegnum].frame + 11); player[h].y = (p[objectline[player[h].objectlinenum].firstpnum].y - groundoffset); player[h].x = p[objectline[player[h].objectlinenum].firstpnum].x; gundirection = 0; if (player[h].weapon == riflenum){ gundirection = directiontopoint(player[h].x, (player[h].y + rifleyoffset), mouseX, mouseY); }; if (player[h].weapon == pistolnum){ gundirection = directiontopoint(player[h].x, (player[h].y + pistolyoffset), mouseX, mouseY); }; if (player[h].weapon == grenadenum){ gundirection = directiontopoint(player[h].x, (player[h].y + grenadeyoffset), mouseX, mouseY); }; if (player[h].weapon == shotgunnum){ gundirection = directiontopoint(player[h].x, (player[h].y + shotgunyoffset), mouseX, mouseY); }; if (player[h].weapon == smgnum){ gundirection = directiontopoint(player[h].x, (player[h].y + smgyoffset), mouseX, mouseY); }; if (player[h].weapon == nailgunnum){ gundirection = directiontopoint(player[h].x, (player[h].y + nailgunyoffset), mouseX, mouseY); }; if (player[h].weapon == rpgnum){ gundirection = directiontopoint(player[h].x, (player[h].y + rpgyoffset), mouseX, mouseY); }; if (player[h].weapon == chainsawnum){ gundirection = directiontopoint(player[h].x, (player[h].y + chainsawyoffset), mouseX, mouseY); }; player[h].lookdirection = gundirection; if (mouseX > player[h].x){ player[h].facedirection = 0; } else { player[h].facedirection = 1; }; if (player[h].facedirection == 0){ directiondelta = finddirection(0, gundirection); bodyA[player[h].bodynum].scaleX = 1; } else { directiondelta = finddirection(180, gundirection); bodyA[player[h].bodynum].scaleX = -1; }; if (directiondelta > 0){ if (directiondelta > maxlookdelta){ directiondelta = maxlookdelta; }; } else { if (directiondelta < -(maxlookdelta)){ directiondelta = -(maxlookdelta); }; }; player[h].gundirection = correctdirection(((180 * player[h].facedirection) - directiondelta)); if (player[h].facedirection == 0){ bodynormal = correctdirection((player[h].gundirection + 90)); } else { bodynormal = correctdirection((player[h].gundirection - 90)); }; bodyA[player[h].bodynum].rotation = directiondelta; legsoffset = ((ragdollheight * 2) - (upperleglength + lowerleglength)); legA[player[h].firstlegnum].x = (player[h].x - (chestlength * 0.5)); legA[player[h].firstlegnum].y = (player[h].y + legsoffset); legA[(player[h].firstlegnum + 1)].x = (player[h].x + (chestlength * 0.5)); legA[(player[h].firstlegnum + 1)].y = (player[h].y + legsoffset); bodyA[player[h].bodynum].y = (player[h].y + legsoffset); bodyA[player[h].bodynum].x = player[h].x; if (player[h].weapon == riflenum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - rifleyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - rifleyoffset))); }; if (player[h].weapon == pistolnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - pistolyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - pistolyoffset))); }; if (player[h].weapon == grenadenum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - grenadeyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - grenadeyoffset))); }; if (player[h].weapon == shotgunnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - shotgunyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - shotgunyoffset))); }; if (player[h].weapon == smgnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - smgyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - smgyoffset))); }; if (player[h].weapon == nailgunnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - nailgunyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - nailgunyoffset))); }; if (player[h].weapon == rpgnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - rpgyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - rpgyoffset))); }; if (player[h].weapon == chainsawnum){ player[h].bodyy = ((player[h].y + legsoffset) + vectory(bodynormal, (legsoffset - chainsawyoffset))); player[h].bodyx = (player[h].x + vectorx(bodynormal, (legsoffset - chainsawyoffset))); }; player[h].bodynormal = bodynormal; } else { schannel.stop(); objectline[player[h].objectlinenum].active = false; legA[player[h].firstlegnum].active = false; legA[(player[h].firstlegnum + 1)].active = false; bodyA[player[h].bodynum].active = false; }; h = (h + 1); }; h = 0; while (h < torsos) { if (torso[h].active == true){ torso[h].gotoAndPlay((torso[h].frame + 1)); } else { if (torso[h].parent != null){ torso[h].parent.removeChild(torso[h]); }; }; h = (h + 1); }; h = 0; while (h < heads) { if (head[h].active == true){ head[h].gotoAndPlay((head[h].frame + 1)); } else { if (head[h].parent != null){ head[h].parent.removeChild(head[h]); }; }; h = (h + 1); }; h = 0; while (h < upperarms) { if (upperarm[h].active == true){ upperarm[h].gotoAndPlay((upperarm[h].frame + 1)); } else { if (upperarm[h].parent != null){ upperarm[h].parent.removeChild(upperarm[h]); }; }; h = (h + 1); }; h = 0; while (h < upperlegs) { if (upperleg[h].active == true){ upperleg[h].gotoAndPlay((upperleg[h].frame + 1)); } else { if (upperleg[h].parent != null){ upperleg[h].parent.removeChild(upperleg[h]); }; }; h = (h + 1); }; h = 0; while (h < lowerlegs) { if (lowerleg[h].active == true){ lowerleg[h].gotoAndPlay((lowerleg[h].frame + 1)); } else { if (lowerleg[h].parent != null){ lowerleg[h].parent.removeChild(lowerleg[h]); }; }; h = (h + 1); }; h = 0; while (h < lowerarms) { if (lowerarm[h].active == true){ lowerarm[h].gotoAndPlay((lowerarm[h].frame + 1)); } else { if (lowerarm[h].parent != null){ lowerarm[h].parent.removeChild(lowerarm[h]); }; }; h = (h + 1); }; h = 0; while (h < bodyAs) { if (bodyA[h].active == true){ bodyA[h].gotoAndPlay((bodyA[h].frame + 1)); } else { if (bodyA[h].parent != null){ bodyA[h].parent.removeChild(bodyA[h]); }; }; h = (h + 1); }; h = 0; while (h < legAs) { if (legA[h].active == true){ if (legA[h].framerate > 0){ legA[h].frame = (legA[h].frame + 1); }; if (legA[h].frame > 21){ legA[h].frame = (legA[h].frame - 21); }; legA[h].gotoAndPlay((legA[h].frame + 1)); } else { if (legA[h].parent != null){ legA[h].parent.removeChild(legA[h]); }; }; h = (h + 1); }; h = 0; while (h < bodyBs) { if (bodyB[h].active == true){ bodyB[h].gotoAndPlay((bodyB[h].frame + 1)); } else { if (bodyB[h].parent != null){ bodyB[h].parent.removeChild(bodyB[h]); }; }; h = (h + 1); }; h = 0; while (h < legBs) { if (legB[h].active == true){ if (legB[h].framerate > 0){ legB[h].frame = (legB[h].frame + 1); }; if (legB[h].frame > 21){ legB[h].frame = (legB[h].frame - 21); }; legB[h].gotoAndPlay((legB[h].frame + 1)); } else { if (legB[h].parent != null){ legB[h].parent.removeChild(legB[h]); }; }; h = (h + 1); }; h = 0; while (h < bodyCs) { if (bodyC[h].active == true){ bodyC[h].gotoAndPlay((bodyC[h].frame + 1)); } else { if (bodyC[h].parent != null){ bodyC[h].parent.removeChild(bodyC[h]); }; }; h = (h + 1); }; h = 0; while (h < legCs) { if (legC[h].active == true){ if (legC[h].framerate > 0){ legC[h].frame = (legC[h].frame + 1); }; if (legC[h].frame > 21){ legC[h].frame = (legC[h].frame - 21); }; legC[h].gotoAndPlay((legC[h].frame + 1)); } else { if (legC[h].parent != null){ legC[h].parent.removeChild(legC[h]); }; }; h = (h + 1); }; h = 0; while (h < bodyDs) { if (bodyD[h].active == true){ bodyD[h].gotoAndPlay((bodyD[h].frame + 1)); } else { if (bodyD[h].parent != null){ bodyD[h].parent.removeChild(bodyD[h]); }; }; h = (h + 1); }; h = 0; while (h < legDs) { if (legD[h].active == true){ if (legD[h].framerate > 0){ legD[h].frame = (legD[h].frame + 1); }; if (legD[h].frame > 21){ legD[h].frame = (legD[h].frame - 21); }; legD[h].gotoAndPlay((legD[h].frame + 1)); } else { if (legD[h].parent != null){ legD[h].parent.removeChild(legD[h]); }; }; h = (h + 1); }; h = 0; while (h < rifles) { if (rifle[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((rifle[h].x > (player[o].x - chestlength))) && ((rifle[h].x < (player[o].x + chestlength))))) && ((rifle[h].y > (player[o].y - 1))))) && ((rifle[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if ((((player[o].hasrifle == false)) || ((player[o].rifleammo < maxrifleammo)))){ weaponpickup.play(); player[o].rifleammo = (player[o].rifleammo + riflepickupammo); line[rifle[h].linenum].active = false; rifle[h].visible = false; rifle[h].active = false; pickuptext = "You picked up a rifle (3)!"; pickuptextdelay = messageduration; if (player[o].hasrifle == false){ player[o].hasrifle = true; player[o].weapon = riflenum; }; }; }; }; o = (o + 1); }; rifle[h].livetime = (rifle[h].livetime + 1); if (rifle[h].fade == true){ if (rifle[h].livetime > (weaponlivetime - weaponfadetime)){ rifle[h].alpha = ((weaponlivetime - rifle[h].livetime) / weaponfadetime); }; if (rifle[h].livetime > weaponlivetime){ rifle[h].active = false; line[rifle[h].linenum].active = false; if (rifle[h].parent != null){ rifle[h].parent.removeChild(rifle[h]); }; }; }; tempx1 = p[line[rifle[h].linenum].firstpnum].x; tempy1 = p[line[rifle[h].linenum].firstpnum].y; tempx2 = p[(line[rifle[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[rifle[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); rifle[h].x = ((tempx1 + tempx2) * 0.5); rifle[h].y = ((tempy1 + tempy2) * 0.5); if (rifle[h].facedirection == 0){ rifle[h].rotation = -(temprotation); } else { rifle[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < chainsaws) { if (chainsaw[h].active == true){ chainsaw[h].livetime = (chainsaw[h].livetime + 1); if (chainsaw[h].fade == true){ if (chainsaw[h].livetime > (weaponlivetime - weaponfadetime)){ chainsaw[h].alpha = (((weaponlivetime - chainsaw[h].livetime) / weaponfadetime) * 100); }; if (chainsaw[h].livetime > weaponlivetime){ chainsaw[h].active = false; line[chainsaw[h].linenum].active = false; if (chainsaw[h].parent != null){ chainsaw[h].parent.removeChild(chainsaw[h]); }; }; }; tempx1 = p[line[chainsaw[h].linenum].firstpnum].x; tempy1 = p[line[chainsaw[h].linenum].firstpnum].y; tempx2 = p[(line[chainsaw[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[chainsaw[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); chainsaw[h].x = ((tempx1 + tempx2) * 0.5); chainsaw[h].y = ((tempy1 + tempy2) * 0.5); if (chainsaw[h].facedirection == 0){ chainsaw[h].rotation = -(temprotation); } else { chainsaw[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < shotguns) { if (shotgun[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((player[o].hasshotgun == false)) || ((player[o].shotgunammo < maxshotgunammo)))){ if ((((((((shotgun[h].x > (player[o].x - chestlength))) && ((shotgun[h].x < (player[o].x + chestlength))))) && ((shotgun[h].y > (player[o].y - 1))))) && ((shotgun[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ weaponpickup.play(); player[o].shotgunammo = (player[o].shotgunammo + shotgunpickupammo); line[shotgun[h].linenum].active = false; shotgun[h].visible = false; shotgun[h].active = false; pickuptext = "You picked up a shotgun (5)!"; pickuptextdelay = messageduration; if (player[o].hasshotgun == false){ player[o].hasshotgun = true; player[o].weapon = shotgunnum; }; }; }; }; o = (o + 1); }; shotgun[h].livetime = (shotgun[h].livetime + 1); if (shotgun[h].fade == true){ if (shotgun[h].livetime > (weaponlivetime - weaponfadetime)){ shotgun[h].alpha = (((weaponlivetime - shotgun[h].livetime) / weaponfadetime) * 100); }; if (shotgun[h].livetime > weaponlivetime){ shotgun[h].active = false; line[shotgun[h].linenum].active = false; if (shotgun[h].parent != null){ shotgun[h].parent.removeChild(shotgun[h]); }; }; }; tempx1 = p[line[shotgun[h].linenum].firstpnum].x; tempy1 = p[line[shotgun[h].linenum].firstpnum].y; tempx2 = p[(line[shotgun[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[shotgun[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); shotgun[h].x = ((tempx1 + tempx2) * 0.5); shotgun[h].y = ((tempy1 + tempy2) * 0.5); if (shotgun[h].facedirection == 0){ shotgun[h].rotation = -(temprotation); } else { shotgun[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < pistols) { if (pistol[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((player[o].haspistol == false)) || ((player[o].pistolammo < maxpistolammo)))){ if ((((((((pistol[h].x > (player[o].x - chestlength))) && ((pistol[h].x < (player[o].x + chestlength))))) && ((pistol[h].y > (player[o].y - 1))))) && ((pistol[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ weaponpickup.play(); pickuptext = "You picked up a pistol (2)!"; pickuptextdelay = messageduration; player[o].pistolammo = (player[o].pistolammo + pistolpickupammo); line[pistol[h].linenum].active = false; pistol[h].visible = false; pistol[h].active = false; if (player[o].haspistol == false){ player[o].haspistol = true; player[o].weapon = pistolnum; }; }; }; }; o = (o + 1); }; pistol[h].livetime = (pistol[h].livetime + 1); if (pistol[h].fade == true){ if (pistol[h].livetime > (weaponlivetime - weaponfadetime)){ pistol[h].alpha = (((weaponlivetime - pistol[h].livetime) / weaponfadetime) * 100); }; if (pistol[h].livetime > weaponlivetime){ pistol[h].active = false; line[pistol[h].linenum].active = false; if (pistol[h].parent != null){ pistol[h].parent.removeChild(pistol[h]); }; }; }; tempx1 = p[line[pistol[h].linenum].firstpnum].x; tempy1 = p[line[pistol[h].linenum].firstpnum].y; tempx2 = p[(line[pistol[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[pistol[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); pistol[h].x = ((tempx1 + tempx2) * 0.5); pistol[h].y = ((tempy1 + tempy2) * 0.5); if (pistol[h].facedirection == 0){ pistol[h].rotation = -(temprotation); } else { pistol[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < smgs) { if (smg[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((player[o].hassmg == false)) || ((player[o].smgammo < maxsmgammo)))){ if ((((((((smg[h].x > (player[o].x - chestlength))) && ((smg[h].x < (player[o].x + chestlength))))) && ((smg[h].y > (player[o].y - 1))))) && ((smg[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ weaponpickup.play(); player[o].smgammo = (player[o].smgammo + smgpickupammo); line[smg[h].linenum].active = false; smg[h].visible = false; smg[h].active = false; pickuptext = "You picked up an smg (4)!"; pickuptextdelay = messageduration; if (player[o].hassmg == false){ player[o].hassmg = true; player[o].weapon = smgnum; }; }; }; }; o = (o + 1); }; smg[h].livetime = (smg[h].livetime + 1); if (smg[h].fade == true){ if (smg[h].livetime > (weaponlivetime - weaponfadetime)){ smg[h].alpha = (((weaponlivetime - smg[h].livetime) / weaponfadetime) * 100); }; if (smg[h].livetime > weaponlivetime){ smg[h].active = false; line[smg[h].linenum].active = false; if (smg[h].parent != null){ smg[h].parent.removeChild(smg[h]); }; }; }; tempx1 = p[line[smg[h].linenum].firstpnum].x; tempy1 = p[line[smg[h].linenum].firstpnum].y; tempx2 = p[(line[smg[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[smg[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); smg[h].x = ((tempx1 + tempx2) * 0.5); smg[h].y = ((tempy1 + tempy2) * 0.5); if (smg[h].facedirection == 0){ smg[h].rotation = -(temprotation); } else { smg[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < nailguns) { if (nailgun[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((player[o].hasnailgun == false)) || ((player[o].nailgunammo < maxnailgunammo)))){ if ((((((((nailgun[h].x > (player[o].x - chestlength))) && ((nailgun[h].x < (player[o].x + chestlength))))) && ((nailgun[h].y > (player[o].y - 1))))) && ((nailgun[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ weaponpickup.play(); player[o].nailgunammo = (player[o].nailgunammo + nailgunpickupammo); line[nailgun[h].linenum].active = false; nailgun[h].visible = false; nailgun[h].active = false; pickuptext = "You picked up a nailgun (7)!"; pickuptextdelay = messageduration; if (player[o].hasnailgun == false){ player[o].hasnailgun = true; player[o].weapon = nailgunnum; }; }; }; }; o = (o + 1); }; nailgun[h].livetime = (nailgun[h].livetime + 1); if (nailgun[h].fade == true){ if (nailgun[h].livetime > (weaponlivetime - weaponfadetime)){ nailgun[h].alpha = (((weaponlivetime - nailgun[h].livetime) / weaponfadetime) * 100); }; if (nailgun[h].livetime > weaponlivetime){ nailgun[h].active = false; line[nailgun[h].linenum].active = false; if (nailgun[h].parent != null){ nailgun[h].parent.removeChild(nailgun[h]); }; }; }; tempx1 = p[line[nailgun[h].linenum].firstpnum].x; tempy1 = p[line[nailgun[h].linenum].firstpnum].y; tempx2 = p[(line[nailgun[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[nailgun[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); nailgun[h].x = ((tempx1 + tempx2) * 0.5); nailgun[h].y = ((tempy1 + tempy2) * 0.5); if (nailgun[h].facedirection == 0){ nailgun[h].rotation = -(temprotation); } else { nailgun[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; h = 0; while (h < rpgs) { if (rpg[h].active == true){ if (rpg[h].dummy == false){ o = 0; while (o < players) { if (player[o].active == true){ if ((((player[o].hasrpg == false)) || ((player[o].rpgammo < maxrpgammo)))){ if ((((((((rpg[h].x > (player[o].x - chestlength))) && ((rpg[h].x < (player[o].x + chestlength))))) && ((rpg[h].y > (player[o].y - 1))))) && ((rpg[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ weaponpickup.play(); player[o].rpgammo = (player[o].rpgammo + rpgpickupammo); line[rpg[h].linenum].active = false; rpg[h].visible = false; rpg[h].active = false; pickuptext = "You picked up an rpg (8)!"; pickuptextdelay = messageduration; if (player[o].hasrpg == false){ player[o].hasrpg = true; player[o].weapon = rpgnum; }; }; }; }; o = (o + 1); }; } else { if (Math.floor((Math.random() * 12)) == 0){ rpgsmoke(p[line[rpg[h].linenum].firstpnum].x, p[line[rpg[h].linenum].firstpnum].y); }; if (Math.floor((Math.random() * 12)) == 0){ rpgsmoke(p[(line[rpg[h].linenum].firstpnum + 1)].x, p[(line[rpg[h].linenum].firstpnum + 1)].y); }; }; rpg[h].livetime = (rpg[h].livetime + 1); if (rpg[h].fade == true){ if (rpg[h].livetime > (weaponlivetime - weaponfadetime)){ rpg[h].alpha = (((weaponlivetime - rpg[h].livetime) / weaponfadetime) * 100); }; if (rpg[h].livetime > weaponlivetime){ rpg[h].active = false; line[rpg[h].linenum].active = false; if (rpg[h].parent != null){ rpg[h].parent.removeChild(rpg[h]); }; }; }; tempx1 = p[line[rpg[h].linenum].firstpnum].x; tempy1 = p[line[rpg[h].linenum].firstpnum].y; tempx2 = p[(line[rpg[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[rpg[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); rpg[h].x = ((tempx1 + tempx2) * 0.5); rpg[h].y = ((tempy1 + tempy2) * 0.5); if (rpg[h].facedirection == 0){ rpg[h].rotation = -(temprotation); } else { rpg[h].rotation = (180 - temprotation); }; }; h = (h + 1); }; tempattachp = -1; hitsomething2 = false; hitsomething3 = false; h = 0; while (h < movetrails) { if (movetrail[h].active == true){ if (movetrail[h].livetime < movetrail[h].maxlivetime){ movetrail[h].livetime = (movetrail[h].livetime + 1); movetrail[h].alpha = (1 - (movetrail[h].livetime / movetrail[h].maxlivetime)); drawline(movetrail[h].x1, movetrail[h].y1, movetrail[h].x2, movetrail[h].y2, movetrail[h].color, movetrail[h].alpha); } else { movetrail[h].active = false; }; }; h = (h + 1); }; h = 0; while (h < lasers) { if (laser[h].active == true){ laser[h].livetime = (laser[h].livetime + 1); if (laser[h].livetime > laserlivetime){ laser[h].active = false; laser[h].visible = false; }; laser[h].lx = laser[h].x; laser[h].ly = laser[h].y; laser[h].x = (laser[h].x + laser[h].hs); laser[h].y = (laser[h].y + laser[h].vs); if (segmentcollide(laser[h].x, laser[h].y, laser[h].lx, laser[h].ly) == true){ laser[h].active = false; laser[h].x = bestcx; laser[h].y = bestcy; laserimpact(laser[h].x, laser[h].y); }; createmovetrail(laser[h].lx, laser[h].ly, laser[h].x, laser[h].y, 10, 0xFF00); }; h = (h + 1); }; h = 0; while (h < rockets) { if (rocket[h].active == true){ rocket[h].livetime = (rocket[h].livetime + 1); if (rocket[h].livetime > rocketlivetime){ rocket[h].active = false; rocket[h].visible = false; }; rocket[h].lx = rocket[h].x; rocket[h].ly = rocket[h].y; rocket[h].x = (rocket[h].x + rocket[h].hs); rocket[h].y = (rocket[h].y + rocket[h].vs); if (segmentcollide(rocket[h].x, rocket[h].y, rocket[h].lx, rocket[h].ly) == true){ rocket[h].active = false; rocket[h].x = rocket[h].lx; rocket[h].y = rocket[h].ly; createblast(rocket[h].x, rocket[h].y, rocketradius, rocketpush, rocketdamage, rocket[h].side); grenadeexplosion(rocket[h].x, rocket[h].y); }; createmovetrail(rocket[h].lx, rocket[h].ly, rocket[h].x, rocket[h].y, 8, 0xFFFF00); } else { if (rocket[h].parent != null){ rocket[h].parent.removeChild(rocket[h]); }; }; h = (h + 1); }; h = 0; while (h < nails) { if (nail[h].active == true){ nail[h].livetime = (nail[h].livetime + 1); if (nail[h].livetime > (naillivetime - nailfadetime)){ nail[h].alpha = ((naillivetime - nail[h].livetime) / nailfadetime); }; if (nail[h].livetime > naillivetime){ nail[h].active = false; nail[h].visible = false; }; if ((((nail[h].livetime > naildummytime)) && ((nail[h].attachedparticle == -1)))){ if (nail[h].dummy == false){ nail[h].active = false; }; }; if (nail[h].attachedparticle > -1){ if (nail[h].bleedtime < nailmaxbleedtime){ nail[h].bleedtime = (nail[h].bleedtime + 1); if (Math.floor((Math.random() * 3)) == 0){ blooddrip(nail[h].x, nail[h].y); }; }; if (approxdistance(p[nail[h].attachedparticle].x, p[nail[h].attachedparticle].y, nail[h].x, nail[h].y) < 50){ p[nail[h].attachedparticle].x = nail[h].x; p[nail[h].attachedparticle].y = nail[h].y; } else { nail[h].active = false; }; if (nail[h].dummy == false){ nail[h].hs = (nail[h].hs * nailaf); nail[h].vs = (nail[h].vs * nailaf); nail[h].vs = (nail[h].vs + g); }; }; nail[h].lx = nail[h].x; nail[h].ly = nail[h].y; nail[h].x = (nail[h].x + nail[h].hs); nail[h].y = (nail[h].y + nail[h].vs); if (segmentcollide(nail[h].x, nail[h].y, nail[h].lx, nail[h].ly) == true){ if (nail[h].madeeffect == false){ nailgunimpact(bestcx, bestcy); }; nail[h].madeeffect = true; nail[h].x = bestcx; nail[h].y = bestcy; nail[h].dummy = true; nail[h].hs = 0; nail[h].vs = 0; }; if (nail[h].dummy == false){ createmovetrail(nail[h].lx, nail[h].ly, nail[h].x, nail[h].y, 5, 0xE6E6E6); nail[h].rotation = -(directiontopoint(0, 0, nail[h].hs, nail[h].vs)); }; } else { if (nail[h].parent != null){ nail[h].parent.removeChild(nail[h]); }; }; h = (h + 1); }; h = 0; while (h < grenades) { if (grenade[h].active == true){ if (Math.floor((Math.random() * 4)) == 0){ grenadesmoke(grenade[h].x, grenade[h].y); }; grenade[h].livetime = (grenade[h].livetime + 1); if (grenade[h].livetime > (grenadelivetime - grenadefadetime)){ grenade[h].alpha = ((grenadelivetime - grenade[h].livetime) / grenadefadetime); }; if (grenade[h].livetime > grenadelivetime){ grenade[h].active = false; createblast(grenade[h].x, grenade[h].y, grenaderadius, grenadepush, grenadedamage, grenade[h].side); point[grenade[h].pointnum].active = false; grenadeexplosion(grenade[h].x, grenade[h].y); grenade[h].visible = false; } else { if ((((point[grenade[h].pointnum].bouncetype == 2)) && ((grenade[h].livetime > 8)))){ grenade[h].active = false; createblast(grenade[h].x, grenade[h].y, grenaderadius, grenadepush, grenadedamage, grenade[h].side); point[grenade[h].pointnum].active = false; grenadeexplosion(grenade[h].x, grenade[h].y); grenade[h].visible = false; }; }; grenade[h].x = p[point[grenade[h].pointnum].firstpnum].x; grenade[h].y = p[point[grenade[h].pointnum].firstpnum].y; if (grenade[h].playedsounds < 3){ if (point[grenade[h].pointnum].bouncetype == 1){ randsound = Math.floor((Math.random() * 3)); if (randsound == 0){ grenadebounce1.play(); }; if (randsound == 1){ grenadebounce2.play(); }; if (randsound == 2){ grenadebounce3.play(); }; grenade[h].playedsounds = (grenade[h].playedsounds + 1); }; }; grenade[h].rotation = (grenade[h].rotation + grenade[h].rotatespeed); } else { if (grenade[h].parent != null){ grenade[h].parent.removeChild(grenade[h]); }; }; h = (h + 1); }; h = 0; while (h < megazombies) { if (megazombie[h].active == true){ s = 0; while (s < rockets) { if ((((rocket[s].active == true)) && (!((rocket[s].side == enemyside))))){ if (approxdistance(rocket[s].x, rocket[s].y, megazombie[h].x, (megazombie[h].y + 30)) <= 30){ rocket[s].active = false; createblast(rocket[s].x, rocket[s].y, rocketradius, rocketpush, rocketdamage, rocket[s].side); megazombie[h].woundtimer = 120; megazombie[h].recovertimer = 200; grenadeexplosion(rocket[s].x, rocket[s].y); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < megazombies) { if (megazombie[h].active == true){ if (megazombie[h].woundtimer > 0){ s = 0; while (s < bullets) { if (bullet[s].active == true){ tempnormal = (directiontopoint(bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2) + 90); hitsomething3 = false; if (approxdistance(bullet[s].x1, bullet[s].y1, megazombie[h].x, (megazombie[h].y + 30)) <= 30){ hitsomething3 = true; }; if (approxdistance(bullet[s].x2, bullet[s].y2, megazombie[h].x, (megazombie[h].y + 30)) <= 30){ hitsomething3 = true; }; if (linecollide((megazombie[h].x + vectorx2(tempnormal, 30)), ((megazombie[h].y + 30) + vectory2(tempnormal, 30)), (megazombie[h].x - vectorx2(tempnormal, 30)), ((megazombie[h].y + 30) - vectory2(tempnormal, 30)), bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2, directiontopoint(bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2)) == true){ }; if (hitsomething3 == true){ if ((megazombie[h].damage + 1) > 3){ megazombieexplosion(megazombie[h].x, (megazombie[h].y + 30)); megazombie[h].active = false; f = 0; while (f < 3) { createpointdebris(((megazombie[h].x + Math.random()) - 0.5), (((megazombie[h].y + 30) + Math.random()) - 0.5), 9); f = (f + 1); }; f = 0; while (f < 5) { createpointdebris(((megazombie[h].x + Math.random()) - 0.5), (((megazombie[h].y + 30) + Math.random()) - 0.5), (3 + Math.floor((Math.random() * 6)))); f = (f + 1); }; physicsexplosion(megazombie[h].x, (megazombie[h].y + 31), 3, 8); } else { bloodspray(((bullet[s].x1 + bullet[s].x2) * 0.5), ((bullet[s].y1 + bullet[s].y2) * 0.5), 5); megazombieexhaust.play(); megazombiedie.play(); megazombie[h].sounddelay = 90; megazombie[h].woundtimer = 0; megazombie[h].recovertimer = (megazombie[h].recovertimer - megazombie[h].woundtimer); megazombie[h].damage = (megazombie[h].damage + 1); }; }; }; s = (s + 1); }; }; }; h = (h + 1); }; h = 0; while (h < enemyAs) { if (enemyA[h].active == true){ s = 0; while (s < rockets) { if ((((rocket[s].active == true)) && (!((rocket[s].side == enemyside))))){ hitsomething2 = false; if (linecollide(rocket[s].x, rocket[s].y, rocket[s].lx, rocket[s].ly, enemyA[h].x, enemyA[h].y, enemyA[h].x, (enemyA[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(rocket[s].x, rocket[s].y, (p[objectline[enemyA[h].objectlinenum].firstpnum].x - objectline[enemyA[h].objectlinenum].xwidth), p[objectline[enemyA[h].objectlinenum].firstpnum].y, (p[objectline[enemyA[h].objectlinenum].firstpnum].x + objectline[enemyA[h].objectlinenum].xwidth), (p[objectline[enemyA[h].objectlinenum].firstpnum].y + objectline[enemyA[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = rocket[s].x; cy = rocket[s].y; }; }; if (hitsomething2 == true){ rocket[s].x = cx; rocket[s].y = cy; rocket[s].active = false; createblast(cx, cy, rocketradius, rocketpush, rocketdamage, rocket[s].side); grenadeexplosion(cx, cy); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < enemyBs) { if (enemyB[h].active == true){ s = 0; while (s < rockets) { if ((((rocket[s].active == true)) && (!((rocket[s].side == enemyside))))){ hitsomething2 = false; if (linecollide(rocket[s].x, rocket[s].y, rocket[s].lx, rocket[s].ly, enemyB[h].x, enemyB[h].y, enemyB[h].x, (enemyB[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(rocket[s].x, rocket[s].y, (p[objectline[enemyB[h].objectlinenum].firstpnum].x - objectline[enemyB[h].objectlinenum].xwidth), p[objectline[enemyB[h].objectlinenum].firstpnum].y, (p[objectline[enemyB[h].objectlinenum].firstpnum].x + objectline[enemyB[h].objectlinenum].xwidth), (p[objectline[enemyB[h].objectlinenum].firstpnum].y + objectline[enemyB[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = rocket[s].x; cy = rocket[s].y; }; }; if (hitsomething2 == true){ rocket[s].x = cx; rocket[s].y = cy; rocket[s].active = false; createblast(cx, cy, rocketradius, rocketpush, rocketdamage, rocket[s].side); grenadeexplosion(cx, cy); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < enemyCs) { if (enemyC[h].active == true){ s = 0; while (s < rockets) { if ((((rocket[s].active == true)) && (!((rocket[s].side == enemyside))))){ hitsomething2 = false; if (linecollide(rocket[s].x, rocket[s].y, rocket[s].lx, rocket[s].ly, enemyC[h].x, enemyC[h].y, enemyC[h].x, (enemyC[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(rocket[s].x, rocket[s].y, (p[objectline[enemyC[h].objectlinenum].firstpnum].x - objectline[enemyC[h].objectlinenum].xwidth), p[objectline[enemyC[h].objectlinenum].firstpnum].y, (p[objectline[enemyC[h].objectlinenum].firstpnum].x + objectline[enemyC[h].objectlinenum].xwidth), (p[objectline[enemyC[h].objectlinenum].firstpnum].y + objectline[enemyC[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = rocket[s].x; cy = rocket[s].y; }; }; if (hitsomething2 == true){ rocket[s].x = cx; rocket[s].y = cy; rocket[s].active = false; createblast(cx, cy, rocketradius, rocketpush, rocketdamage, rocket[s].side); grenadeexplosion(cx, cy); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < enemyAs) { if (enemyA[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < blasts) { if ((((blast[s].active == true)) && (!((blast[s].side == enemyside))))){ explosiondistance = approxdistance(blast[s].x, blast[s].y, enemyA[h].x, (enemyA[h].y + ragdollheight)); if (explosiondistance < blast[s].radius){ if (segmentcollide(blast[s].x, blast[s].y, enemyA[h].x, (enemyA[h].y + ragdollheight)) == false){ damagetaken = (((blast[s].radius - explosiondistance) / blast[s].radius) * blast[s].damage); enemyA[h].damage = (enemyA[h].damage + damagetaken); leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); bloodspray(enemyA[h].x, (enemyA[h].y + ragdollheight), Math.round(((damagetaken / blast[s].damage) * explosionbloodps))); }; }; }; s = (s + 1); }; if (enemyA[h].damage >= enemyAhealth){ enemyA[h].active = false; createcorpse(enemyA[h].x, enemyA[h].y, true, objectline[enemyA[h].objectlinenum].firstpnum, 1, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); zombiedie.play(); }; }; if (enemyA[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; if (bulletcollide(enemyA[h].x, enemyA[h].y, enemyA[h].x, (enemyA[h].y + (ragdollheight * 2)), enemyside) == true){ s = 0; while (s < hits) { if (hit[s].dismember == true){ dismembermentcheck(hit[s].y, enemyA[h].y); }; if (player[0].berserk == true){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); }; if ((((hit[s].y > enemyA[h].y)) && ((hit[s].y < (enemyA[h].y + necklength))))){ enemyA[h].slow = (enemyA[h].slow + (bulletslowamount * 2)); bloodspray(hit[s].x, hit[s].y, hsbloodps); enemyA[h].damage = (enemyA[h].damage + (hit[s].damage * headshotmultiplier)); } else { enemyA[h].slow = (enemyA[h].slow + bulletslowamount); bloodspray(hit[s].x, hit[s].y, bulletbloodps); enemyA[h].damage = (enemyA[h].damage + hit[s].damage); }; s = (s + 1); }; if (enemyA[h].damage >= enemyAhealth){ enemyA[h].active = false; createcorpse(enemyA[h].x, enemyA[h].y, true, objectline[enemyA[h].objectlinenum].firstpnum, 1, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); s = 0; while (s < hits) { physicspush(hit[s].x, hit[s].y, bulletpushradius, bullet[s].direction, bulletpushspeed); s = (s + 1); }; zombiedie.play(); }; }; }; if (enemyA[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < nails) { if ((((((nail[s].active == true)) && (!((nail[s].side == enemyside))))) && ((nail[s].attachedparticle == -1)))){ hitsomething2 = false; if (linecollide(nail[s].x, nail[s].y, nail[s].lx, nail[s].ly, enemyA[h].x, enemyA[h].y, enemyA[h].x, (enemyA[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(nail[s].x, nail[s].y, (p[objectline[enemyA[h].objectlinenum].firstpnum].x - objectline[enemyA[h].objectlinenum].xwidth), p[objectline[enemyA[h].objectlinenum].firstpnum].y, (p[objectline[enemyA[h].objectlinenum].firstpnum].x + objectline[enemyA[h].objectlinenum].xwidth), (p[objectline[enemyA[h].objectlinenum].firstpnum].y + objectline[enemyA[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = nail[s].x; cy = nail[s].y; }; }; if (hitsomething2 == true){ nailhit.play(); if ((((cy > enemyA[h].y)) && ((cy < (enemyA[h].y + necklength))))){ enemyA[h].slow = (enemyA[h].slow + (nailslowamount * 2)); bloodspray(cx, cy, hsbloodps); enemyA[h].damage = (enemyA[h].damage + (naildamage * headshotmultiplier)); } else { enemyA[h].slow = (enemyA[h].slow + nailslowamount); bloodspray(cx, cy, bulletbloodps); enemyA[h].damage = (enemyA[h].damage + naildamage); }; if (enemyA[h].damage >= enemyAhealth){ enemyA[h].active = false; createcorpse(enemyA[h].x, enemyA[h].y, true, objectline[enemyA[h].objectlinenum].firstpnum, 1, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); nail[s].x = cx; nail[s].y = cy; nail[s].hs = vectorx2(nail[s].direction, nailpinspeed); nail[s].vs = vectory2(nail[s].direction, nailpinspeed); tempattachp = -1; tempattachp = findclosestp(((nail[s].x + (Math.random() * ragdollheight)) - (ragdollheight * 0.5)), nail[s].y); if ((((tempattachp >= ragdoll[corpse[(corpses - 1)].ragdollnum].firstpnum)) && ((tempattachp <= (ragdoll[corpse[(corpses - 1)].ragdollnum].firstpnum + 13))))){ nail[s].attachedparticle = tempattachp; nail[s].x = p[tempattachp].x; nail[s].y = p[tempattachp].y; } else { nailgunimpact(nail[s].x, nail[s].y); nail[s].active = false; }; zombiedie.play(); } else { nail[s].active = false; }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < enemyBs) { if (enemyB[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < blasts) { if ((((blast[s].active == true)) && (!((blast[s].side == enemyside))))){ explosiondistance = approxdistance(blast[s].x, blast[s].y, enemyB[h].x, (enemyB[h].y + ragdollheight)); if (explosiondistance < blast[s].radius){ if (segmentcollide(blast[s].x, blast[s].y, enemyB[h].x, (enemyB[h].y + ragdollheight)) == false){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); damagetaken = (((blast[s].radius - explosiondistance) / blast[s].radius) * blast[s].damage); enemyB[h].damage = (enemyB[h].damage + damagetaken); bloodspray(enemyB[h].x, (enemyB[h].y + ragdollheight), Math.round(((damagetaken / blast[s].damage) * explosionbloodps))); }; }; }; s = (s + 1); }; if (enemyB[h].damage >= enemyBhealth){ enemyB[h].active = false; if (enemyB[h].kamikaze == false){ createcorpse(enemyB[h].x, enemyB[h].y, true, objectline[enemyB[h].objectlinenum].firstpnum, 2, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); zombiedie.play(); createpointdebris(enemyB[h].x, (enemyB[h].y + 8), 11); } else { createblast(enemyB[h].x, (enemyB[h].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[h].x, (enemyB[h].y + 8)); }; }; }; if (enemyB[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; if (bulletcollide(enemyB[h].x, enemyB[h].y, enemyB[h].x, (enemyB[h].y + (ragdollheight * 2)), enemyside) == true){ s = 0; while (s < hits) { if (hit[s].dismember == true){ dismembermentcheck(hit[s].y, enemyB[h].y); }; if (player[0].berserk == true){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); }; if ((((hit[s].y > enemyB[h].y)) && ((hit[s].y < (enemyB[h].y + necklength))))){ enemyB[h].slow = (enemyB[h].slow + (bulletslowamount * 2)); bloodspray(hit[s].x, hit[s].y, hsbloodps); enemyB[h].damage = (enemyB[h].damage + (hit[s].damage * headshotmultiplier)); } else { enemyB[h].slow = (enemyB[h].slow + bulletslowamount); bloodspray(hit[s].x, hit[s].y, bulletbloodps); enemyB[h].damage = (enemyB[h].damage + hit[s].damage); }; s = (s + 1); }; if (enemyB[h].damage >= enemyBhealth){ enemyB[h].active = false; if (enemyB[h].kamikaze == false){ createcorpse(enemyB[h].x, enemyB[h].y, true, objectline[enemyB[h].objectlinenum].firstpnum, 2, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); createpointdebris(enemyB[h].x, (enemyB[h].y + 8), 11); s = 0; while (s < hits) { physicspush(hit[s].x, hit[s].y, bulletpushradius, bullet[s].direction, bulletpushspeed); s = (s + 1); }; zombiedie.play(); } else { createblast(enemyB[h].x, (enemyB[h].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[h].x, (enemyB[h].y + 8)); }; }; }; }; if (enemyB[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < nails) { if ((((((nail[s].active == true)) && (!((nail[s].side == enemyside))))) && ((nail[s].attachedparticle == -1)))){ hitsomething2 = false; if (linecollide(nail[s].x, nail[s].y, nail[s].lx, nail[s].ly, enemyB[h].x, enemyB[h].y, enemyB[h].x, (enemyB[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(nail[s].x, nail[s].y, (p[objectline[enemyB[h].objectlinenum].firstpnum].x - objectline[enemyB[h].objectlinenum].xwidth), p[objectline[enemyB[h].objectlinenum].firstpnum].y, (p[objectline[enemyB[h].objectlinenum].firstpnum].x + objectline[enemyB[h].objectlinenum].xwidth), (p[objectline[enemyB[h].objectlinenum].firstpnum].y + objectline[enemyB[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = nail[s].x; cy = nail[s].y; }; }; if (hitsomething2 == true){ nailhit.play(); if ((((cy > enemyB[h].y)) && ((cy < (enemyB[h].y + necklength))))){ enemyB[h].slow = (enemyB[h].slow + (nailslowamount * 2)); bloodspray(cx, cy, hsbloodps); enemyB[h].damage = (enemyB[h].damage + (naildamage * headshotmultiplier)); } else { enemyB[h].slow = (enemyB[h].slow + nailslowamount); bloodspray(cx, cy, bulletbloodps); enemyB[h].damage = (enemyB[h].damage + naildamage); }; if (enemyB[h].damage >= enemyBhealth){ enemyB[h].active = false; if (enemyB[h].kamikaze == false){ createpointdebris(enemyB[h].x, (enemyB[h].y + 8), 11); createcorpse(enemyB[h].x, enemyB[h].y, true, objectline[enemyB[h].objectlinenum].firstpnum, 2, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); nail[s].x = cx; nail[s].y = cy; nail[s].hs = vectorx2(nail[s].direction, nailpinspeed); nail[s].vs = vectory2(nail[s].direction, nailpinspeed); tempattachp = -1; tempattachp = findclosestp(((nail[s].x + (Math.random() * ragdollheight)) - (ragdollheight * 0.5)), nail[s].y); if ((((tempattachp >= ragdoll[(ragdolls - 1)].firstpnum)) && ((tempattachp <= (ragdoll[(ragdolls - 1)].firstpnum + 13))))){ nail[s].attachedparticle = tempattachp; nail[s].x = p[tempattachp].x; nail[s].y = p[tempattachp].y; } else { nailgunimpact(nail[s].x, nail[s].y); nail[s].active = false; }; zombiedie.play(); } else { createblast(enemyB[h].x, (enemyB[h].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[h].x, (enemyB[h].y + 8)); }; } else { nail[s].active = false; }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < enemyCs) { if (enemyC[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < blasts) { if ((((blast[s].active == true)) && (!((blast[s].side == enemyside))))){ explosiondistance = approxdistance(blast[s].x, blast[s].y, enemyC[h].x, (enemyC[h].y + ragdollheight)); if (explosiondistance < blast[s].radius){ if (segmentcollide(blast[s].x, blast[s].y, enemyC[h].x, (enemyC[h].y + ragdollheight)) == false){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); damagetaken = (((blast[s].radius - explosiondistance) / blast[s].radius) * blast[s].damage); enemyC[h].damage = (enemyC[h].damage + damagetaken); bloodspray(enemyC[h].x, (enemyC[h].y + ragdollheight), Math.round(((damagetaken / blast[s].damage) * explosionbloodps))); }; }; }; s = (s + 1); }; if (enemyC[h].damage >= enemyChealth){ enemyC[h].active = false; createcorpse(enemyC[h].x, enemyC[h].y, true, objectline[enemyC[h].objectlinenum].firstpnum, 3, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); zombiedie.play(); createpointdebris(enemyC[h].x, (enemyC[h].y + 8), 10); }; }; if (enemyC[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; if (bulletcollide(enemyC[h].x, enemyC[h].y, enemyC[h].x, (enemyC[h].y + (ragdollheight * 2)), enemyside) == true){ s = 0; while (s < hits) { if (hit[s].dismember == true){ dismembermentcheck(hit[s].y, enemyC[h].y); }; if (player[0].berserk == true){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); }; if ((((hit[s].y > enemyC[h].y)) && ((hit[s].y < (enemyC[h].y + necklength))))){ enemyC[h].slow = (enemyC[h].slow + (bulletslowamount * 2)); bloodspray(hit[s].x, hit[s].y, hsbloodps); enemyC[h].damage = (enemyC[h].damage + (hit[s].damage * headshotmultiplier)); } else { enemyC[h].slow = (enemyC[h].slow + bulletslowamount); bloodspray(hit[s].x, hit[s].y, bulletbloodps); enemyC[h].damage = (enemyC[h].damage + hit[s].damage); }; s = (s + 1); }; if (enemyC[h].damage >= enemyChealth){ enemyC[h].active = false; createpointdebris(enemyC[h].x, (enemyC[h].y + 8), 10); createcorpse(enemyC[h].x, enemyC[h].y, true, objectline[enemyC[h].objectlinenum].firstpnum, 3, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); s = 0; while (s < hits) { physicspush(hit[s].x, hit[s].y, bulletpushradius, bullet[s].direction, bulletpushspeed); s = (s + 1); }; zombiedie.play(); }; }; }; if (enemyC[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < nails) { if ((((((nail[s].active == true)) && (!((nail[s].side == enemyside))))) && ((nail[s].attachedparticle == -1)))){ hitsomething2 = false; if (linecollide(nail[s].x, nail[s].y, nail[s].lx, nail[s].ly, enemyC[h].x, enemyC[h].y, enemyC[h].x, (enemyC[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(nail[s].x, nail[s].y, (p[objectline[enemyC[h].objectlinenum].firstpnum].x - objectline[enemyC[h].objectlinenum].xwidth), p[objectline[enemyC[h].objectlinenum].firstpnum].y, (p[objectline[enemyC[h].objectlinenum].firstpnum].x + objectline[enemyC[h].objectlinenum].xwidth), (p[objectline[enemyC[h].objectlinenum].firstpnum].y + objectline[enemyC[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = nail[s].x; cy = nail[s].y; }; }; if (hitsomething2 == true){ nailhit.play(); if ((((cy > enemyC[h].y)) && ((cy < (enemyC[h].y + necklength))))){ enemyC[h].slow = (enemyC[h].slow + (nailslowamount * 2)); bloodspray(cx, cy, hsbloodps); enemyC[h].damage = (enemyC[h].damage + (naildamage * headshotmultiplier)); } else { enemyC[h].slow = (enemyC[h].slow + nailslowamount); bloodspray(cx, cy, bulletbloodps); enemyC[h].damage = (enemyC[h].damage + naildamage); }; if (enemyC[h].damage >= enemyChealth){ createpointdebris(enemyC[h].x, (enemyC[h].y + 8), 10); enemyC[h].active = false; createcorpse(enemyC[h].x, enemyC[h].y, true, objectline[enemyC[h].objectlinenum].firstpnum, 3, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); nail[s].x = cx; nail[s].y = cy; nail[s].hs = vectorx2(nail[s].direction, nailpinspeed); nail[s].vs = vectory2(nail[s].direction, nailpinspeed); tempattachp = -1; tempattachp = findclosestp(((nail[s].x + (Math.random() * ragdollheight)) - (ragdollheight * 0.5)), nail[s].y); if ((((tempattachp >= ragdoll[(ragdolls - 1)].firstpnum)) && ((tempattachp <= (ragdoll[(ragdolls - 1)].firstpnum + 13))))){ nail[s].attachedparticle = tempattachp; nail[s].x = p[tempattachp].x; nail[s].y = p[tempattachp].y; } else { nailgunimpact(nail[s].x, nail[s].y); nail[s].active = false; }; zombiedie.play(); } else { nail[s].active = false; }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < players) { if ((((player[h].active == true)) && ((player[h].berserk == false)))){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < blasts) { if ((((blast[s].active == true)) && (!((blast[s].side == playerside))))){ explosiondistance = approxdistance(blast[s].x, blast[s].y, player[h].x, (player[h].y + ragdollheight)); if (explosiondistance < blast[s].radius){ if (segmentcollide(blast[s].x, blast[s].y, player[h].x, (player[h].y + ragdollheight)) == false){ leftarmdamage = Math.floor((Math.random() * 3)); rightarmdamage = Math.floor((Math.random() * 3)); leftlegdamage = Math.floor((Math.random() * 3)); rightlegdamage = Math.floor((Math.random() * 3)); playerdamage.play(); damagetaken = (((blast[s].radius - explosiondistance) / blast[s].radius) * blast[s].damage); player[h].berserkamount = (player[h].berserkamount + damagetaken); player[h].damage = (player[h].damage + damagetaken); bloodspray(player[h].x, (player[h].y + ragdollheight), Math.round(((damagetaken / blast[s].damage) * explosionbloodps))); }; }; }; s = (s + 1); }; if (player[h].damage >= playerhealth){ player[h].active = false; if (player[h].weapon == riflenum){ createrifle((player[h].bodyx + vectorx(player[h].gundirection, rifleholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rifleholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == pistolnum){ createpistol((player[h].bodyx + vectorx(player[h].gundirection, pistolholddistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == shotgunnum){ createshotgun((player[h].bodyx + vectorx(player[h].gundirection, shotgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == smgnum){ createsmg((player[h].bodyx + vectorx(player[h].gundirection, smgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, smgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == chainsawnum){ createchainsaw((player[h].bodyx + vectorx(player[h].gundirection, chainsawholddistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == nailgunnum){ createnailgun((player[h].bodyx + vectorx(player[h].gundirection, nailgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == rpgnum){ createrpg((player[h].bodyx + vectorx(player[h].gundirection, rpgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum, false); }; createcorpse(player[h].x, player[h].y, true, objectline[player[h].objectlinenum].firstpnum, 0, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); }; }; if ((((player[h].active == true)) && ((player[h].berserk == false)))){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; if (bulletcollide(player[h].x, player[h].y, player[h].x, (player[h].y + (ragdollheight * 2)), playerside) == true){ playerdamage.play(); s = 0; while (s < hits) { if (hit[s].dismember == true){ dismembermentcheck(hit[s].y, player[h].y); }; if ((((hit[s].y > player[h].y)) && ((hit[s].y < (player[h].y + necklength))))){ player[h].slow = (player[h].slow + (bulletslowamount * 2)); bloodspray(hit[s].x, hit[s].y, hsbloodps); player[h].damage = (player[h].damage + (hit[s].damage * headshotmultiplier)); player[h].berserkamount = (player[h].berserkamount + (hit[s].damage * headshotmultiplier)); } else { player[h].slow = (player[h].slow + bulletslowamount); bloodspray(hit[s].x, hit[s].y, bulletbloodps); player[h].damage = (player[h].damage + hit[s].damage); player[h].berserkamount = (player[h].berserkamount + hit[s].damage); }; s = (s + 1); }; if (player[h].damage >= playerhealth){ player[h].active = false; if (player[h].weapon == riflenum){ createrifle((player[h].bodyx + vectorx(player[h].gundirection, rifleholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rifleholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == pistolnum){ createpistol((player[h].bodyx + vectorx(player[h].gundirection, pistolholddistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == shotgunnum){ createshotgun((player[h].bodyx + vectorx(player[h].gundirection, shotgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == smgnum){ createsmg((player[h].bodyx + vectorx(player[h].gundirection, smgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, smgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == chainsawnum){ createchainsaw((player[h].bodyx + vectorx(player[h].gundirection, chainsawholddistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == nailgunnum){ createnailgun((player[h].bodyx + vectorx(player[h].gundirection, nailgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == rpgnum){ createrpg((player[h].bodyx + vectorx(player[h].gundirection, rpgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum, false); }; createcorpse(player[h].x, player[h].y, true, objectline[player[h].objectlinenum].firstpnum, 0, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); s = 0; while (s < hits) { physicspush(hit[s].x, hit[s].y, bulletpushradius, bullet[s].direction, bulletpushspeed); s = (s + 1); }; }; }; }; if (player[h].active == true){ leftarmdamage = 0; rightarmdamage = 0; leftlegdamage = 0; rightlegdamage = 0; s = 0; while (s < lasers) { if ((((laser[s].active == true)) && (!((laser[s].side == playerside))))){ hitsomething2 = false; if (linecollide(laser[s].x, laser[s].y, laser[s].lx, laser[s].ly, player[h].x, player[h].y, player[h].x, (player[h].y + (ragdollheight * 2)), 90) == true){ hitsomething2 = true; } else { if (pointcollide(laser[s].x, laser[s].y, (p[objectline[player[h].objectlinenum].firstpnum].x - objectline[player[h].objectlinenum].xwidth), p[objectline[player[h].objectlinenum].firstpnum].y, (p[objectline[player[h].objectlinenum].firstpnum].x + objectline[player[h].objectlinenum].xwidth), (p[objectline[player[h].objectlinenum].firstpnum].y + objectline[player[h].objectlinenum].yheight)) == true){ hitsomething2 = true; cx = laser[s].x; cy = laser[s].y; }; }; if (hitsomething2 == true){ laser[s].active = false; if ((((cy > player[h].y)) && ((cy < (player[h].y + necklength))))){ bloodspray(cx, cy, hsbloodps); player[h].damage = (player[h].damage + (laserdamage * headshotmultiplier)); } else { bloodspray(cx, cy, bulletbloodps); player[h].damage = (player[h].damage + laserdamage); }; if (player[h].damage >= playerhealth){ playerdamage.play(); player[h].active = false; if (player[h].weapon == riflenum){ createrifle((player[h].bodyx + vectorx(player[h].gundirection, rifleholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rifleholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == pistolnum){ createpistol((player[h].bodyx + vectorx(player[h].gundirection, pistolholddistance)), (player[h].bodyy + vectory(player[h].gundirection, pistolholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == shotgunnum){ createshotgun((player[h].bodyx + vectorx(player[h].gundirection, shotgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, shotgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == smgnum){ createsmg((player[h].bodyx + vectorx(player[h].gundirection, smgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, smgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == chainsawnum){ createchainsaw((player[h].bodyx + vectorx(player[h].gundirection, chainsawholddistance)), (player[h].bodyy + vectory(player[h].gundirection, chainsawholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == nailgunnum){ createnailgun((player[h].bodyx + vectorx(player[h].gundirection, nailgunholddistance)), (player[h].bodyy + vectory(player[h].gundirection, nailgunholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum); }; if (player[h].weapon == rpgnum){ createrpg((player[h].bodyx + vectorx(player[h].gundirection, rpgholddistance)), (player[h].bodyy + vectory(player[h].gundirection, rpgholddistance)), player[h].facedirection, player[h].gundirection, true, objectline[player[h].objectlinenum].firstpnum, false); }; createcorpse(player[h].x, player[h].y, true, objectline[player[h].objectlinenum].firstpnum, 0, (2 - leftarmdamage), (2 - rightarmdamage), (2 - leftlegdamage), (2 - rightlegdamage)); }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < turretbases) { if (turretbase[h].active == true){ s = 0; while (s < blasts) { if (blast[s].active == true){ explosiondistance = approxdistance(blast[s].x, blast[s].y, ((turretbase[h].x1 + turretbase[h].x2) * 0.5), ((turretbase[h].y1 + turretbase[h].y2) * 0.5)); if (explosiondistance < blast[s].radius){ if (segmentcollide(blast[s].x, blast[s].y, ((turretbase[h].x1 + turretbase[h].x2) * 0.5), ((turretbase[h].y1 + turretbase[h].y2) * 0.5)) == false){ damagetaken = (((blast[s].radius - explosiondistance) / blast[s].radius) * blast[s].damage); turretbase[h].damage = (turretbase[h].damage + damagetaken); turrethit(((turretbase[h].x1 + turretbase[h].x2) * 0.5), ((turretbase[h].y1 + turretbase[h].y2) * 0.5)); }; }; }; s = (s + 1); }; if (bulletcollide(turretbase[h].x1, turretbase[h].y1, turretbase[h].x2, turretbase[h].y2, turretside) == true){ s = 0; while (s < hits) { turrethit(hit[s].x, hit[s].y); turretbase[h].damage = (turretbase[h].damage + hit[s].damage); s = (s + 1); }; if (turretbase[h].damage >= turrethealth){ turretbase[h].active = false; turretbarrel[turretbase[h].barrelnum].active = false; turretexplosion(turretbase[h].x, turretbase[h].y); f = 0; while (f < turretdebrisparticles) { createpointdebris(((turretbase[h].x + Math.random()) - 0.5), ((turretbase[h].y + Math.random()) - 0.5), 0); f = (f + 1); }; physicsexplosion(turretbase[h].x, turretbase[h].y, 2, 5); }; }; s = 0; while (s < nails) { if ((((nail[s].active == true)) && (!((nail[s].side == turretside))))){ if (linecollide(nail[s].x, nail[s].y, nail[s].lx, nail[s].ly, turretbase[h].x1, turretbase[h].y1, turretbase[h].x2, turretbase[h].y2, directiontopoint(turretbase[h].x1, turretbase[h].y1, turretbase[h].x2, turretbase[h].y2)) == true){ nailhit.play(); nail[s].active = false; nailgunimpact(cx, cy); turretbase[h].damage = (turretbase[h].damage + naildamage); if (turretbase[h].damage >= turrethealth){ turretbase[h].active = false; turretbarrel[turretbase[h].barrelnum].active = false; turretexplosion(turretbase[h].x, turretbase[h].y); f = 0; while (f < turretdebrisparticles) { createpointdebris(((turretbase[h].x + Math.random()) - 0.5), ((turretbase[h].y + Math.random()) - 0.5), 0); f = (f + 1); }; physicsexplosion(turretbase[h].x, turretbase[h].y, 2, 5); }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < waterpools) { if (waterpool[h].active == true){ if (bulletcollide(waterpool[h].x, waterpool[h].y, (waterpool[h].x + waterpool[h].xwidth), waterpool[h].y, -3) == true){ s = 0; while (s < hits) { watersplash(hit[s].x, hit[s].y, waterpool[h].watercolor); s = (s + 1); }; }; }; h = (h + 1); }; h = 0; while (h < waterpools) { if (waterpool[h].active == true){ s = 0; while (s < blasts) { if (blast[s].active == true){ if ((((((((blast[s].x > waterpool[h].x)) && ((blast[s].x < (waterpool[h].x + waterpool[h].xwidth))))) && ((blast[s].y > waterpool[h].y)))) && ((blast[s].y < (waterpool[h].y + waterpool[h].depth))))){ waterexplosion(blast[s].x, waterpool[h].y, waterpool[h].watercolor); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < hitzones) { if (hitzone[h].active == false){ s = 0; while (s < bullets) { if (bullet[s].active == true){ tempnormal = (directiontopoint(bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2) + 90); if (approxdistance(bullet[s].x1, bullet[s].y1, hitzone[h].x, hitzone[h].y) <= hitzone[h].radius){ hitzone[h].active = true; }; if (approxdistance(bullet[s].x2, bullet[s].y2, hitzone[h].x, hitzone[h].y) <= hitzone[h].radius){ hitzone[h].active = true; }; if (linecollide((hitzone[h].x + vectorx2(tempnormal, hitzone[h].radius)), (hitzone[h].y + vectory2(tempnormal, hitzone[h].radius)), (hitzone[h].x - vectorx2(tempnormal, hitzone[h].radius)), (hitzone[h].y - vectory2(tempnormal, hitzone[h].radius)), bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2, directiontopoint(bullet[s].x1, bullet[s].y1, bullet[s].x2, bullet[s].y2)) == true){ hitzone[h].active = true; }; }; s = (s + 1); }; s = 0; while (s < nails) { if ((((nail[s].active == true)) && (!((nail[s].side == turretside))))){ tempnormal = (directiontopoint(nail[s].lx, nail[s].ly, nail[s].x, nail[s].y) + 90); if (linecollide((hitzone[h].x + vectorx2(tempnormal, hitzone[h].radius)), (hitzone[h].y + vectory2(tempnormal, hitzone[h].radius)), (hitzone[h].x - vectorx2(tempnormal, hitzone[h].radius)), (hitzone[h].y - vectory2(tempnormal, hitzone[h].radius)), nail[s].x, nail[s].y, nail[s].lx, nail[s].ly, directiontopoint(nail[s].x, nail[s].y, nail[s].lx, nail[s].ly)) == true){ hitzone[h].active = true; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < hitzones) { if (hitzone[h].active == false){ s = 0; while (s < blasts) { if (blast[s].active == true){ tempdistance = approxdistance(blast[s].x, blast[s].y, hitzone[h].x, hitzone[h].y); if (tempdistance <= (hitzone[h].radius + blast[s].radius)){ hitzone[h].active = true; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < bullets) { bullet[h].active = false; h = (h + 1); }; h = 0; while (h < blasts) { if (blast[h].active == true){ physicsexplosion(blast[h].x, blast[h].y, blast[h].radius, blast[h].push); blast[h].active = false; }; h = (h + 1); }; foundplayer = false; currentnode = 0; mzmovespeed = 0; mzmovey = 0; h = 0; while (h < enemyAs) { if (enemyA[h].active == true){ deltahs = 0; deltavs = 0; maxmovespeed = enemyAmaxmovespeed; if (enemyA[h].onfire == true){ maxmovespeed = 5; if (Math.floor((Math.random() * 2)) == 0){ zombiefire(enemyA[h].x, (enemyA[h].y + (Math.random() * ragdollheight))); }; }; movefactor = enemyAaircontrolfactor; d = 0; while (d < waterpools) { if ((((((((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x > waterpool[d].x)) && ((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x < (waterpool[d].x + waterpool[d].xwidth))))) && ((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y > waterpool[d].y)))) && ((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y < (waterpool[d].y + waterpool[d].depth))))){ movefactor = enemyAwatercontrolfactor; }; d = (d + 1); }; groundoffset = 0; if (segmentcollide(p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x, p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y, p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x, (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y + 2)) == true){ movefactor = 1; groundoffset = (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y - bestcy); }; if (player[0].active == true){ if ((((approxdistance(enemyA[h].x, enemyA[h].y, player[0].x, player[0].y) < enemyAseedistance)) && ((approxdistance(enemyA[h].x, enemyA[h].y, player[0].x, player[0].y) > 0)))){ foundplayer = true; enemyA[h].hastarget = true; enemyA[h].patrolling = false; enemyA[h].targetx = player[0].x; enemyA[h].targety = player[0].y; } else { foundplayer = false; }; } else { foundplayer = false; enemyA[h].hastarget = false; }; bodyB[enemyA[h].bodynum].frame = 0; if (foundplayer == true){ bodyB[enemyA[h].bodynum].frame = 2; }; if (enemyA[h].hastarget == true){ if (player[0].active == false){ enemyA[h].hastarget = false; enemyA[h].patrolling = false; }; if (enemyA[h].x > enemyA[h].targetx){ if ((((enemyA[h].movedelay == 0)) || ((enemyA[h].movedirection == 1)))){ deltahs = (deltahs - (enemyAmoveacceleration * movefactor)); enemyA[h].movedelay = (enemyAmovedelay + Math.round(((Math.random() * enemyAmovedelay) * 0.5))); enemyA[h].movedirection = 1; }; } else { if ((((enemyA[h].movedelay == 0)) || ((enemyA[h].movedirection == 0)))){ deltahs = (deltahs + (enemyAmoveacceleration * movefactor)); enemyA[h].movedelay = (enemyAmovedelay + Math.round(((Math.random() * enemyAmovedelay) * 0.5))); enemyA[h].movedirection = 0; }; }; if (enemyA[h].movedelay > 0){ enemyA[h].movedelay = (enemyA[h].movedelay - 1); }; if (enemyA[h].movedelay == 0){ if (foundplayer == false){ enemyA[h].hastarget = false; }; }; if (approxdistance(enemyA[h].x, enemyA[h].y, enemyA[h].targetx, enemyA[h].targety) < (enemyAshootdistance * 1.5)){ if (Math.abs((enemyA[h].x - enemyA[h].targetx)) < (enemyAshootdistance * 0.71)){ if ((((((enemyA[h].x > enemyA[h].targetx)) && ((enemyA[h].movedirection == 1)))) || ((((enemyA[h].x < enemyA[h].targetx)) && ((enemyA[h].movedirection == 0)))))){ if (enemyA[h].shootdelay == 0){ bodyB[enemyA[h].bodynum].frame = 3; enemyA[h].framedelay = (enemyAshootdelay * 0.5); enemyA[h].shootdelay = enemyAshootdelay; createbullet(enemyA[h].x, (enemyA[h].y + 12), (((enemyA[h].movedirection * 180) + (Math.random() * enemyAinaccuracy)) - (enemyAinaccuracy * 0.5)), enemyAshootdistance, enemyAdamage, enemyside, 0xFFFFFF, 0, false); }; }; }; }; if (enemyA[h].shootdelay > 0){ enemyA[h].shootdelay = (enemyA[h].shootdelay - 1); }; } else { if (enemyA[h].patrolling == true){ if (enemyA[h].movedirection == 0){ deltahs = (deltahs + (enemyAmoveacceleration * movefactor)); } else { deltahs = (deltahs - (enemyAmoveacceleration * movefactor)); }; }; }; deltahs2 = 0; if (enemyA[h].slow > 0){ if (deltahs > 0){ deltahs2 = -(enemyA[h].slow); }; if (deltahs < 0){ deltahs2 = enemyA[h].slow; }; enemyA[h].slow = 0; }; if (enemyA[h].framedelay > 0){ bodyB[enemyA[h].bodynum].frame = 3; enemyA[h].framedelay = (enemyA[h].framedelay - 1); }; temporaryhs = (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].lx); if (Math.abs(((temporaryhs + deltahs) + deltahs2)) < maxmovespeed){ p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x = ((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x + deltahs) + deltahs2); p[objectline[enemyA[h].objectlinenum].firstpnum].x = ((p[objectline[enemyA[h].objectlinenum].firstpnum].x + deltahs) + deltahs2); } else { if (Math.abs(temporaryhs) < maxmovespeed){ if (temporaryhs > 0){ p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].lx + maxmovespeed); p[objectline[enemyA[h].objectlinenum].firstpnum].x = (p[objectline[enemyA[h].objectlinenum].firstpnum].lx + maxmovespeed); } else { p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].lx - maxmovespeed); p[objectline[enemyA[h].objectlinenum].firstpnum].x = (p[objectline[enemyA[h].objectlinenum].firstpnum].lx - maxmovespeed); }; }; }; p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y = (p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].y + deltavs); p[objectline[enemyA[h].objectlinenum].firstpnum].y = (p[objectline[enemyA[h].objectlinenum].firstpnum].y + deltavs); temporaryhs = Math.abs((p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyA[h].objectlinenum].firstpnum + 1)].lx)); if (deltahs > 0){ enemyA[h].movedirection = 0; }; if (deltahs < 0){ enemyA[h].movedirection = 1; }; legB[enemyA[h].firstlegnum].framerate = 1; if (deltahs == 0){ if (enemyA[h].movedirection == 0){ if (legB[enemyA[h].firstlegnum].frame == 4){ legB[enemyA[h].firstlegnum].framerate = 0; }; } else { if (legB[enemyA[h].firstlegnum].frame == 14){ legB[enemyA[h].firstlegnum].framerate = 0; }; }; } else { if (foundplayer == false){ bodyB[enemyA[h].bodynum].frame = 1; }; }; if (movefactor == enemyAaircontrolfactor){ legB[enemyA[h].firstlegnum].framerate = 0; }; if (enemyA[h].movedirection == 0){ bodyB[enemyA[h].bodynum].scaleX = 1; legB[enemyA[h].firstlegnum].scaleX = 1; legB[(enemyA[h].firstlegnum + 1)].scaleX = 1; } else { bodyB[enemyA[h].bodynum].scaleX = -1; legB[enemyA[h].firstlegnum].scaleX = -1; legB[(enemyA[h].firstlegnum + 1)].scaleX = -1; }; legB[(enemyA[h].firstlegnum + 1)].frame = (legB[enemyA[h].firstlegnum].frame + 11); enemyA[h].y = (p[objectline[enemyA[h].objectlinenum].firstpnum].y - groundoffset); enemyA[h].x = p[objectline[enemyA[h].objectlinenum].firstpnum].x; legsoffset = ((ragdollheight * 2) - (upperleglength + lowerleglength)); legB[enemyA[h].firstlegnum].x = (enemyA[h].x - (chestlength * 0.5)); legB[enemyA[h].firstlegnum].y = (enemyA[h].y + legsoffset); legB[(enemyA[h].firstlegnum + 1)].x = (enemyA[h].x + (chestlength * 0.5)); legB[(enemyA[h].firstlegnum + 1)].y = (enemyA[h].y + legsoffset); bodyB[enemyA[h].bodynum].y = (enemyA[h].y + legsoffset); bodyB[enemyA[h].bodynum].x = enemyA[h].x; } else { objectline[enemyA[h].objectlinenum].active = false; legB[enemyA[h].firstlegnum].active = false; legB[(enemyA[h].firstlegnum + 1)].active = false; bodyB[enemyA[h].bodynum].active = false; }; h = (h + 1); }; h = 0; while (h < enemyBs) { if (enemyB[h].active == true){ deltahs = 0; deltavs = 0; if (enemyB[h].kamikaze == false){ maxmovespeed = enemyBmaxmovespeed; } else { maxmovespeed = (enemyBmaxmovespeed + 1); }; movefactor = enemyBaircontrolfactor; d = 0; while (d < waterpools) { if ((((((((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x > waterpool[d].x)) && ((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x < (waterpool[d].x + waterpool[d].xwidth))))) && ((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y > waterpool[d].y)))) && ((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y < (waterpool[d].y + waterpool[d].depth))))){ movefactor = enemyBwatercontrolfactor; }; d = (d + 1); }; groundoffset = 0; if (segmentcollide(p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x, p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y, p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x, (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y + 2)) == true){ movefactor = 1; groundoffset = (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y - bestcy); }; if (player[0].active == true){ if ((((approxdistance(enemyB[h].x, enemyB[h].y, player[0].x, player[0].y) < enemyBseedistance)) && ((approxdistance(enemyB[h].x, enemyB[h].y, player[0].x, player[0].y) > 0)))){ foundplayer = true; enemyB[h].hastarget = true; enemyB[h].patrolling = false; enemyB[h].targetx = player[0].x; enemyB[h].targety = player[0].y; } else { foundplayer = false; }; } else { foundplayer = false; enemyB[h].hastarget = false; enemyB[h].patrolling = false; }; bodyC[enemyB[h].bodynum].frame = 0; if (foundplayer == true){ bodyC[enemyB[h].bodynum].frame = 2; }; if (enemyB[h].hastarget == true){ if (player[0].active == false){ enemyB[h].hastarget = false; }; if (enemyB[h].x > enemyB[h].targetx){ if ((((enemyB[h].movedelay == 0)) || ((enemyB[h].movedirection == 1)))){ deltahs = (deltahs - (enemyBmoveacceleration * movefactor)); enemyB[h].movedelay = (enemyBmovedelay + Math.round(((Math.random() * enemyBmovedelay) * 0.5))); enemyB[h].movedirection = 1; }; } else { if ((((enemyB[h].movedelay == 0)) || ((enemyB[h].movedirection == 0)))){ deltahs = (deltahs + (enemyBmoveacceleration * movefactor)); enemyB[h].movedelay = (enemyBmovedelay + Math.round(((Math.random() * enemyBmovedelay) * 0.5))); enemyB[h].movedirection = 0; }; }; if (enemyB[h].movedelay > 0){ enemyB[h].movedelay = (enemyB[h].movedelay - 1); }; if (enemyB[h].movedelay == 0){ if (foundplayer == false){ enemyB[h].hastarget = false; }; }; if (enemyB[h].kamikaze == true){ grenadesmoke(((enemyB[h].x + (Math.random() * 12)) - 6), (enemyB[h].y + (Math.random() * 16))); }; if (approxdistance(enemyB[h].x, enemyB[h].y, enemyB[h].targetx, enemyB[h].targety) < (enemyBshootdistance * 1.5)){ if (Math.abs((enemyB[h].x - enemyB[h].targetx)) < (enemyBshootdistance * 0.71)){ if ((((((enemyB[h].x > enemyB[h].targetx)) && ((enemyB[h].movedirection == 1)))) || ((((enemyB[h].x < enemyB[h].targetx)) && ((enemyB[h].movedirection == 0)))))){ if (enemyB[h].kamikaze == false){ if (enemyB[h].shootdelay == 0){ bodyC[enemyB[h].bodynum].frame = 3; enemyB[h].framedelay = (enemyBshootdelay * 0.5); enemyB[h].shootdelay = enemyBshootdelay; createbullet(enemyB[h].x, (enemyB[h].y + 12), (((enemyB[h].movedirection * 180) + (Math.random() * enemyBinaccuracy)) - (enemyBinaccuracy * 0.5)), enemyBshootdistance, enemyBdamage, enemyside, 0xFFFFFF, 0, false); }; } else { createblast(enemyB[h].x, (enemyB[h].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[h].x, (enemyB[h].y + 8)); }; }; }; }; if (enemyB[h].shootdelay > 0){ enemyB[h].shootdelay = (enemyB[h].shootdelay - 1); }; } else { if (enemyB[h].patrolling == true){ if (enemyB[h].movedirection == 0){ deltahs = (deltahs + (enemyBmoveacceleration * movefactor)); } else { deltahs = (deltahs - (enemyBmoveacceleration * movefactor)); }; }; }; deltahs2 = 0; if (enemyB[h].slow > 0){ if (deltahs > 0){ deltahs2 = -(enemyB[h].slow); }; if (deltahs < 0){ deltahs2 = enemyB[h].slow; }; enemyB[h].slow = 0; }; if (enemyB[h].framedelay > 0){ bodyC[enemyB[h].bodynum].frame = 3; enemyB[h].framedelay = (enemyB[h].framedelay - 1); }; temporaryhs = (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].lx); if (Math.abs(((temporaryhs + deltahs) + deltahs2)) < maxmovespeed){ p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x = ((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x + deltahs) + deltahs2); p[objectline[enemyB[h].objectlinenum].firstpnum].x = ((p[objectline[enemyB[h].objectlinenum].firstpnum].x + deltahs) + deltahs2); } else { if (Math.abs(temporaryhs) < maxmovespeed){ if (temporaryhs > 0){ p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].lx + maxmovespeed); p[objectline[enemyB[h].objectlinenum].firstpnum].x = (p[objectline[enemyB[h].objectlinenum].firstpnum].lx + maxmovespeed); } else { p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].lx - maxmovespeed); p[objectline[enemyB[h].objectlinenum].firstpnum].x = (p[objectline[enemyB[h].objectlinenum].firstpnum].lx - maxmovespeed); }; }; }; p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y = (p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].y + deltavs); p[objectline[enemyB[h].objectlinenum].firstpnum].y = (p[objectline[enemyB[h].objectlinenum].firstpnum].y + deltavs); temporaryhs = Math.abs((p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyB[h].objectlinenum].firstpnum + 1)].lx)); if (deltahs > 0){ enemyB[h].movedirection = 0; }; if (deltahs < 0){ enemyB[h].movedirection = 1; }; legC[enemyB[h].firstlegnum].framerate = 1; if (deltahs == 0){ if (enemyB[h].movedirection == 0){ if (legC[enemyB[h].firstlegnum].frame == 4){ legC[enemyB[h].firstlegnum].framerate = 0; }; } else { if (legC[enemyB[h].firstlegnum].frame == 14){ legC[enemyB[h].firstlegnum].framerate = 0; }; }; } else { if (foundplayer == false){ bodyC[enemyB[h].bodynum].frame = 1; }; }; if (movefactor == enemyBaircontrolfactor){ legC[enemyB[h].firstlegnum].framerate = 0; }; if (enemyB[h].kamikaze == true){ bodyC[enemyB[h].bodynum].frame = 4; }; if (enemyB[h].movedirection == 0){ bodyC[enemyB[h].bodynum].scaleX = 1; legC[enemyB[h].firstlegnum].scaleX = 1; legC[(enemyB[h].firstlegnum + 1)].scaleX = 1; } else { bodyC[enemyB[h].bodynum].scaleX = -1; legC[enemyB[h].firstlegnum].scaleX = -1; legC[(enemyB[h].firstlegnum + 1)].scaleX = -1; }; legC[(enemyB[h].firstlegnum + 1)].frame = (legC[enemyB[h].firstlegnum].frame + 11); enemyB[h].y = (p[objectline[enemyB[h].objectlinenum].firstpnum].y - groundoffset); enemyB[h].x = p[objectline[enemyB[h].objectlinenum].firstpnum].x; legsoffset = ((ragdollheight * 2) - (upperleglength + lowerleglength)); legC[enemyB[h].firstlegnum].x = (enemyB[h].x - (chestlength * 0.5)); legC[enemyB[h].firstlegnum].y = (enemyB[h].y + legsoffset); legC[(enemyB[h].firstlegnum + 1)].x = (enemyB[h].x + (chestlength * 0.5)); legC[(enemyB[h].firstlegnum + 1)].y = (enemyB[h].y + legsoffset); bodyC[enemyB[h].bodynum].y = (enemyB[h].y + legsoffset); bodyC[enemyB[h].bodynum].x = enemyB[h].x; } else { objectline[enemyB[h].objectlinenum].active = false; legC[enemyB[h].firstlegnum].active = false; legC[(enemyB[h].firstlegnum + 1)].active = false; bodyC[enemyB[h].bodynum].active = false; }; h = (h + 1); }; h = 0; while (h < enemyCs) { if (enemyC[h].active == true){ deltahs = 0; deltavs = 0; maxmovespeed = enemyCmaxmovespeed; movefactor = enemyCaircontrolfactor; d = 0; while (d < waterpools) { if ((((((((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x > waterpool[d].x)) && ((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x < (waterpool[d].x + waterpool[d].xwidth))))) && ((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y > waterpool[d].y)))) && ((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y < (waterpool[d].y + waterpool[d].depth))))){ movefactor = enemyCwatercontrolfactor; }; d = (d + 1); }; groundoffset = 0; if (segmentcollide(p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x, p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y, p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x, (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y + 2)) == true){ movefactor = 1; groundoffset = (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y - bestcy); }; if (player[0].active == true){ if ((((approxdistance(enemyC[h].x, enemyC[h].y, player[0].x, player[0].y) < enemyCseedistance)) && ((approxdistance(enemyC[h].x, enemyC[h].y, player[0].x, player[0].y) > 0)))){ foundplayer = true; enemyC[h].hastarget = true; enemyC[h].patrolling = false; enemyC[h].targetx = player[0].x; enemyC[h].targety = player[0].y; } else { foundplayer = false; }; } else { foundplayer = false; enemyC[h].hastarget = false; enemyC[h].patrolling = false; }; bodyD[enemyC[h].bodynum].frame = 0; if (foundplayer == true){ bodyD[enemyC[h].bodynum].frame = 2; }; if (enemyC[h].hastarget == true){ if (player[0].active == false){ enemyC[h].hastarget = false; }; if (enemyC[h].x > enemyC[h].targetx){ if ((((enemyC[h].movedelay == 0)) || ((enemyC[h].movedirection == 1)))){ deltahs = (deltahs - (enemyCmoveacceleration * movefactor)); enemyC[h].movedelay = (enemyCmovedelay + Math.round(((Math.random() * enemyCmovedelay) * 0.5))); enemyC[h].movedirection = 1; }; } else { if ((((enemyC[h].movedelay == 0)) || ((enemyC[h].movedirection == 0)))){ deltahs = (deltahs + (enemyCmoveacceleration * movefactor)); enemyC[h].movedelay = (enemyCmovedelay + Math.round(((Math.random() * enemyCmovedelay) * 0.5))); enemyC[h].movedirection = 0; }; }; if (enemyC[h].movedelay > 0){ enemyC[h].movedelay = (enemyC[h].movedelay - 1); }; if (enemyC[h].movedelay == 0){ if (foundplayer == false){ enemyC[h].hastarget = false; }; }; if (approxdistance(enemyC[h].x, enemyC[h].y, enemyC[h].targetx, enemyC[h].targety) < (enemyCshootdistance * 1.5)){ if (Math.abs((enemyC[h].x - enemyC[h].targetx)) < (enemyCshootdistance * 0.71)){ if ((((((enemyC[h].x > enemyC[h].targetx)) && ((enemyC[h].movedirection == 1)))) || ((((enemyC[h].x < enemyC[h].targetx)) && ((enemyC[h].movedirection == 0)))))){ if (enemyC[h].shootdelay == 0){ bodyD[enemyC[h].bodynum].frame = 3; enemyC[h].framedelay = (enemyCshootdelay * 0.5); enemyC[h].shootdelay = enemyCshootdelay; createbullet(enemyC[h].x, (enemyC[h].y + 12), (((enemyC[h].movedirection * 180) + (Math.random() * enemyCinaccuracy)) - (enemyCinaccuracy * 0.5)), enemyCshootdistance, enemyCdamage, enemyside, 0xFFFFFF, 0, false); }; }; }; }; if (enemyC[h].shootdelay > 0){ enemyC[h].shootdelay = (enemyC[h].shootdelay - 1); }; } else { if (enemyC[h].patrolling == true){ if (enemyC[h].movedirection == 0){ deltahs = (deltahs + (enemyCmoveacceleration * movefactor)); } else { deltahs = (deltahs - (enemyCmoveacceleration * movefactor)); }; }; }; deltahs2 = 0; if (enemyC[h].slow > 0){ if (deltahs > 0){ deltahs2 = -(enemyC[h].slow); }; if (deltahs < 0){ deltahs2 = enemyC[h].slow; }; enemyC[h].slow = 0; }; if (enemyC[h].framedelay > 0){ bodyD[enemyC[h].bodynum].frame = 3; enemyC[h].framedelay = (enemyC[h].framedelay - 1); }; temporaryhs = (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].lx); if (Math.abs(((temporaryhs + deltahs) + deltahs2)) < maxmovespeed){ p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x = ((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x + deltahs) + deltahs2); p[objectline[enemyC[h].objectlinenum].firstpnum].x = ((p[objectline[enemyC[h].objectlinenum].firstpnum].x + deltahs) + deltahs2); } else { if (Math.abs(temporaryhs) < maxmovespeed){ if (temporaryhs > 0){ p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].lx + maxmovespeed); p[objectline[enemyC[h].objectlinenum].firstpnum].x = (p[objectline[enemyC[h].objectlinenum].firstpnum].lx + maxmovespeed); } else { p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x = (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].lx - maxmovespeed); p[objectline[enemyC[h].objectlinenum].firstpnum].x = (p[objectline[enemyC[h].objectlinenum].firstpnum].lx - maxmovespeed); }; }; }; p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y = (p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].y + deltavs); p[objectline[enemyC[h].objectlinenum].firstpnum].y = (p[objectline[enemyC[h].objectlinenum].firstpnum].y + deltavs); temporaryhs = Math.abs((p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].x - p[(objectline[enemyC[h].objectlinenum].firstpnum + 1)].lx)); if (deltahs > 0){ enemyC[h].movedirection = 0; }; if (deltahs < 0){ enemyC[h].movedirection = 1; }; legD[enemyC[h].firstlegnum].framerate = 1; if (deltahs == 0){ if (enemyC[h].movedirection == 0){ if (legD[enemyC[h].firstlegnum].frame == 4){ legD[enemyC[h].firstlegnum].framerate = 0; }; } else { if (legD[enemyC[h].firstlegnum].frame == 14){ legD[enemyC[h].firstlegnum].framerate = 0; }; }; } else { if (foundplayer == false){ bodyD[enemyC[h].bodynum].frame = 1; }; }; if (movefactor == enemyCaircontrolfactor){ legD[enemyC[h].firstlegnum].framerate = 0; }; if (enemyC[h].movedirection == 0){ bodyD[enemyC[h].bodynum].scaleX = 1; legD[enemyC[h].firstlegnum].scaleX = 1; legD[(enemyC[h].firstlegnum + 1)].scaleX = 1; } else { bodyD[enemyC[h].bodynum].scaleX = -1; legD[enemyC[h].firstlegnum].scaleX = -1; legD[(enemyC[h].firstlegnum + 1)].scaleX = -1; }; legD[(enemyC[h].firstlegnum + 1)].frame = (legD[enemyC[h].firstlegnum].frame + 11); enemyC[h].y = (p[objectline[enemyC[h].objectlinenum].firstpnum].y - groundoffset); enemyC[h].x = p[objectline[enemyC[h].objectlinenum].firstpnum].x; legsoffset = ((ragdollheight * 2) - (upperleglength + lowerleglength)); legD[enemyC[h].firstlegnum].x = (enemyC[h].x - (chestlength * 0.5)); legD[enemyC[h].firstlegnum].y = (enemyC[h].y + legsoffset); legD[(enemyC[h].firstlegnum + 1)].x = (enemyC[h].x + (chestlength * 0.5)); legD[(enemyC[h].firstlegnum + 1)].y = (enemyC[h].y + legsoffset); bodyD[enemyC[h].bodynum].y = (enemyC[h].y + legsoffset); bodyD[enemyC[h].bodynum].x = enemyC[h].x; } else { objectline[enemyC[h].objectlinenum].active = false; legD[enemyC[h].firstlegnum].active = false; legD[(enemyC[h].firstlegnum + 1)].active = false; bodyD[enemyC[h].bodynum].active = false; }; h = (h + 1); }; h = 0; while (h < turretbases) { if (turretbase[h].active == true){ if (approxdistance(turretbase[h].x, turretbase[h].y, player[0].x, (player[0].y + ragdollheight)) < turretseedistance){ if ((((segmentcollide(turretbase[h].x, turretbase[h].y, player[0].x, (player[0].y + ragdollheight)) == false)) && ((player[0].active == true)))){ turretbase[h].targetdirection = directiontopoint(turretbase[h].x, turretbase[h].y, player[0].x, (player[0].y + ragdollheight)); if (Math.abs(finddirection(turretbase[h].targetdirection, turretbase[h].restdirection)) < turretmaxswivel){ turretbase[h].hastarget = true; } else { turretbase[h].hastarget = false; turretbase[h].targetdirection = turretbase[h].restdirection; }; } else { turretbase[h].targetdirection = turretbase[h].restdirection; turretbase[h].hastarget = false; }; } else { turretbase[h].targetdirection = turretbase[h].restdirection; turretbase[h].hastarget = false; }; if (turretbase[h].pointdirection != turretbase[h].targetdirection){ if (Math.abs(finddirection(turretbase[h].pointdirection, turretbase[h].targetdirection)) <= turretrotatespeed){ turretbase[h].pointdirection = turretbase[h].targetdirection; } else { if (finddirection(turretbase[h].pointdirection, turretbase[h].targetdirection) > 0){ turretbase[h].pointdirection = (turretbase[h].pointdirection - turretrotatespeed); } else { turretbase[h].pointdirection = (turretbase[h].pointdirection + turretrotatespeed); }; }; }; if (turretbase[h].hastarget == true){ turretbase[h].gotoAndPlay(1); if (turretbase[h].pointdirection == turretbase[h].targetdirection){ if (turretbase[h].shootdelay == 0){ turretmuzzleflash((turretbase[h].x + vectorx(turretbase[h].pointdirection, (turretbarreldistance + turretflashdistance))), (turretbase[h].y + vectory(turretbase[h].pointdirection, (turretbarreldistance + turretflashdistance))), turretbase[h].pointdirection); if (createbullet((turretbase[h].x + vectorx(turretbase[h].pointdirection, turretbarreldistance)), (turretbase[h].y + vectory(turretbase[h].pointdirection, turretbarreldistance)), ((turretbase[h].pointdirection + (Math.random() * turretinaccuracy)) - (turretinaccuracy * 0.5)), turretshootdistance, turretdamage, turretside, turrettracercolor, turrettraceralpha, false) == true){ turretimpact(impactx, impacty); }; turretbase[h].shootdelay = turretshootdelay; } else { turretbase[h].shootdelay = (turretbase[h].shootdelay - 1); }; }; } else { turretbase[h].gotoAndPlay(2); }; turretbarrel[turretbase[h].barrelnum].rotation = -(turretbase[h].pointdirection); } else { if (turretbase[h].parent != null){ turretbase[h].parent.removeChild(turretbase[h]); }; if (turretbarrel[turretbase[h].barrelnum].parent != null){ turretbarrel[turretbase[h].barrelnum].parent.removeChild(turretbarrel[turretbase[h].barrelnum]); }; }; h = (h + 1); }; h = 0; while (h < megazombies) { if (megazombie[h].active == true){ megazombiegun[h].x = (megazombie[h].x + 20); megazombiegun[h].y = (megazombie[h].y + 10); if (megazombie[h].cx < 100){ megazombie[h].cx = 100; }; if (megazombie[h].cx > 500){ megazombie[h].cx = 500; }; if (player[0].active == true){ if (megazombie[h].woundtimer <= 0){ if (Math.abs((megazombie[h].cx - player[0].x)) > 0.5){ if (megazombie[h].cx < player[0].x){ megazombie[h].cx = (megazombie[h].cx + 0.5); } else { megazombie[h].cx = (megazombie[h].cx - 0.5); }; } else { megazombie[h].cx = player[0].x; }; }; if ((((megazombie[h].woundtimer <= 0)) && ((megazombie[h].recovertimer <= 0)))){ if (Math.abs((megazombie[h].cy - (player[0].y - 60))) > 0.5){ if ((megazombie[h].cy - (player[0].y - 60)) < 0){ megazombie[h].cy = (megazombie[h].cy + 0.5); } else { megazombie[h].cy = (megazombie[h].cy - 0.5); }; } else { megazombie[h].cy = (player[0].y - 60); }; }; if (megazombie[h].woundtimer > 0){ if (Math.abs((megazombie[h].cy - (player[0].y - 30))) > 1){ if ((megazombie[h].cy - (player[0].y - 30)) < 0){ megazombie[h].cy = (megazombie[h].cy + 1); } else { megazombie[h].cy = (megazombie[h].cy - 1); }; } else { megazombie[h].cy = (player[0].y - 30); }; }; if ((((megazombie[h].woundtimer <= 0)) && ((megazombie[h].recovertimer > 0)))){ if (Math.abs((megazombie[h].cy - (player[0].y - 90))) > 1.5){ if ((megazombie[h].cy - (player[0].y - 90)) < 0){ megazombie[h].cy = (megazombie[h].cy + 1.5); } else { megazombie[h].cy = (megazombie[h].cy - 1.5); }; } else { megazombie[h].cy = (player[0].y - 90); }; }; }; megazombie[h].x = megazombie[h].cx; megazombie[h].y = megazombie[h].cy; if (megazombie[h].sounddelay > 0){ megazombie[h].sounddelay = (megazombie[h].sounddelay - 1); }; if ((((megazombie[h].woundtimer <= 0)) && ((megazombie[h].recovertimer <= 0)))){ if ((((((Math.abs(((megazombie[h].x + megazombie[h].movex) - player[0].x)) < 25)) && ((Math.abs(((megazombie[h].y + megazombie[h].movey) - player[0].y)) < 125)))) && ((player[0].active == true)))){ if (megazombie[h].sounddelay <= 0){ megazombieexhaust.play(); megazombie[h].sounddelay = 90; }; if (Math.floor((Math.random() * 2)) == 0){ megazombiefireexhaustparticles((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 63)); }; player[0].damage = (player[0].damage + megazombiedamage); if (((megazombie[h].x + megazombie[h].movex) - player[0].x) > 0){ physicspush((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 85), 25, 225, 0.5); } else { physicspush((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 85), 25, 315, 0.5); }; } else { if (Math.floor((Math.random() * 2)) == 0){ megazombieexhaustparticles((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 63)); }; }; } else { if (megazombie[h].woundtimer <= 0){ if (Math.floor((Math.random() * 2)) == 0){ megazombiefireexhaustparticles((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 63)); }; } else { if (Math.floor((Math.random() * 4)) == 0){ megazombieexhaustparticles((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 63)); }; }; }; if (approxdistance(megazombie[h].movex, megazombie[h].movey, megazombie[h].movetargetx, megazombie[h].movetargety) > 0.5){ megazombie[h].movex = (megazombie[h].movex + vectorx2(megazombie[h].movedirection, 0.5)); megazombie[h].movey = (megazombie[h].movey + vectory2(megazombie[h].movedirection, 0.5)); megazombie[h].stucktimer = (megazombie[h].stucktimer + 1); } else { megazombie[h].movetargetx = ((Math.random() * 30) - 15); megazombie[h].movetargety = ((Math.random() * 30) - 15); megazombie[h].stucktimer = 0; }; if (megazombie[h].stucktimer >= 80){ megazombie[h].movetargetx = ((Math.random() * 30) - 15); megazombie[h].movetargety = ((Math.random() * 30) - 15); megazombie[h].stucktimer = 0; }; temptargetdirection = directiontopoint(megazombie[h].movex, megazombie[h].movey, megazombie[h].movetargetx, megazombie[h].movetargety); if (finddirection(megazombie[h].movedirection, temptargetdirection) > 0){ if (Math.abs((megazombie[h].movedirection - temptargetdirection)) > 6){ megazombie[h].movedirection = (megazombie[h].movedirection - 6); } else { megazombie[h].movedirection = temptargetdirection; }; } else { if (Math.abs((megazombie[h].movedirection - temptargetdirection)) > 6){ megazombie[h].movedirection = (megazombie[h].movedirection + 6); } else { megazombie[h].movedirection = temptargetdirection; }; }; if ((((megazombie[h].woundtimer <= 0)) && ((megazombie[h].recovertimer <= 0)))){ megazombie[h].hastarget = true; if (approxdistance(megazombie[h].x, megazombie[h].y, player[0].x, (player[0].y + ragdollheight)) < megazombieseedistance){ if ((((segmentcollide(megazombie[h].x, megazombie[h].y, player[0].x, (player[0].y + ragdollheight)) == false)) && ((player[0].active == true)))){ megazombie[h].targetdirection = directiontopoint(megazombie[h].x, megazombie[h].y, player[0].x, (player[0].y + ragdollheight)); } else { megazombie[h].targetdirection = megazombie[h].restdirection; megazombie[h].hastarget = false; }; } else { megazombie[h].targetdirection = megazombie[h].restdirection; megazombie[h].hastarget = false; }; if (megazombie[h].pointdirection != megazombie[h].targetdirection){ if (Math.abs(finddirection(megazombie[h].pointdirection, megazombie[h].targetdirection)) <= megazombierotatespeed){ megazombie[h].pointdirection = megazombie[h].targetdirection; } else { if (finddirection(megazombie[h].pointdirection, megazombie[h].targetdirection) > 0){ megazombie[h].pointdirection = (megazombie[h].pointdirection - megazombierotatespeed); } else { megazombie[h].pointdirection = (megazombie[h].pointdirection + megazombierotatespeed); }; }; }; if (megazombie[h].hastarget == true){ if (megazombie[h].pointdirection == megazombie[h].targetdirection){ if (megazombie[h].shootdelay == 0){ megazombie[h].shots = (megazombie[h].shots + 1); createlaser((megazombiegun[h].x + vectorx(megazombie[h].pointdirection, megazombiegundistance)), (megazombiegun[h].y + vectory(megazombie[h].pointdirection, megazombiegundistance)), ((megazombie[h].pointdirection + (Math.random() * megazombieinaccuracy)) - (megazombieinaccuracy * 0.5)), enemyside); lasermuzzleflash((megazombiegun[h].x + vectorx(megazombie[h].pointdirection, (megazombiegundistance + megazombieflashdistance))), (megazombiegun[h].y + vectory(megazombie[h].pointdirection, (megazombiegundistance + megazombieflashdistance))), megazombie[h].pointdirection); megazombie[h].shootdelay = megazombieshootdelay; } else { megazombie[h].shootdelay = (megazombie[h].shootdelay - 1); }; }; }; }; if (megazombie[h].recovertimer > 0){ megazombie[h].recovertimer = (megazombie[h].recovertimer - 1); }; if (megazombie[h].woundtimer > 0){ megazombie[h].woundtimer = (megazombie[h].woundtimer - 1); megazombie[h].gotoAndPlay(2); if (Math.floor((Math.random() * 5)) == 0){ blooddrip((megazombie[h].x + megazombie[h].movex), ((megazombie[h].y + megazombie[h].movey) + 10)); }; } else { megazombie[h].gotoAndPlay(1); }; if (megazombie[h].shots >= megazombiemaxshots){ megazombie[h].shots = 0; megazombie[h].shootdelay = 50; }; megazombiegun[megazombie[h].barrelnum].rotation = -(megazombie[h].pointdirection); megazombie[h].x = (megazombie[h].x + megazombie[h].movex); megazombie[h].y = (megazombie[h].y + megazombie[h].movey); } else { loopchannel2.stop(); if (megazombie[h].parent != null){ megazombie[h].parent.removeChild(megazombie[h]); }; if (megazombiegun[megazombie[h].barrelnum].parent != null){ megazombiegun[megazombie[h].barrelnum].parent.removeChild(megazombiegun[megazombie[h].barrelnum]); }; }; h = (h + 1); }; currenths = 0; currentvs = 0; lasths = 0; lastvs = 0; h = 0; while (h < chaindebriss) { if (chaindebris[h].active == true){ chaindebris[h].livetime = (chaindebris[h].livetime + 1); if (chaindebris[h].livetime > (chaindebrislivetime - chaindebrisfadetime)){ chaindebris[h].alpha = ((chaindebrislivetime - chaindebris[h].livetime) / chaindebrisfadetime); }; if (chaindebris[h].livetime > chaindebrislivetime){ chaindebris[h].active = false; }; d = 0; while (d < (rope[chaindebris[h].ropenum].segments - 1)) { tempx1 = p[(rope[chaindebris[h].ropenum].firstpnum + d)].x; tempy1 = p[(rope[chaindebris[h].ropenum].firstpnum + d)].y; tempx2 = p[((rope[chaindebris[h].ropenum].firstpnum + d) + 1)].x; tempy2 = p[((rope[chaindebris[h].ropenum].firstpnum + d) + 1)].y; if (chaindebris[h].frame == 4){ if (Math.floor((Math.random() * 50)) == 0){ blooddrip(((tempx1 + tempx2) * 0.5), ((tempy1 + tempy2) * 0.5)); }; }; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); link[(chaindebris[h].linknum + d)].x = ((tempx1 + tempx2) * 0.5); link[(chaindebris[h].linknum + d)].y = ((tempy1 + tempy2) * 0.5); link[(chaindebris[h].linknum + d)].rotation = (270 - temprotation); link[(chaindebris[h].linknum + d)].alpha = chaindebris[h].alpha; d = (d + 1); }; } else { d = 0; while (d < (rope[chaindebris[h].ropenum].segments - 1)) { link[(chaindebris[h].linknum + d)].active = false; if (link[(chaindebris[h].linknum + d)].parent != null){ link[(chaindebris[h].linknum + d)].parent.removeChild(link[(chaindebris[h].linknum + d)]); }; d = (d + 1); }; chaindebris[h].active = false; rope[chaindebris[h].ropenum].active = false; }; h = (h + 1); }; h = 0; while (h < strings) { if (string[h].active == true){ vstring[h].visible = true; string[h].x = rope[string[h].ropenum].x; string[h].y = rope[string[h].ropenum].y; _local3 = vstring[h].graphics; with (_local3) { vstring[h].x = rope[string[h].ropenum].x; vstring[h].y = rope[string[h].ropenum].y; clear(); lineStyle(1, string[h].color, string[h].alpha); moveTo((p[rope[string[h].ropenum].firstpnum].x - string[h].x), (p[rope[string[h].ropenum].firstpnum].y - string[h].y)); d = rope[string[h].ropenum].firstpnum; while (d < ((rope[string[h].ropenum].firstpnum + rope[string[h].ropenum].segments) - 1)) { lineTo((p[(d + 1)].x - string[h].x), (p[(d + 1)].y - string[h].y)); d = (d + 1); }; }; } else { if (vstring[h].parent != null){ vstring[h].parent.removeChild(vstring[h]); }; string[h].active = false; rope[string[h].ropenum].active = false; }; h = (h + 1); }; h = 0; while (h < pointdebriss) { if (pointdebris[h].active == true){ pointdebris[h].gotoAndPlay((pointdebris[h].frame + 1)); pointdebris[h].livetime = (pointdebris[h].livetime + 1); if (pointdebris[h].livetime > (pointdebrislivetime - pointdebrisfadetime)){ pointdebris[h].alpha = ((pointdebrislivetime - pointdebris[h].livetime) / pointdebrisfadetime); }; if (pointdebris[h].livetime > pointdebrislivetime){ pointdebris[h].active = false; point[pointdebris[h].pointnum].active = false; if (pointdebris[h].parent != null){ pointdebris[h].parent.removeChild(pointdebris[h]); }; }; pointdebris[h].x = p[point[pointdebris[h].pointnum].firstpnum].x; pointdebris[h].y = p[point[pointdebris[h].pointnum].firstpnum].y; if (point[pointdebris[h].pointnum].atrest == false){ pointdebris[h].rotation = (pointdebris[h].rotation + pointdebris[h].rotatespeed); if ((((pointdebris[h].frame >= 3)) && ((pointdebris[h].frame <= 8)))){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(pointdebris[h].x, pointdebris[h].y); }; }; if (pointdebris[h].frame == 9){ if (Math.floor((Math.random() * 8)) == 0){ debrisspark(pointdebris[h].x, pointdebris[h].y); }; }; }; }; h = (h + 1); }; h = 0; while (h < linedebriss) { if (linedebris[h].active == true){ linedebris[h].gotoAndPlay((linedebris[h].frame + 1)); linedebris[h].livetime = (linedebris[h].livetime + 1); if (linedebris[h].livetime > (linedebrislivetime - linedebrisfadetime)){ linedebris[h].alpha = ((linedebrislivetime - linedebris[h].livetime) / linedebrisfadetime); }; if (linedebris[h].livetime > linedebrislivetime){ linedebris[h].active = false; line[linedebris[h].linenum].active = false; if (linedebris[h].parent != null){ linedebris[h].parent.removeChild(linedebris[h]); }; }; tempx1 = p[line[linedebris[h].linenum].firstpnum].x; tempy1 = p[line[linedebris[h].linenum].firstpnum].y; tempx2 = p[(line[linedebris[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[linedebris[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); linedebris[h].x = ((tempx1 + tempx2) * 0.5); linedebris[h].y = ((tempy1 + tempy2) * 0.5); linedebris[h].rotation = -(temprotation); }; h = (h + 1); }; h = 0; while (h < boxdebriss) { if (boxdebris[h].active == true){ boxdebris[h].gotoAndPlay((boxdebris[h].frame + 1)); boxdebris[h].livetime = (boxdebris[h].livetime + 1); if (boxdebris[h].livetime > (boxdebrislivetime - boxdebrisfadetime)){ boxdebris[h].alpha = ((boxdebrislivetime - boxdebris[h].livetime) / boxdebrisfadetime); }; if (boxdebris[h].livetime > boxdebrislivetime){ boxdebris[h].active = false; box[boxdebris[h].boxnum].active = false; if (boxdebris[h].parent != null){ boxdebris[h].parent.removeChild(boxdebris[h]); }; }; tempx1 = p[box[boxdebris[h].boxnum].firstpnum].x; tempy1 = p[box[boxdebris[h].boxnum].firstpnum].y; tempx2 = p[(box[boxdebris[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[boxdebris[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); boxdebris[h].x = ((tempx1 + tempx2) * 0.5); boxdebris[h].y = ((tempy1 + tempy2) * 0.5); boxdebris[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < corpses) { if (corpse[h].active == true){ if (corpse[h].fade == true){ corpse[h].livetime = (corpse[h].livetime + 1); if (corpse[h].livetime > (corpselivetime - corpsefadetime)){ corpse[h].alpha = ((corpselivetime - corpse[h].livetime) / corpsefadetime); }; if (corpse[h].livetime > corpselivetime){ corpse[h].active = false; }; }; lasths = (corpse[h].x - corpse[h].lastx); lastvs = (corpse[h].y - corpse[h].lasty); corpse[h].lasty = corpse[h].y; corpse[h].lastx = corpse[h].x; corpse[h].y = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 1)].y; corpse[h].x = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 1)].x; currenths = (corpse[h].x - corpse[h].lastx); currentvs = (corpse[h].y - corpse[h].lasty); if (corpse[h].bloodtimer > 0){ corpse[h].bloodtimer = (corpse[h].bloodtimer - 1); } else { if (corpse[h].livetime > 5){ if (approxdistance(0, 0, (currenths - lasths), (currentvs - lastvs)) > 3){ corpse[h].bloodtimer = 20; squish.play(); tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); bloodspray((((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)), (((tempy1 + tempy2) * 0.5) + vectory(correctdirection((temprotation + 90)), 2)), 2); }; }; }; if (ragdoll[corpse[h].ragdollnum].deformed == true){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); bloodspray((((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)), (((tempy1 + tempy2) * 0.5) + vectory(correctdirection((temprotation + 90)), 2)), maxbloodps); createchaindebris((((((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)) + Math.random()) - 0.5), (((((tempy1 + tempy2) * 0.5) + vectory(correctdirection((temprotation + 90)), 2)) + Math.random()) - 0.5), 4); d = 0; while (d < corpsegibs) { createpointdebris((((((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)) + Math.random()) - 0.5), (((((tempy1 + tempy2) * 0.5) + vectory(correctdirection((temprotation + 90)), 2)) + Math.random()) - 0.5), (3 + Math.floor((Math.random() * 6)))); d = (d + 1); }; physicsexplosion((((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)), (((tempy1 + tempy2) * 0.5) + vectory((correctdirection((temprotation + 90)) + 0.5), 2)), 2, 4); corpse[h].active = false; }; tempx1 = p[ragdoll[corpse[h].ragdollnum].firstpnum].x; tempy1 = p[ragdoll[corpse[h].ragdollnum].firstpnum].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 1)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); head[corpse[h].headnum].x = ((tempx1 + tempx2) * 0.5); head[corpse[h].headnum].y = ((tempy1 + tempy2) * 0.5); head[corpse[h].headnum].rotation = (270 - temprotation); head[corpse[h].headnum].alpha = corpse[h].alpha; tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); torso[corpse[h].torsonum].x = (((tempx1 + tempx2) * 0.5) + vectorx(correctdirection((temprotation + 90)), 2)); torso[corpse[h].torsonum].y = (((tempy1 + tempy2) * 0.5) + vectory(correctdirection((temprotation + 90)), 2)); torso[corpse[h].torsonum].rotation = (180 - temprotation); torso[corpse[h].torsonum].alpha = corpse[h].alpha; if (corpse[h].leftarmsegments > 0){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperarm[corpse[h].firstupperarmnum].x = ((tempx1 + tempx2) * 0.5); upperarm[corpse[h].firstupperarmnum].y = ((tempy1 + tempy2) * 0.5); upperarm[corpse[h].firstupperarmnum].rotation = (270 - temprotation); upperarm[corpse[h].firstupperarmnum].alpha = corpse[h].alpha; } else { upperarm[corpse[h].firstupperarmnum].active = false; }; if (corpse[h].rightarmsegments > 0){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperarm[(corpse[h].firstupperarmnum + 1)].x = ((tempx1 + tempx2) * 0.5); upperarm[(corpse[h].firstupperarmnum + 1)].y = ((tempy1 + tempy2) * 0.5); upperarm[(corpse[h].firstupperarmnum + 1)].rotation = (270 - temprotation); upperarm[(corpse[h].firstupperarmnum + 1)].alpha = corpse[h].alpha; } else { upperarm[(corpse[h].firstupperarmnum + 1)].active = false; }; if (corpse[h].leftarmsegments > 1){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 13)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 13)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerarm[corpse[h].firstlowerarmnum].x = ((tempx1 + tempx2) * 0.5); lowerarm[corpse[h].firstlowerarmnum].y = ((tempy1 + tempy2) * 0.5); lowerarm[corpse[h].firstlowerarmnum].rotation = (270 - temprotation); lowerarm[corpse[h].firstlowerarmnum].alpha = corpse[h].alpha; } else { lowerarm[corpse[h].firstlowerarmnum].active = false; }; if (corpse[h].rightarmsegments > 1){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 12)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 12)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerarm[(corpse[h].firstlowerarmnum + 1)].x = ((tempx1 + tempx2) * 0.5); lowerarm[(corpse[h].firstlowerarmnum + 1)].y = ((tempy1 + tempy2) * 0.5); lowerarm[(corpse[h].firstlowerarmnum + 1)].rotation = (270 - temprotation); lowerarm[(corpse[h].firstlowerarmnum + 1)].alpha = corpse[h].alpha; } else { lowerarm[(corpse[h].firstlowerarmnum + 1)].active = false; }; if (corpse[h].leftlegsegments > 0){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 5)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 5)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperleg[corpse[h].firstupperlegnum].x = ((tempx1 + tempx2) * 0.5); upperleg[corpse[h].firstupperlegnum].y = ((tempy1 + tempy2) * 0.5); upperleg[corpse[h].firstupperlegnum].rotation = (270 - temprotation); upperleg[corpse[h].firstupperlegnum].alpha = corpse[h].alpha; } else { upperleg[corpse[h].firstupperlegnum].active = false; }; if (corpse[h].rightlegsegments > 0){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 4)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 4)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperleg[(corpse[h].firstupperlegnum + 1)].x = ((tempx1 + tempx2) * 0.5); upperleg[(corpse[h].firstupperlegnum + 1)].y = ((tempy1 + tempy2) * 0.5); upperleg[(corpse[h].firstupperlegnum + 1)].rotation = (270 - temprotation); upperleg[(corpse[h].firstupperlegnum + 1)].alpha = corpse[h].alpha; } else { upperleg[(corpse[h].firstupperlegnum + 1)].active = false; }; if (corpse[h].leftlegsegments > 1){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 9)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 9)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerleg[corpse[h].firstlowerlegnum].x = ((tempx1 + tempx2) * 0.5); lowerleg[corpse[h].firstlowerlegnum].y = ((tempy1 + tempy2) * 0.5); lowerleg[corpse[h].firstlowerlegnum].rotation = (270 - temprotation); lowerleg[corpse[h].firstlowerlegnum].alpha = corpse[h].alpha; } else { lowerleg[corpse[h].firstlowerlegnum].active = false; }; if (corpse[h].rightlegsegments > 1){ tempx1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].x; tempy1 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].y; tempx2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 8)].x; tempy2 = p[(ragdoll[corpse[h].ragdollnum].firstpnum + 8)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerleg[(corpse[h].firstlowerlegnum + 1)].x = ((tempx1 + tempx2) * 0.5); lowerleg[(corpse[h].firstlowerlegnum + 1)].y = ((tempy1 + tempy2) * 0.5); lowerleg[(corpse[h].firstlowerlegnum + 1)].rotation = (270 - temprotation); lowerleg[(corpse[h].firstlowerlegnum + 1)].alpha = corpse[h].alpha; } else { lowerleg[(corpse[h].firstlowerlegnum + 1)].active = false; }; if (corpse[h].leftarmsegments == 1){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 11)].y); }; }; if (corpse[h].leftarmsegments == 0){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 3)].y); }; }; if (corpse[h].rightarmsegments == 1){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 10)].y); }; }; if (corpse[h].rightarmsegments == 0){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 2)].y); }; }; if (corpse[h].leftlegsegments == 1){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 7)].y); }; }; if (corpse[h].leftlegsegments == 0){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 5)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 5)].y); }; }; if (corpse[h].rightlegsegments == 1){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 6)].y); }; }; if (corpse[h].rightlegsegments == 0){ if (Math.floor((Math.random() * 12)) == 0){ blooddrip(p[(ragdoll[corpse[h].ragdollnum].firstpnum + 4)].x, p[(ragdoll[corpse[h].ragdollnum].firstpnum + 4)].y); }; }; } else { ragdoll[corpse[h].ragdollnum].active = false; head[corpse[h].headnum].active = false; torso[corpse[h].torsonum].active = false; upperarm[corpse[h].firstupperarmnum].active = false; upperarm[(corpse[h].firstupperarmnum + 1)].active = false; lowerarm[corpse[h].firstlowerarmnum].active = false; lowerarm[(corpse[h].firstlowerarmnum + 1)].active = false; upperleg[corpse[h].firstupperlegnum].active = false; upperleg[(corpse[h].firstupperlegnum + 1)].active = false; lowerleg[corpse[h].firstlowerlegnum].active = false; lowerleg[(corpse[h].firstlowerlegnum + 1)].active = false; }; h = (h + 1); }; h = 0; while (h < limbs) { if (limb[h].active == true){ limb[h].livetime = (limb[h].livetime + 1); if (limb[h].livetime > (limblivetime - limbfadetime)){ limb[h].alpha = ((limblivetime - limb[h].livetime) / limbfadetime); }; if (limb[h].livetime > limblivetime){ limb[h].active = false; if (limb[h].segments == 1){ line[limb[h].linenum].active = false; }; if (limb[h].segments == 2){ hinge[limb[h].hingenum].active = false; }; if (limb[h].type == 0){ if (limb[h].segments == 1){ lowerarm[limb[h].firstlowerarmnum].active = false; }; if (limb[h].segments == 2){ lowerarm[limb[h].firstlowerarmnum].active = false; upperarm[limb[h].firstupperarmnum].active = false; }; }; if (limb[h].type == 1){ if (limb[h].segments == 1){ lowerleg[limb[h].firstlowerlegnum].active = false; }; if (limb[h].segments == 2){ lowerleg[limb[h].firstlowerlegnum].active = false; upperleg[limb[h].firstupperlegnum].active = false; }; }; }; if (limb[h].type == 0){ if (limb[h].segments == 1){ tempx1 = p[line[limb[h].linenum].firstpnum].x; tempy1 = p[line[limb[h].linenum].firstpnum].y; tempx2 = p[(line[limb[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[limb[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerarm[limb[h].firstlowerarmnum].x = ((tempx1 + tempx2) * 0.5); lowerarm[limb[h].firstlowerarmnum].y = ((tempy1 + tempy2) * 0.5); lowerarm[limb[h].firstlowerarmnum].rotation = (270 - temprotation); lowerarm[limb[h].firstlowerarmnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ lowerarm[limb[h].firstlowerarmnum].scaleX = -1; }; }; if (limb[h].segments == 2){ tempx1 = p[hinge[limb[h].hingenum].firstpnum].x; tempy1 = p[hinge[limb[h].hingenum].firstpnum].y; tempx2 = p[(hinge[limb[h].hingenum].firstpnum + 1)].x; tempy2 = p[(hinge[limb[h].hingenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperarm[limb[h].firstupperarmnum].x = ((tempx1 + tempx2) * 0.5); upperarm[limb[h].firstupperarmnum].y = ((tempy1 + tempy2) * 0.5); upperarm[limb[h].firstupperarmnum].rotation = (270 - temprotation); upperarm[limb[h].firstupperarmnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ upperarm[limb[h].firstupperarmnum].scaleX = -1; }; tempx1 = p[(hinge[limb[h].hingenum].firstpnum + 1)].x; tempy1 = p[(hinge[limb[h].hingenum].firstpnum + 1)].y; tempx2 = p[(hinge[limb[h].hingenum].firstpnum + 2)].x; tempy2 = p[(hinge[limb[h].hingenum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerarm[limb[h].firstlowerarmnum].x = ((tempx1 + tempx2) * 0.5); lowerarm[limb[h].firstlowerarmnum].y = ((tempy1 + tempy2) * 0.5); lowerarm[limb[h].firstlowerarmnum].rotation = (270 - temprotation); lowerarm[limb[h].firstlowerarmnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ lowerarm[limb[h].firstlowerarmnum].scaleX = -1; }; }; }; if (limb[h].type == 1){ if (limb[h].segments == 1){ tempx1 = p[line[limb[h].linenum].firstpnum].x; tempy1 = p[line[limb[h].linenum].firstpnum].y; tempx2 = p[(line[limb[h].linenum].firstpnum + 1)].x; tempy2 = p[(line[limb[h].linenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerleg[limb[h].firstlowerlegnum].x = ((tempx1 + tempx2) * 0.5); lowerleg[limb[h].firstlowerlegnum].y = ((tempy1 + tempy2) * 0.5); lowerleg[limb[h].firstlowerlegnum].rotation = (270 - temprotation); lowerleg[limb[h].firstlowerlegnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ lowerleg[limb[h].firstlowerlegnum].scaleX = -1; }; }; if (limb[h].segments == 2){ tempx1 = p[hinge[limb[h].hingenum].firstpnum].x; tempy1 = p[hinge[limb[h].hingenum].firstpnum].y; tempx2 = p[(hinge[limb[h].hingenum].firstpnum + 1)].x; tempy2 = p[(hinge[limb[h].hingenum].firstpnum + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); upperleg[limb[h].firstupperlegnum].x = ((tempx1 + tempx2) * 0.5); upperleg[limb[h].firstupperlegnum].y = ((tempy1 + tempy2) * 0.5); upperleg[limb[h].firstupperlegnum].rotation = (270 - temprotation); upperleg[limb[h].firstupperlegnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ upperleg[limb[h].firstupperlegnum].scaleX = -1; }; tempx1 = p[(hinge[limb[h].hingenum].firstpnum + 1)].x; tempy1 = p[(hinge[limb[h].hingenum].firstpnum + 1)].y; tempx2 = p[(hinge[limb[h].hingenum].firstpnum + 2)].x; tempy2 = p[(hinge[limb[h].hingenum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); lowerleg[limb[h].firstlowerlegnum].x = ((tempx1 + tempx2) * 0.5); lowerleg[limb[h].firstlowerlegnum].y = ((tempy1 + tempy2) * 0.5); lowerleg[limb[h].firstlowerlegnum].rotation = (270 - temprotation); lowerleg[limb[h].firstlowerlegnum].alpha = limb[h].alpha; if (limb[h].facedirection == 1){ lowerleg[limb[h].firstlowerlegnum].scaleX = -1; }; }; }; }; h = (h + 1); }; h = 0; while (h < bulletcasings) { if (bulletcasing[h].active == true){ bulletcasing[h].gotoAndPlay((bulletcasing[h].frame + 1)); bulletcasing[h].livetime = (bulletcasing[h].livetime + 1); if (bulletcasing[h].livetime > (bulletcasinglivetime - bulletcasingfadetime)){ bulletcasing[h].alpha = ((bulletcasinglivetime - bulletcasing[h].livetime) / bulletcasingfadetime); }; if (bulletcasing[h].livetime > bulletcasinglivetime){ bulletcasing[h].active = false; point[bulletcasing[h].pointnum].active = false; if (bulletcasing[h].parent != null){ bulletcasing[h].parent.removeChild(bulletcasing[h]); }; }; bulletcasing[h].x = p[point[bulletcasing[h].pointnum].firstpnum].x; bulletcasing[h].y = p[point[bulletcasing[h].pointnum].firstpnum].y; if (bulletcasing[h].playedsounds < 3){ if (point[bulletcasing[h].pointnum].bouncetype == 1){ randsound = Math.floor((Math.random() * 5)); if (randsound == 0){ shell1.play(); }; if (randsound == 1){ shell2.play(); }; if (randsound == 2){ shell3.play(); }; if (randsound == 3){ shell4.play(); }; if (randsound == 4){ shell5.play(); }; bulletcasing[h].playedsounds = (bulletcasing[h].playedsounds + 1); }; }; if (point[bulletcasing[h].pointnum].atrest == false){ bulletcasing[h].rotation = (bulletcasing[h].rotation + bulletcasing[h].rotatespeed); }; }; h = (h + 1); }; h = 0; while (h < chains) { if (chain[h].active == true){ d = 0; while (d < (rope[chain[h].ropenum].segments - 1)) { tempx1 = p[(rope[chain[h].ropenum].firstpnum + d)].x; tempy1 = p[(rope[chain[h].ropenum].firstpnum + d)].y; tempx2 = p[((rope[chain[h].ropenum].firstpnum + d) + 1)].x; tempy2 = p[((rope[chain[h].ropenum].firstpnum + d) + 1)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); link[(chain[h].linknum + d)].x = ((tempx1 + tempx2) * 0.5); link[(chain[h].linknum + d)].y = ((tempy1 + tempy2) * 0.5); link[(chain[h].linknum + d)].rotation = (270 - temprotation); d = (d + 1); }; } else { d = 0; while (d < (rope[chain[h].ropenum].segments - 1)) { link[(chain[h].linknum + d)].active = false; if (link[(chain[h].linknum + d)].parent != null){ link[(chain[h].linknum + d)].parent.removeChild(link[(chain[h].linknum + d)]); }; d = (d + 1); }; chain[h].active = false; rope[chain[h].ropenum].active = false; }; h = (h + 1); }; h = 0; while (h < links) { if (link[h].active == true){ link[h].gotoAndPlay((link[h].frame + 1)); }; h = (h + 1); }; temprotation = 0; h = 0; while (h < healths) { if (health[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((health[h].x > (player[o].x - chestlength))) && ((health[h].x < (player[o].x + chestlength))))) && ((health[h].y > (player[o].y - 1))))) && ((health[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].damage > 0){ healthpickup.play(); health[h].active = false; box[health[h].boxnum].active = false; health[h].visible = false; player[o].damage = (player[o].damage - healthamount); pickuptext = "You picked up health!"; pickuptextdelay = messageduration; }; }; }; o = (o + 1); }; health[h].livetime = (health[h].livetime + 1); if (health[h].fade == true){ if (health[h].livetime > (pickuplivetime - pickupfadetime)){ health[h].alpha = ((pickuplivetime - health[h].livetime) / pickupfadetime); }; if (health[h].livetime > pickuplivetime){ box[health[h].boxnum].active = false; if (health[h].parent != null){ health[h].parent.removeChild(health[h]); }; health[h].active = false; }; }; tempx1 = p[box[health[h].boxnum].firstpnum].x; tempy1 = p[box[health[h].boxnum].firstpnum].y; tempx2 = p[(box[health[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[health[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); health[h].x = ((tempx1 + tempx2) * 0.5); health[h].y = ((tempy1 + tempy2) * 0.5); health[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < grenadeammos) { if (grenadeammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((grenadeammo[h].x > (player[o].x - chestlength))) && ((grenadeammo[h].x < (player[o].x + chestlength))))) && ((grenadeammo[h].y > (player[o].y - 1))))) && ((grenadeammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].grenadeammo < maxgrenadeammo){ ammopickup.play(); grenadeammo[h].active = false; box[grenadeammo[h].boxnum].active = false; grenadeammo[h].visible = false; if (player[o].grenadeammo == 0){ player[o].weapon = grenadenum; }; player[o].grenadeammo = (player[o].grenadeammo + grenadeammoamount); }; }; }; o = (o + 1); }; grenadeammo[h].livetime = (grenadeammo[h].livetime + 1); if (grenadeammo[h].fade == true){ if (grenadeammo[h].livetime > (pickuplivetime - pickupfadetime)){ grenadeammo[h].alpha = ((pickuplivetime - grenadeammo[h].livetime) / pickupfadetime); }; if (grenadeammo[h].livetime > pickuplivetime){ box[grenadeammo[h].boxnum].active = false; if (grenadeammo[h].parent != null){ grenadeammo[h].parent.removeChild(grenadeammo[h]); }; grenadeammo[h].active = false; }; }; tempx1 = p[box[grenadeammo[h].boxnum].firstpnum].x; tempy1 = p[box[grenadeammo[h].boxnum].firstpnum].y; tempx2 = p[(box[grenadeammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[grenadeammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); grenadeammo[h].x = ((tempx1 + tempx2) * 0.5); grenadeammo[h].y = ((tempy1 + tempy2) * 0.5); grenadeammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < rifleammos) { if (rifleammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((rifleammo[h].x > (player[o].x - chestlength))) && ((rifleammo[h].x < (player[o].x + chestlength))))) && ((rifleammo[h].y > (player[o].y - 1))))) && ((rifleammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].rifleammo < maxrifleammo){ ammopickup.play(); rifleammo[h].active = false; box[rifleammo[h].boxnum].active = false; rifleammo[h].visible = false; pickuptext = "You picked up rifle (3) ammo!"; pickuptextdelay = messageduration; player[o].rifleammo = (player[o].rifleammo + rifleammoamount); }; }; }; o = (o + 1); }; rifleammo[h].livetime = (rifleammo[h].livetime + 1); if (rifleammo[h].fade == true){ if (rifleammo[h].livetime > (pickuplivetime - pickupfadetime)){ rifleammo[h].alpha = ((pickuplivetime - rifleammo[h].livetime) / pickupfadetime); }; if (rifleammo[h].livetime > pickuplivetime){ box[rifleammo[h].boxnum].active = false; if (grenadeammo[h].parent != null){ grenadeammo[h].parent.removeChild(grenadeammo[h]); }; rifleammo[h].active = false; }; }; tempx1 = p[box[rifleammo[h].boxnum].firstpnum].x; tempy1 = p[box[rifleammo[h].boxnum].firstpnum].y; tempx2 = p[(box[rifleammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[rifleammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); rifleammo[h].x = ((tempx1 + tempx2) * 0.5); rifleammo[h].y = ((tempy1 + tempy2) * 0.5); rifleammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < smgammos) { if (smgammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((smgammo[h].x > (player[o].x - chestlength))) && ((smgammo[h].x < (player[o].x + chestlength))))) && ((smgammo[h].y > (player[o].y - 1))))) && ((smgammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].smgammo < maxsmgammo){ ammopickup.play(); smgammo[h].active = false; box[smgammo[h].boxnum].active = false; smgammo[h].visible = false; pickuptext = "You picked up smg (4) ammunition!"; pickuptextdelay = messageduration; player[o].smgammo = (player[o].smgammo + smgammoamount); }; }; }; o = (o + 1); }; smgammo[h].livetime = (smgammo[h].livetime + 1); if (smgammo[h].fade == true){ if (smgammo[h].livetime > (pickuplivetime - pickupfadetime)){ smgammo[h].alpha = ((pickuplivetime - smgammo[h].livetime) / pickupfadetime); }; if (smgammo[h].livetime > pickuplivetime){ box[smgammo[h].boxnum].active = false; if (smgammo[h].parent != null){ smgammo[h].parent.removeChild(smgammo[h]); }; smgammo[h].active = false; }; }; tempx1 = p[box[smgammo[h].boxnum].firstpnum].x; tempy1 = p[box[smgammo[h].boxnum].firstpnum].y; tempx2 = p[(box[smgammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[smgammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); smgammo[h].x = ((tempx1 + tempx2) * 0.5); smgammo[h].y = ((tempy1 + tempy2) * 0.5); smgammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < shotgunammos) { if (shotgunammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((shotgunammo[h].x > (player[o].x - chestlength))) && ((shotgunammo[h].x < (player[o].x + chestlength))))) && ((shotgunammo[h].y > (player[o].y - 1))))) && ((shotgunammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].shotgunammo < maxshotgunammo){ ammopickup.play(); shotgunammo[h].active = false; box[shotgunammo[h].boxnum].active = false; shotgunammo[h].visible = false; pickuptext = "You picked up shotgun (5) shells!"; pickuptextdelay = messageduration; player[o].shotgunammo = (player[o].shotgunammo + shotgunammoamount); }; }; }; o = (o + 1); }; shotgunammo[h].livetime = (shotgunammo[h].livetime + 1); if (shotgunammo[h].fade == true){ if (shotgunammo[h].livetime > (pickuplivetime - pickupfadetime)){ shotgunammo[h].alpha = ((pickuplivetime - shotgunammo[h].livetime) / pickupfadetime); }; if (shotgunammo[h].livetime > pickuplivetime){ box[shotgunammo[h].boxnum].active = false; if (shotgunammo[h].parent != null){ shotgunammo[h].parent.removeChild(shotgunammo[h]); }; shotgunammo[h].active = false; }; }; tempx1 = p[box[shotgunammo[h].boxnum].firstpnum].x; tempy1 = p[box[shotgunammo[h].boxnum].firstpnum].y; tempx2 = p[(box[shotgunammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[shotgunammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); shotgunammo[h].x = ((tempx1 + tempx2) * 0.5); shotgunammo[h].y = ((tempy1 + tempy2) * 0.5); shotgunammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < pistolammos) { if (pistolammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((pistolammo[h].x > (player[o].x - chestlength))) && ((pistolammo[h].x < (player[o].x + chestlength))))) && ((pistolammo[h].y > (player[o].y - 1))))) && ((pistolammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].pistolammo < maxpistolammo){ ammopickup.play(); pistolammo[h].active = false; box[pistolammo[h].boxnum].active = false; pistolammo[h].visible = false; pickuptext = "You picked up pistol (2) rounds!"; pickuptextdelay = messageduration; player[o].pistolammo = (player[o].pistolammo + pistolammoamount); }; }; }; o = (o + 1); }; pistolammo[h].livetime = (pistolammo[h].livetime + 1); if (pistolammo[h].fade == true){ if (pistolammo[h].livetime > (pickuplivetime - pickupfadetime)){ pistolammo[h].alpha = ((pickuplivetime - pistolammo[h].livetime) / pickupfadetime); }; if (pistolammo[h].livetime > pickuplivetime){ box[pistolammo[h].boxnum].active = false; if (pistolammo[h].parent != null){ pistolammo[h].parent.removeChild(pistolammo[h]); }; pistolammo[h].active = false; }; }; tempx1 = p[box[pistolammo[h].boxnum].firstpnum].x; tempy1 = p[box[pistolammo[h].boxnum].firstpnum].y; tempx2 = p[(box[pistolammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[pistolammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); pistolammo[h].x = ((tempx1 + tempx2) * 0.5); pistolammo[h].y = ((tempy1 + tempy2) * 0.5); pistolammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; h = 0; while (h < nailgunammos) { if (nailgunammo[h].active == true){ o = 0; while (o < players) { if (player[o].active == true){ if ((((((((nailgunammo[h].x > (player[o].x - chestlength))) && ((nailgunammo[h].x < (player[o].x + chestlength))))) && ((nailgunammo[h].y > (player[o].y - 1))))) && ((nailgunammo[h].y < ((player[o].y + (ragdollheight * 2)) + 1))))){ if (player[o].nailgunammo < maxnailgunammo){ ammopickup.play(); nailgunammo[h].active = false; box[nailgunammo[h].boxnum].active = false; nailgunammo[h].visible = false; pickuptext = "You picked up nailgun (4) ammunition!"; pickuptextdelay = messageduration; player[o].nailgunammo = (player[o].nailgunammo + nailgunammoamount); }; }; }; o = (o + 1); }; nailgunammo[h].livetime = (nailgunammo[h].livetime + 1); if (nailgunammo[h].fade == true){ if (nailgunammo[h].livetime > (pickuplivetime - pickupfadetime)){ nailgunammo[h].alpha = ((pickuplivetime - nailgunammo[h].livetime) / pickupfadetime); }; if (nailgunammo[h].livetime > pickuplivetime){ box[nailgunammo[h].boxnum].active = false; if (nailgunammo[h].parent != null){ nailgunammo[h].parent.removeChild(nailgunammo[h]); }; nailgunammo[h].active = false; }; }; tempx1 = p[box[nailgunammo[h].boxnum].firstpnum].x; tempy1 = p[box[nailgunammo[h].boxnum].firstpnum].y; tempx2 = p[(box[nailgunammo[h].boxnum].firstpnum + 2)].x; tempy2 = p[(box[nailgunammo[h].boxnum].firstpnum + 2)].y; temprotation = directiontopoint(tempx1, tempy1, tempx2, tempy2); nailgunammo[h].x = ((tempx1 + tempx2) * 0.5); nailgunammo[h].y = ((tempy1 + tempy2) * 0.5); nailgunammo[h].rotation = (315 - temprotation); }; h = (h + 1); }; if (debugmode == true){ h = 0; while (h < nodes) { if (node[h].active == true){ drawline((node[h].x - noderadius), (node[h].y - noderadius), (node[h].x + noderadius), (node[h].y + noderadius), 0, 1); }; h = (h + 1); }; }; h = 0; while (h < damagezones) { if (damagezone[h].active == true){ if (debugmode == true){ drawline(damagezone[h].x1, damagezone[h].y1, damagezone[h].x2, damagezone[h].y2, 0, 1); }; s = 0; while (s < players) { if (player[s].active == true){ if (rectcollide(damagezone[h].x1, damagezone[h].y1, damagezone[h].x2, damagezone[h].y2, (player[s].x - 1), player[s].y, (player[s].x + 1), (player[s].y + (ragdollheight * 2))) == true){ player[s].damage = (player[s].damage + damagezone[h].damage); if (player[s].damage >= playerhealth){ if (player[s].weapon == pistolnum){ createpistol((player[s].bodyx + vectorx(player[s].gundirection, pistolholddistance)), (player[s].bodyy + vectory(player[s].gundirection, pistolholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == chainsawnum){ createchainsaw((player[s].bodyx + vectorx(player[s].gundirection, chainsawholddistance)), (player[s].bodyy + vectory(player[s].gundirection, chainsawholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == riflenum){ createrifle((player[s].bodyx + vectorx(player[s].gundirection, rifleholddistance)), (player[s].bodyy + vectory(player[s].gundirection, rifleholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == smgnum){ createsmg((player[s].bodyx + vectorx(player[s].gundirection, smgholddistance)), (player[s].bodyy + vectory(player[s].gundirection, smgholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == shotgunnum){ createshotgun((player[s].bodyx + vectorx(player[s].gundirection, shotgunholddistance)), (player[s].bodyy + vectory(player[s].gundirection, shotgunholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == nailgunnum){ createnailgun((player[s].bodyx + vectorx(player[s].gundirection, nailgunholddistance)), (player[s].bodyy + vectory(player[s].gundirection, nailgunholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == rpgnum){ createrpg((player[s].bodyx + vectorx(player[s].gundirection, rpgholddistance)), (player[s].bodyy + vectory(player[s].gundirection, rpgholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum, true); }; createcorpse(player[s].x, player[s].y, true, objectline[player[s].objectlinenum].firstpnum, 0, 2, 2, 2, 2); player[s].active = false; }; }; }; s = (s + 1); }; s = 0; while (s < enemyAs) { if (enemyA[s].active == true){ if (rectcollide(damagezone[h].x1, damagezone[h].y1, damagezone[h].x2, damagezone[h].y2, (enemyA[s].x - 1), enemyA[s].y, (enemyA[s].x + 1), (enemyA[s].y + (ragdollheight * 2))) == true){ enemyA[s].damage = (enemyA[s].damage + damagezone[h].damage); if (enemyA[s].damage >= enemyAhealth){ enemyA[s].active = false; createcorpse(enemyA[s].x, enemyA[s].y, true, objectline[enemyA[s].objectlinenum].firstpnum, 1, 2, 2, 2, 2); zombiedie.play(); }; }; }; s = (s + 1); }; s = 0; while (s < enemyBs) { if (enemyB[s].active == true){ if (rectcollide(damagezone[h].x1, damagezone[h].y1, damagezone[h].x2, damagezone[h].y2, (enemyB[s].x - 1), enemyB[s].y, (enemyB[s].x + 1), (enemyB[s].y + (ragdollheight * 2))) == true){ enemyB[s].damage = (enemyB[s].damage + damagezone[h].damage); if (enemyB[s].damage >= enemyBhealth){ enemyB[s].active = false; if (enemyB[s].kamikaze == false){ createpointdebris(enemyB[s].x, (enemyB[s].y + 8), 11); createcorpse(enemyB[s].x, enemyB[s].y, true, objectline[enemyB[s].objectlinenum].firstpnum, 2, 2, 2, 2, 2); zombiedie.play(); } else { createblast(enemyB[s].x, (enemyB[s].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[s].x, (enemyB[s].y + 8)); }; }; }; }; s = (s + 1); }; s = 0; while (s < enemyCs) { if (enemyC[s].active == true){ if (rectcollide(damagezone[h].x1, damagezone[h].y1, damagezone[h].x2, damagezone[h].y2, (enemyC[s].x - 1), enemyC[s].y, (enemyC[s].x + 1), (enemyC[s].y + (ragdollheight * 2))) == true){ enemyC[s].damage = (enemyC[s].damage + damagezone[h].damage); if (enemyC[s].damage >= enemyChealth){ createpointdebris(enemyC[s].x, (enemyC[s].y + 8), 10); enemyC[s].active = false; createcorpse(enemyC[s].x, enemyC[s].y, true, objectline[enemyC[s].objectlinenum].firstpnum, 3, 2, 2, 2, 2); zombiedie.play(); }; }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < winzones) { if (winzone[h].active == true){ if (debugmode == true){ drawline(winzone[h].x1, winzone[h].y1, winzone[h].x2, winzone[h].y2, 0, 100); }; s = 0; while (s < players) { if (player[s].active == true){ if (rectcollide(winzone[h].x1, winzone[h].y1, winzone[h].x2, winzone[h].y2, (player[s].x - 1), player[s].y, (player[s].x + 1), (player[s].y + (ragdollheight * 2))) == true){ loadmap((mapnumber + 1)); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < killzones) { if (killzone[h].active == true){ if (debugmode == true){ drawline(killzone[h].x1, killzone[h].y1, killzone[h].x2, killzone[h].y2, 0, 100); }; s = 0; while (s < players) { if (player[s].active == true){ if (rectcollide(killzone[h].x1, killzone[h].y1, killzone[h].x2, killzone[h].y2, (player[s].x - 1), player[s].y, (player[s].x + 1), (player[s].y + (ragdollheight * 2))) == true){ player[s].active = false; player[s].damage = playerhealth; if (player[s].weapon == pistolnum){ createpistol((player[s].bodyx + vectorx(player[s].gundirection, pistolholddistance)), (player[s].bodyy + vectory(player[s].gundirection, pistolholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == chainsawnum){ createchainsaw((player[s].bodyx + vectorx(player[s].gundirection, chainsawholddistance)), (player[s].bodyy + vectory(player[s].gundirection, chainsawholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == riflenum){ createrifle((player[s].bodyx + vectorx(player[s].gundirection, rifleholddistance)), (player[s].bodyy + vectory(player[s].gundirection, rifleholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == smgnum){ createsmg((player[s].bodyx + vectorx(player[s].gundirection, smgholddistance)), (player[s].bodyy + vectory(player[s].gundirection, smgholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == shotgunnum){ createshotgun((player[s].bodyx + vectorx(player[s].gundirection, shotgunholddistance)), (player[s].bodyy + vectory(player[s].gundirection, shotgunholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == nailgunnum){ createnailgun((player[s].bodyx + vectorx(player[s].gundirection, nailgunholddistance)), (player[s].bodyy + vectory(player[s].gundirection, nailgunholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum); }; if (player[s].weapon == rpgnum){ createrpg((player[s].bodyx + vectorx(player[s].gundirection, rpgholddistance)), (player[s].bodyy + vectory(player[s].gundirection, rpgholddistance)), player[s].facedirection, player[s].gundirection, true, objectline[player[s].objectlinenum].firstpnum, true); }; createcorpse(player[s].x, player[s].y, true, objectline[player[s].objectlinenum].firstpnum, 0, 2, 2, 2, 2); }; }; s = (s + 1); }; s = 0; while (s < enemyAs) { if (enemyA[s].active == true){ if (rectcollide(killzone[h].x1, killzone[h].y1, killzone[h].x2, killzone[h].y2, (enemyA[s].x - 1), enemyA[s].y, (enemyA[s].x + 1), (enemyA[s].y + (ragdollheight * 2))) == true){ enemyA[s].active = false; createcorpse(enemyA[s].x, enemyA[s].y, true, objectline[enemyA[s].objectlinenum].firstpnum, 1, 2, 2, 2, 2); zombiedie.play(); }; }; s = (s + 1); }; s = 0; while (s < enemyBs) { if (enemyB[s].active == true){ if (rectcollide(killzone[h].x1, killzone[h].y1, killzone[h].x2, killzone[h].y2, (enemyB[s].x - 1), enemyB[s].y, (enemyB[s].x + 1), (enemyB[s].y + (ragdollheight * 2))) == true){ enemyB[s].active = false; if (enemyB[s].kamikaze == false){ createpointdebris(enemyB[s].x, (enemyB[s].y + 8), 11); createcorpse(enemyB[s].x, enemyB[s].y, true, objectline[enemyB[s].objectlinenum].firstpnum, 2, 2, 2, 2, 2); zombiedie.play(); } else { createblast(enemyB[s].x, (enemyB[s].y + 8), kamikazeradius, kamikazepush, kamikazedamage, -1); kamikazeexplosion(enemyB[s].x, (enemyB[s].y + 8)); }; }; }; s = (s + 1); }; s = 0; while (s < enemyCs) { if (enemyC[s].active == true){ if (rectcollide(killzone[h].x1, killzone[h].y1, killzone[h].x2, killzone[h].y2, (enemyC[s].x - 1), enemyC[s].y, (enemyC[s].x + 1), (enemyC[s].y + (ragdollheight * 2))) == true){ enemyC[s].active = false; createpointdebris(enemyC[s].x, (enemyC[s].y + 8), 10); createcorpse(enemyC[s].x, enemyC[s].y, true, objectline[enemyC[s].objectlinenum].firstpnum, 3, 2, 2, 2, 2); zombiedie.play(); }; }; s = (s + 1); }; }; h = (h + 1); }; h = 0; while (h < crates) { if (crate[h].active == true){ if (hitzone[crate[h].hitzonenum].active == true){ createpointdebris(((crate[h].x + (Math.random() * crateradius)) - (crateradius * 0.5)), ((crate[h].y + (Math.random() * crateradius)) - (crateradius * 0.5)), 1); createpointdebris(((crate[h].x + (Math.random() * crateradius)) - (crateradius * 0.5)), ((crate[h].y + (Math.random() * crateradius)) - (crateradius * 0.5)), 1); createpointdebris(((crate[h].x + (Math.random() * crateradius)) - (crateradius * 0.5)), ((crate[h].y + (Math.random() * crateradius)) - (crateradius * 0.5)), 1); createlinedebris(((crate[h].x + (Math.random() * crateradius)) - (crateradius * 0.5)), ((crate[h].y + (Math.random() * crateradius)) - (crateradius * 0.5)), 1); createlinedebris(((crate[h].x + (Math.random() * crateradius)) - (crateradius * 0.5)), ((crate[h].y + (Math.random() * crateradius)) - (crateradius * 0.5)), 1); physicsexplosion(crate[h].x, (crate[h].y + (crateheight * 0.5)), (crateradius * 2), 5); crateexplosion(crate[h].x, (crate[h].y + (crateheight * 0.5))); crate[h].active = false; }; crate[h].gotoAndPlay((crate[h].frame + 1)); } else { if (crate[h].parent != null){ crate[h].parent.removeChild(crate[h]); }; hitzone[crate[h].hitzonenum].active = true; }; h = (h + 1); }; h = 0; while (h < computers) { if (computer[h].active == true){ if (hitzone[computer[h].hitzonenum].active == true){ if (computer[h].frame == 0){ computerexplosion(computer[h].x, (computer[h].y + (computerheight * 0.5))); } else { if (Math.floor((Math.random() * 24)) == 0){ electricsparks(computer[h].x, (computer[h].y + (computerheight * 0.5))); }; }; computer[h].frame = 1; }; computer[h].gotoAndPlay((computer[h].frame + 1)); } else { computer[h].visible = false; hitzone[computer[h].hitzonenum].active = true; }; h = (h + 1); }; h = 0; while (h < cities) { if (city[h].active == true){ city[h].gotoAndPlay((city[h].frame + 1)); } else { city[h].visible = false; }; h = (h + 1); }; h = 0; while (h < barrels) { if (barrel[h].active == true){ if (hitzone[barrel[h].hitzonenum].active == true){ createpointdebris(((barrel[h].x + (Math.random() * barrelradius)) - (barrelradius * 0.5)), ((barrel[h].y + (Math.random() * barrelradius)) - (barrelradius * 0.5)), 9); createpointdebris(((barrel[h].x + (Math.random() * barrelradius)) - (barrelradius * 0.5)), ((barrel[h].y + (Math.random() * barrelradius)) - (barrelradius * 0.5)), 9); createlinedebris(((barrel[h].x + (Math.random() * barrelradius)) - (barrelradius * 0.5)), ((barrel[h].y + (Math.random() * barrelradius)) - (barrelradius * 0.5)), 0); createblast(barrel[h].x, (barrel[h].y + (barrelheight * 0.5)), grenaderadius, grenadepush, grenadedamage, -1); barrelexplosion(barrel[h].x, (barrel[h].y + (barrelheight * 0.5))); createfire(barrel[h].x, ((barrel[h].y + barrelheight) - 8), 150); barrel[h].active = false; }; barrel[h].gotoAndPlay((barrel[h].frame + 1)); } else { if (barrel[h].parent != null){ barrel[h].parent.removeChild(barrel[h]); }; hitzone[barrel[h].hitzonenum].active = true; }; h = (h + 1); }; h = 0; while (h < spinlights) { if (spinlight[h].active == true){ spinlight[h].rotation = (spinlight[h].rotation + spinspeed); } else { spinlight[h].visible = false; }; h = (h + 1); }; h = 0; while (h < floordoors) { if (floordoor[h].active == true){ } else { floordoor[h].visible = false; }; h = (h + 1); }; h = 0; while (h < walldoors) { if (walldoor[h].active == true){ } else { walldoor[h].visible = false; }; h = (h + 1); }; h = 0; while (h < raindrops) { if (rain[h].active == true){ rain[h].y = (rain[h].y + rain[h].vs); if (rain[h].y > 320){ rain[h].x = (Math.random() * 600); rain[h].y = -20; rain[h].vs = ((Math.random() * 5) + 3); rain[h].height = (rain[h].vs * 2); if (particlealpha == 0){ rain[h].alpha = (rain[h].vs * 0.1); } else { rain[h].alpha = 1; }; }; } else { rain[h].visible = false; }; h = (h + 1); }; if (screenflash.active == true){ if (screenflash.alpha > 0){ screenflash.alpha = (screenflash.alpha - 0.01); } else { screenflash.active = false; }; } else { screenflash.visible = false; }; h = 0; while (h < fires) { if (fire[h].active == true){ if (fire[h].delay == 0){ fireparticles(fire[h].x, fire[h].y); fire[h].delay = fireskipnum; } else { fire[h].delay = (fire[h].delay - 1); }; fire[h].livetime = (fire[h].livetime + 1); if (fire[h].livetime >= fire[h].maxlivetime){ fire[h].active = false; }; }; h = (h + 1); }; if (fog.active == true){ fog.x = (fog.x - 1); if (fog.x < -1600){ fog.x = 600; }; } else { fog.visible = false; }; if (fade.active == true){ if (fade.alpha > 0){ fade.alpha = (fade.alpha - 0.04); } else { fade.active = false; }; } else { fade.visible = false; }; if (berserkscreen.active == true){ if (berserkscreen.livetime < 30){ berserkscreen.alpha = (berserkscreen.alpha + 0.01); }; if ((berserkduration - berserkscreen.livetime) < 30){ berserkscreen.alpha = (berserkscreen.alpha - 0.01); }; if (berserkscreen.livetime < berserkduration){ berserkscreen.livetime = (berserkscreen.livetime + 1); } else { berserkscreen.active = false; }; } else { berserkscreen.visible = false; }; h = 0; while (h < crowwings) { if (crowwing[h].active == true){ crowwing[h].scaleY = (crowwing[h].scaleY + crowwing[h].scalespeed); if (crowwing[h].scaleY >= 1){ crowwing[h].scaleY = 1; crowwing[h].scalespeed = (-(crowwing[h].scalespeed) * 2); }; if (crowwing[h].scaleY <= -1){ crowwing[h].scaleY = -1; crowwing[h].scalespeed = (-(crowwing[h].scalespeed) * 0.5); }; } else { if (crowwing[h].parent != null){ crowwing[h].parent.removeChild(crowwing[h]); }; }; h = (h + 1); }; h = 0; while (h < crows) { if (crow[h].active == true){ crow[h].gotoAndPlay((crow[h].frame + 1)); crow[h].x = (crow[h].x + crow[h].hs); crow[h].y = (crow[h].y + crow[h].vs); hitzone[crow[h].hitzonenum].x = crow[h].x; hitzone[crow[h].hitzonenum].y = crow[h].y; if (hitzone[crow[h].hitzonenum].active == true){ bloodspray(crow[h].x, crow[h].y, 3); createpointdebris(crow[h].x, crow[h].y, (3 + Math.floor((Math.random() * 4)))); physicspush(crow[h].x, crow[h].y, 1, (Math.random() * 360), Math.random()); crow[h].active = false; }; if (crow[h].frame == 0){ crowwing[crow[h].wingnum].visible = false; crowwing[crow[h].wingnum].scaleY = 0; } else { crowwing[crow[h].wingnum].visible = true; }; if (crow[h].frame == 0){ if (blockdistance(crow[h].x, crow[h].y, player[0].x, player[0].y) < 100){ crow[h].frame = 1; crowcaw.play(); if (crow[h].facedirection == 0){ crow[h].hs = 5; crow[h].vs = -0.5; } else { crow[h].hs = -5; crow[h].vs = -0.5; }; }; }; if ((((crow[h].x > 1200)) || ((crow[h].x < -400)))){ crow[h].active = false; }; crowwing[crow[h].wingnum].x = crow[h].x; crowwing[crow[h].wingnum].y = crow[h].y; } else { crowwing[crow[h].wingnum].active = false; if (crow[h].parent != null){ crow[h].parent.removeChild(crow[h]); }; hitzone[crow[h].hitzonenum].active = true; }; h = (h + 1); }; h = 0; while (h < rats) { if (rat[h].active == true){ hitzone[rat[h].hitzonenum].x = rat[h].x; hitzone[rat[h].hitzonenum].y = rat[h].y; if (hitzone[rat[h].hitzonenum].active == true){ ratsqueak.play(); bloodspray(rat[h].x, rat[h].y, 3); createpointdebris(rat[h].x, rat[h].y, (3 + Math.floor((Math.random() * 4)))); physicspush(rat[h].x, rat[h].y, 1, (Math.random() * 360), Math.random()); rat[h].active = false; }; if (rat[h].scared == 1){ if (rat[h].facedirection == 0){ rat[h].x = (rat[h].x + 2.5); } else { rat[h].x = (rat[h].x - 2.5); }; } else { rat[h].gotoAndPlay((rat[h].frame + 1)); }; if (rat[h].scared == 0){ if (blockdistance(rat[h].x, rat[h].y, player[0].x, player[0].y) < 100){ rat[h].scared = 1; ratsqueak.play(); }; }; if ((((rat[h].x > 1200)) || ((rat[h].x < -400)))){ rat[h].active = false; }; } else { if (rat[h].parent != null){ rat[h].parent.removeChild(rat[h]); }; hitzone[rat[h].hitzonenum].active = true; }; h = (h + 1); }; battleduration = 900; if ((((((((mapnumber > 2)) && ((counter1 < battleduration)))) && ((counter1 > 0)))) && ((mapnumber < 15)))){ if (((!((mapnumber == 13))) || ((player[0].x < 400)))){ spawnpickups((((-0.5 * this.x) + 200) - (Math.random() * 25)), ((player[0].y - 75) + (Math.random() * 25))); spawnweapons((((-0.5 * this.x) + 200) - (Math.random() * 25)), ((player[0].y - 75) + (Math.random() * 25))); }; }; if (mapnumber == 1){ if ((((bool4 == false)) && ((counter3 > 60)))){ bool4 = true; messagestring = "Use the A and D keys to move and W to jump."; messagetextdelay = 210; }; counter3 = (counter3 + 1); if ((((player[0].x > 400)) && ((bool1 == false)))){ createenemyA(700, 200, 1, true, false); createenemyA(-100, 200, 0, true, false); messagestring = "Use the mouse to aim and Mouse 1 to attack."; messagetextdelay = 210; bool1 = true; }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 220)) && ((bool2 == false)))){ createenemyA(700, 200, 1, true, false); createenemyA(650, 200, 1, true, false); bool2 = true; }; if ((((((counter1 > 300)) && ((countenemies() == 0)))) && ((bool3 == false)))){ messagestring = "You can proceed once all enemies have been killed."; messagetextdelay = 90000; bool3 = true; createwinzone(590, 0, 610, 300); }; }; if (mapnumber == 2){ if ((((counter1 > 40)) && ((bool1 == false)))){ bool1 = true; messagestring = "Pickups and weapons will randomly spawn around you."; messagetextdelay = 210; teleportsparks(100, 200); createhealth(100, 200, true); }; counter1 = (counter1 + 1); if ((((player[0].x > 350)) && ((bool2 == false)))){ bool2 = true; smallcrash.play(); createenemyA(455, 240, 1, true, false); physicspush(455, 0x0100, 32, 90, 5); dirtblast(455, 240); counter1 = (counter1 + 1); }; if (bool2 == true){ if (counter2 > 10){ collisionline[2].active = true; } else { counter2 = (counter2 + 1); }; }; if ((((((bool2 == true)) && ((bool3 == false)))) && ((countenemies() == 0)))){ bool3 = true; createenemyA(650, 200, 1, true, false); createenemyA(-50, 200, 0, true, false); createenemyA(-150, 200, 0, true, false); }; if (bool3 == true){ if ((((counter3 > 90)) && ((bool5 == false)))){ bool5 = true; player[0].berserkamount = 1000; messagestring = "When the blue bar is filled..."; messagetextdelay = 210; }; if ((((countenemies() == 0)) && ((bool4 == false)))){ messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); bool4 = true; }; counter3 = (counter3 + 1); }; }; if (mapnumber == 3){ if ((((counter1 > 40)) && ((bool1 == false)))){ bool1 = true; teleportsparks(125, 200); createpistol(125, 200, 0, 0, true, -1); createenemyA(650, 200, 1, true, false); createenemyA(700, 200, 1, true, false); createenemyA(-50, 200, 0, true, false); messagestring = "Use number keys 1-8 to switch weapons."; messagetextdelay = 210; }; if ((((counter1 > 60)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 200, 0, 0); spawnenemies(700, 200, 1, 0); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; counter1 = (counter1 + 1); }; if (mapnumber == 4){ if ((((player[0].x > 480)) && ((bool1 == false)))){ bool1 = true; xposition = 625; yposition = 220; createlinedebris((xposition - 15), (yposition - 4), 1); createpointdebris((xposition - 20), (yposition - 12), 1); createpointdebris((xposition - 10), (yposition - 8), 1); physicsexplosion(xposition, yposition, 50, 4); createenemyA(xposition, (yposition - 20), 1, true, true); smallcrash.play(); i = 0; while (i < 5) { creategp((xposition - 20), yposition, ((Math.random() * 10) + 15), ((Math.random() * 60) + 150), ((Math.random() * 3) + 2), 0.97, 0.08, ((Math.random() * 20) + 20), 7623226, true); i = (i + 1); }; }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 200, 0, 0); spawnenemies(700, 200, 1, 0); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 5){ if ((((player[0].x > 500)) && ((bool1 == false)))){ bool1 = true; xposition = 625; yposition = 115; createlinedebris((xposition - 20), (yposition + 4), 1); createpointdebris((xposition - 10), (yposition - 8), 1); createpointdebris((xposition - 5), yposition, 1); physicsexplosion(xposition, yposition, 50, 4); createenemyA(xposition, (yposition - 20), 1, true, true); createenemyA(-100, 200, 1, true, true); smallcrash.play(); i = 0; while (i < 5) { creategp((xposition - 20), yposition, ((Math.random() * 10) + 15), ((Math.random() * 60) + 150), ((Math.random() * 3) + 2), 0.97, 0.08, ((Math.random() * 20) + 20), 7623226, true); i = (i + 1); }; }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 200, 0, 0); spawnenemies(700, 95, 1, 0); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 6){ if ((((bool5 == false)) && ((counter2 > 30)))){ messagestring = "Crates contain pickups and weapons."; messagetextdelay = 120; bool5 = true; }; counter2 = (counter2 + 1); if ((((player[0].x > 350)) && ((bool1 == false)))){ bool1 = true; createenemyA(700, 180, 1, true, true); createenemyA(-50, 180, 0, true, false); createenemyA(-150, 180, 0, true, true); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 180, 0, 0); spawnenemies(700, 180, 1, 0); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 7){ if ((((player[0].x > 400)) && ((bool1 == false)))){ bool1 = true; xposition = 550; yposition = -50; createlinedebris((xposition - 3), (yposition + 10), 2); createboxdebris((xposition - 4), (yposition + 8), 2); createpointdebris((xposition + 2), (yposition + 23), 2); createpointdebris((xposition + 6), (yposition + 16), 2); physicsexplosion(xposition, yposition, 50, 3); bigcrash.play(); i = 0; while (i < 7) { creategp((xposition - 20), yposition, ((Math.random() * 10) + 15), ((Math.random() * 40) + 250), ((Math.random() * 3) + 1), 0.97, 0.08, ((Math.random() * 40) + 40), 10263181, true); i = (i + 1); }; createenemyA(700, 120, 1, true, false); createenemyB(-50, 120, 0, true, false); createenemyB(550, -70, 1, true, false); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(550, -50, 1, Math.floor((Math.random() * 2))); spawnenemies(-100, 120, 0, Math.floor((Math.random() * 2))); spawnenemies(700, 120, 1, Math.floor((Math.random() * 2))); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 8){ if ((((counter5 > 40)) && ((bool5 == false)))){ bool5 = true; messagestring = "Certain objects are destructable..."; messagetextdelay = 210; } else { counter5 = (counter5 + 1); }; watercolor = 6982733; if (bool3 == false){ if (hitzone[(hitzones - 1)].active == true){ bool4 = true; bool3 = true; xposition = 300; yposition = 140; createlinedebris((xposition - 8), (yposition + 9), 0); createlinedebris((xposition + 2), (yposition - 6), 0); createpointdebris((xposition + 5), (yposition + 12), 0); createpointdebris((xposition - 3), (yposition - 8), 0); physicsexplosion(xposition, yposition, 30, 3); metalcrash.play(); waterspray.play(0, 5); i = 0; while (i < 8) { creategp(xposition, yposition, ((Math.random() * 8) + 16), (Math.random() * 360), ((Math.random() * 3) + 1), 0.97, 0.05, ((Math.random() * 30) + 30), 6982733, true); i = (i + 1); }; background.frame = 8; } else { if (Math.floor((Math.random() * 90)) == 0){ creategp(300, 160, 2, 270, 0, 0.99, g, 80, 6982733, false); drip.play(); }; }; }; if (bool4 == true){ counter4 = (counter4 + 1); if (counter4 < 325){ if (Math.floor((Math.random() * 4)) == 0){ creategp(300, 160, ((Math.random() * 8) + 8), (260 + (Math.random() * 20)), (Math.random() + 1), 0.99, g, 40, watercolor, true); }; waterpool[0].y = (waterpool[0].y - 0.08); waterpool[0].depth = (waterpool[0].depth + 0.16); }; }; if ((((player[0].x > 350)) && ((bool1 == false)))){ bool1 = true; createenemyA(-125, 160, 0, true, false); createenemyB(-50, 160, 0, true, false); createenemyB(650, 160, 1, true, false); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 160, 0, Math.floor((Math.random() * 2))); spawnenemies(700, 160, 1, Math.floor((Math.random() * 2))); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 9){ if ((((player[0].x > 150)) && ((bool1 == false)))){ bool1 = true; xposition = 55; yposition = 125; createlinedebris((xposition + 4), (yposition - 4), 0); createlinedebris((xposition + 10), (yposition - 8), 0); createpointdebris((xposition + 4), yposition, 0); createpointdebris((xposition - 4), (yposition + 3), 0); physicsexplosion(xposition, yposition, 40, 5); createenemyB((xposition - 50), (yposition - 15), 0, true, false); createenemyA(-100, 180, 0, true, false); createenemyB(700, 120, 1, true, false); metalcrash.play(); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(10, 95, 0, Math.floor((Math.random() * 2))); spawnenemies(-100, 180, 0, Math.floor((Math.random() * 2))); spawnenemies(700, 110, 1, Math.floor((Math.random() * 2))); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(510, 0, 610, 300); }; }; }; }; if (mapnumber == 10){ if (counter3 == 5){ xposition = 235; yposition = 250; creategp(xposition, yposition, ((Math.random() * 5) + 10), ((Math.random() * 10) + 85), ((Math.random() * 3) + 5), 0.98, g, ((Math.random() * 20) + 80), 4364733, true); counter3 = 0; }; counter3 = (counter3 + 1); if ((((player[0].x > 260)) && ((bool1 == false)))){ bool1 = true; createenemyB(650, 218, 1, true, false); createenemyB(-100, 218, 0, true, false); createenemyB(700, 218, 1, true, true); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 218, 0, Math.floor((Math.random() * 2))); spawnenemies(700, 218, 1, Math.floor((Math.random() * 2))); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 11){ if ((((player[0].x > 450)) && ((bool1 == false)))){ bool1 = true; xposition = 600; yposition = 225; createlinedebris((xposition - 6), (yposition - 4), 2); createboxdebris((xposition - 4), (yposition - 2), 2); createpointdebris((xposition - 2), (yposition + 3), 2); physicsexplosion(xposition, yposition, 50, 3); bigcrash.play(); i = 0; while (i < 7) { creategp((xposition - 10), yposition, ((Math.random() * 15) + 20), ((Math.random() * 60) + 150), ((Math.random() * 3) + 3), 0.97, 0.03, ((Math.random() * 40) + 40), 9935495, true); i = (i + 1); }; createenemyB(700, 218, 1, true, true); createenemyB(-100, 218, 0, true, false); createenemyC(650, 218, 1, true); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 218, 0, Math.floor((Math.random() * 2))); spawnenemies(700, 218, 1, Math.floor((Math.random() * 3))); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; if (Math.floor((Math.random() * 30)) == 0){ electricsparks(275, 175); }; }; if (mapnumber == 12){ if ((((player[0].x > 450)) && ((bool1 == false)))){ rope[0].locked2 = false; bool1 = true; xposition = 400; yposition = -30; createlinedebris((xposition - 6), (yposition + 4), 2); createlinedebris((xposition - 4), (yposition + 2), 2); createpointdebris((xposition - 2), (yposition + 3), 2); physicsexplosion(xposition, yposition, 50, 3); bigcrash.play(); i = 0; while (i < 7) { creategp((xposition - 10), yposition, ((Math.random() * 15) + 20), ((Math.random() * 60) + 240), ((Math.random() * 3) + 3), 0.97, 0.03, ((Math.random() * 40) + 40), 8487787, true); i = (i + 1); }; createenemyA(400, -50, 1, true, true); createenemyA(-100, 118, 0, true, false); createenemyC(700, 118, 1, true); }; if (bool1 == true){ counter1 = (counter1 + 1); if (Math.floor((Math.random() * 10)) == 0){ p[((rope[0].firstpnum + rope[0].segments) - 1)].x = ((p[((rope[0].firstpnum + rope[0].segments) - 1)].x + (Math.random() * 8)) - 4); p[((rope[0].firstpnum + rope[0].segments) - 1)].y = ((p[((rope[0].firstpnum + rope[0].segments) - 1)].y + (Math.random() * 8)) - 4); electricsparks(p[((rope[0].firstpnum + rope[0].segments) - 1)].x, p[((rope[0].firstpnum + rope[0].segments) - 1)].y); }; }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 118, 0, (Math.floor((Math.random() * 2)) * 2)); spawnenemies(700, 118, 1, (Math.floor((Math.random() * 2)) * 2)); spawnenemies(400, -50, 1, (Math.floor((Math.random() * 2)) * 2)); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; }; if (mapnumber == 13){ if ((((player[0].x > 450)) && ((bool1 == false)))){ bool1 = true; createenemyA(-150, 118, 0, true, false); createenemyA(-120, 118, 0, true, false); createenemyC(-40, 118, 0, true); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 118, 0, (Math.floor((Math.random() * 2)) * 2)); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(595, 0, 610, 300); bool4 = true; dooropen.play(); }; }; }; if (bool4 == true){ collisionline[3].y2 = (collisionline[3].y2 - 0.25); walldoor[0].y = (walldoor[0].y - 0.25); }; }; if (mapnumber == 14){ if ((((player[0].x > 350)) && ((bool1 == false)))){ bool1 = true; createenemyC(-160, 118, 0, true); createenemyC(-120, 118, 0, true); createenemyC(680, 118, 1, true); }; if (bool1 == true){ counter1 = (counter1 + 1); }; if (Math.floor((Math.random() * 15)) == 0){ creategp(203, 76, 3, (260 + (Math.random() * 20)), Math.random(), 0.99, g, ((Math.random() * 20) + 20), 1762862, false); }; if ((((counter1 > 30)) && ((bool2 == false)))){ if (counter1 < battleduration){ spawnenemies(-100, 118, 0, 2); spawnenemies(700, 118, 1, 2); } else { if (countenemies() == 0){ bool2 = true; messagestring = "Continue."; messagetextdelay = 900; createwinzone(590, 0, 610, 300); }; }; }; if ((((computer[0].frame == 1)) && ((bool3 == false)))){ bool3 = true; bool4 = true; spinlight[0].visible = true; alarm.play(0, 2); }; if (bool4 == true){ if (collisionline[0].x2 > 300){ collisionline[0].x2 = (collisionline[0].x2 - 5); floordoor[0].x = (floordoor[0].x - 5); }; }; }; if (mapnumber == 15){ if ((((player[0].x > 200)) && ((bool1 == false)))){ bool1 = true; megazombieintro.play(); spinlight[0].visible = true; electricsparks(372, 233); }; if (bool1 == false){ megazombie[0].recovertimer = 80; megazombie[0].cx = 300; megazombie[0].cy = 160; }; if (rope[chain[0].ropenum].locked1 == true){ if (approxdistance(rope[chain[0].ropenum].lockx1, rope[chain[0].ropenum].locky1, rope[chain[0].ropenum].lockx2, rope[chain[0].ropenum].locky2) > (rope[chain[0].ropenum].maxlength * 1.2)){ nailhit.play(); rope[chain[0].ropenum].locked1 = false; chainbreak(rope[chain[0].ropenum].lockx1, rope[chain[0].ropenum].locky1); }; }; if (rope[chain[1].ropenum].locked1 == true){ if (approxdistance(rope[chain[1].ropenum].lockx1, rope[chain[1].ropenum].locky1, rope[chain[1].ropenum].lockx2, rope[chain[1].ropenum].locky2) > (rope[chain[1].ropenum].maxlength * 1.2)){ nailhit.play(); rope[chain[1].ropenum].locked1 = false; chainbreak(rope[chain[1].ropenum].lockx1, rope[chain[1].ropenum].locky1); }; }; if (rope[chain[2].ropenum].locked2 == true){ if (approxdistance(rope[chain[2].ropenum].lockx1, rope[chain[2].ropenum].locky1, rope[chain[2].ropenum].lockx2, rope[chain[2].ropenum].locky2) > (rope[chain[2].ropenum].maxlength * 1.2)){ nailhit.play(); rope[chain[2].ropenum].locked2 = false; bloodspray(rope[chain[2].ropenum].lockx2, rope[chain[2].ropenum].locky2, 5); }; }; if (rope[chain[3].ropenum].locked2 == true){ if (approxdistance(rope[chain[3].ropenum].lockx1, rope[chain[3].ropenum].locky1, rope[chain[3].ropenum].lockx2, rope[chain[3].ropenum].locky2) > (rope[chain[3].ropenum].maxlength * 1.2)){ nailhit.play(); rope[chain[3].ropenum].locked2 = false; bloodspray(rope[chain[3].ropenum].lockx2, rope[chain[3].ropenum].locky2, 5); }; }; rope[chain[0].ropenum].lockx2 = ((megazombie[0].cx + megazombie[0].movex) - 8); rope[chain[0].ropenum].locky2 = (((megazombie[0].cy + megazombie[0].movey) + 30) - 5); rope[chain[1].ropenum].lockx2 = ((megazombie[0].cx + megazombie[0].movex) + 5); rope[chain[1].ropenum].locky2 = (((megazombie[0].cy + megazombie[0].movey) + 30) + 14); rope[chain[2].ropenum].lockx2 = ((megazombie[0].cx + megazombie[0].movex) - 10); rope[chain[2].ropenum].locky2 = (((megazombie[0].cy + megazombie[0].movey) + 30) + 5); rope[chain[3].ropenum].lockx2 = ((megazombie[0].cx + megazombie[0].movex) + 3); rope[chain[3].ropenum].locky2 = (((megazombie[0].cy + megazombie[0].movey) + 30) - 12); if ((((countweapons() == 0)) && ((player[0].x < 250)))){ createrpg(552, 134, 0, 84, false, -1, false); }; if ((((countpickups() == 0)) && ((player[0].x > 350)))){ createhealth(50, 105, false); }; if ((((bool2 == false)) && ((megazombie[0].active == false)))){ bool1 = true; chain[0].active = false; chain[1].active = false; }; if (megazombie[0].active == false){ counter1 = (counter1 + 1); }; if (counter1 >= 200){ loadmap((mapnumber + 1)); }; }; if (mapnumber == 16){ watermarkbtn0.visible = false; particlequality = 0; particlealpha = 0; if ((((counter1 > 150)) && ((bool1 == false)))){ loadmap((mapnumber + 1)); }; counter1 = (counter1 + 1); }; if (mapnumber == 17){ if (counter1 == 40){ plane.play(); }; if (counter1 == 200){ nuclearblast(300, 233); city[0].frame = 1; }; if (counter2 > 440){ if (bool2 == false){ bool2 = true; resetgame(); backdrop.visible = false; background.visible = false; foreground.visible = false; cursor.visible = false; wait = 0; gotoAndPlay(1); }; }; counter1 = (counter1 + 1); counter2 = (counter2 + 1); }; if (debugmode == true){ if (clicking == true){ pdistance = 0; lowestpnum2 = -1; lowestpdistance = 16; physicspush(mouseX, mouseY, 0, 0, 0); u2 = 0; while (u2 < ps) { if (p[u2].active == true){ temppdistance = approxdistance(mouseX, mouseY, p[u2].x, p[u2].y); if (temppdistance < lowestpdistance){ lowestpdistance = temppdistance; lowestpnum2 = u2; }; }; u2 = (u2 + 1); }; selectedp = lowestpnum2; }; if ((((clicking == true)) && ((selectedp > -1)))){ p[selectedp].x = mouseX; p[selectedp].y = mouseY; }; }; }; } public function bloodspray(_arg1:Number, _arg2:Number, _arg3:int){ numberofps = _arg3; if (numberofps > maxbloodps){ numberofps = maxbloodps; }; q = 0; while (q < numberofps) { if (q == 0){ creategp(_arg1, _arg2, ((Math.random() * 4) + 4), (Math.random() * 360), ((Math.random() * 4) + 1), 0.9, 0.05, ((Math.random() * 8) + 8), 13644595, false); } else { creategp(_arg1, _arg2, ((Math.random() * 4) + 4), (Math.random() * 360), ((Math.random() * 4) + 1), 0.9, 0.05, ((Math.random() * 8) + 8), 13644595, true); }; q = (q + 1); }; } public function menubtnclick(_arg1){ this.removeEventListener(Event.ENTER_FRAME, menustep2); gotoAndPlay(3); } public function blooddrip(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 2) + 2), ((Math.random() * 90) + 45), Math.random(), 0.97, 0.05, ((Math.random() * 12) + 12), 13644595, true); } public function turretmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ turretshoot.play(); q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 15) + 15), muzzlesmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 5) + 10), 0, 0, 0, 0, 3, muzzleflashcolor, false); } public function createbodyB(){ bodyB[bodyBs] = new bodyBmc(); bodypartscontainer.addChild(bodyB[bodyBs]); bodyB[bodyBs].active = true; bodyB[bodyBs].visible = true; bodyB[bodyBs].x = -100; bodyB[bodyBs].y = -100; bodyB[bodyBs].frame = 0; bodyBs = (bodyBs + 1); } public function createbodyC(){ bodyC[bodyCs] = new bodyCmc(); bodypartscontainer.addChild(bodyC[bodyCs]); bodyC[bodyCs].active = true; bodyC[bodyCs].visible = true; bodyC[bodyCs].x = -100; bodyC[bodyCs].y = -100; bodyC[bodyCs].frame = 0; bodyCs = (bodyCs + 1); } public function createbodyD(){ bodyD[bodyDs] = new bodyDmc(); bodypartscontainer.addChild(bodyD[bodyDs]); bodyD[bodyDs].active = true; bodyD[bodyDs].visible = true; bodyD[bodyDs].x = -100; bodyD[bodyDs].y = -100; bodyD[bodyDs].frame = 0; bodyDs = (bodyDs + 1); } public function createrpg(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int, _arg7:Boolean){ rpg[rpgs] = new rpgmc(); weaponscontainer.addChild(rpg[rpgs]); rpg[rpgs].dummy = _arg7; rpg[rpgs].active = true; rpg[rpgs].visible = true; rpg[rpgs].fade = _arg5; rpg[rpgs].facedirection = _arg3; if (_arg3 == 1){ rpg[rpgs].scaleX = -1; }; rpg[rpgs].x = -1000; rpg[rpgs].y = -1000; rpg[rpgs].livetime = 0; rpg[rpgs].pointdirection = _arg4; rpg[rpgs].linenum = lines; createline((_arg1 - vectorx(_arg4, (rpglength * 0.5))), (_arg2 - vectory(_arg4, (rpglength * 0.5))), (_arg1 + vectorx(_arg4, (rpglength * 0.5))), (_arg2 + vectory(_arg4, (rpglength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); rpgs = (rpgs + 1); } public function createbodyA(){ bodyA[bodyAs] = new bodyAmc(); bodypartscontainer.addChild(bodyA[bodyAs]); bodyA[bodyAs].active = true; bodyA[bodyAs].visible = true; bodyA[bodyAs].x = -100; bodyA[bodyAs].y = -100; bodyA[bodyAs].frame = 0; bodyAs = (bodyAs + 1); } public function createshotgun(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ shotgun[shotguns] = new shotgunmc(); weaponscontainer.addChild(shotgun[shotguns]); shotgun[shotguns].active = true; shotgun[shotguns].visible = true; shotgun[shotguns].fade = _arg5; shotgun[shotguns].facedirection = _arg3; if (_arg3 == 1){ shotgun[shotguns].scaleX = -1; }; shotgun[shotguns].x = -1000; shotgun[shotguns].y = -1000; shotgun[shotguns].livetime = 0; shotgun[shotguns].pointdirection = _arg4; shotgun[shotguns].linenum = lines; createline((_arg1 - vectorx(_arg4, (shotgunlength * 0.5))), (_arg2 - vectory(_arg4, (shotgunlength * 0.5))), (_arg1 + vectorx(_arg4, (shotgunlength * 0.5))), (_arg2 + vectory(_arg4, (shotgunlength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); shotguns = (shotguns + 1); } public function directiontopoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; if (((!((_arg1 == _arg3))) && (!((_arg2 == _arg4))))){ _local5 = Math.abs((_arg4 - _arg2)); _local6 = Math.abs((_arg3 - _arg1)); _local7 = 0; _local8 = 0; if (_local6 > _local5){ _local7 = (_local5 / _local6); _local7 = Math.floor((_local7 * 100)); _local8 = tdtp[_local7]; } else { _local7 = (_local6 / _local5); _local7 = Math.floor((_local7 * 100)); _local8 = (90 - tdtp[_local7]); }; if ((((_arg4 < _arg2)) && ((_arg3 < _arg1)))){ _local8 = (180 - _local8); }; if ((((_arg4 > _arg2)) && ((_arg3 < _arg1)))){ _local8 = (180 + _local8); }; if ((((_arg4 > _arg2)) && ((_arg3 > _arg1)))){ _local8 = (360 - _local8); }; } else { if ((((_arg3 == _arg1)) && ((_arg4 == _arg2)))){ _local8 = 0; }; if ((((_arg3 == _arg1)) && ((_arg4 > _arg2)))){ _local8 = 270; }; if ((((_arg3 == _arg1)) && ((_arg4 < _arg2)))){ _local8 = 90; }; if ((((_arg4 == _arg2)) && ((_arg3 > _arg1)))){ _local8 = 0; }; if ((((_arg4 == _arg2)) && ((_arg3 < _arg1)))){ _local8 = 180; }; }; return (_local8); } public function vectory(_arg1:Number, _arg2:Number):Number{ var _local3:uint; _local3 = Math.round(_arg1); return ((-(tsin[_local3]) * _arg2)); } public function vectorx(_arg1:Number, _arg2:Number):Number{ var _local3:uint; _local3 = Math.round(_arg1); return ((tcos[_local3] * _arg2)); } public function laserimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 3) + 3), (Math.random() * 360), ((Math.random() * 2) + 2), 0.95, 0, ((Math.random() * 4) + 4), 0xFF00, true); q = (q + 1); }; } public function pphysics(_arg1:uint, _arg2:Boolean){ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:uint; _local3 = 1; _local4 = 0; _local5 = 0; _local6 = p[_arg1].x; _local7 = p[_arg1].y; _local8 = 0; _local4 = (p[_arg1].x - p[_arg1].lx); _local5 = ((p[_arg1].y - p[_arg1].ly) + p[_arg1].g); if (_arg2 == true){ _local8 = 0; while (_local8 < waterpools) { if (waterpool[_local8].active == true){ if ((((((((p[_arg1].x > waterpool[_local8].x)) && ((p[_arg1].x < (waterpool[_local8].x + waterpool[_local8].xwidth))))) && ((p[_arg1].y > waterpool[_local8].y)))) && ((p[_arg1].y < (waterpool[_local8].y + waterpool[_local8].depth))))){ _local3 = waterpool[_local8].ffactor; _local8 = (waterpools + 1); }; }; _local8 = (_local8 + 1); }; }; _local4 = (_local4 * (p[_arg1].af * _local3)); _local5 = (_local5 * (p[_arg1].af * _local3)); if (Math.abs(_local4) > maxdelta){ if (_local4 > 0){ _local4 = maxdelta; }; if (_local4 < 0){ _local4 = -(maxdelta); }; }; if (Math.abs(_local5) > maxdelta){ if (_local5 > 0){ _local5 = maxdelta; }; if (_local5 < 0){ _local5 = -(maxdelta); }; }; p[_arg1].x = (p[_arg1].x + _local4); p[_arg1].y = (p[_arg1].y + _local5); p[_arg1].lx = _local6; p[_arg1].ly = _local7; } public function waterexplosion(_arg1, _arg2, _arg3){ q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 12) + 12), ((Math.random() * 30) + 75), ((Math.random() * 4) + 4), 0.96, 0.15, ((Math.random() * 30) + 30), _arg3, true); q = (q + 1); }; } public function jumpdust(_arg1:Number, _arg2:Number){ q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 5) + 8), (Math.random() * 360), Math.random(), 1, 0, ((Math.random() * 15) + 15), 11643546, true); q = (q + 1); }; } public function megazombiefireexhaustparticles(_arg1:Number, _arg2:Number){ creategp(((_arg1 + (Math.random() * 10)) - 5), _arg2, ((Math.random() * 5) + 10), ((Math.random() * 80) + 230), ((Math.random() * 2) + 3), 0.9, 0.01, ((Math.random() * 8) + 16), 0x8C8C8C, true); creategp(((_arg1 + (Math.random() * 10)) - 5), _arg2, ((Math.random() * 4) + 8), ((Math.random() * 80) + 230), ((Math.random() * 2) + 2), 0.9, 0.01, ((Math.random() * 8) + 12), 0xFFCC00, true); creategp(((_arg1 + (Math.random() * 10)) - 5), _arg2, ((Math.random() * 3) + 6), ((Math.random() * 80) + 230), ((Math.random() * 2) + 1), 0.9, 0.01, ((Math.random() * 8) + 8), 0xFFFF00, true); } public function createlinedebris(_arg1:Number, _arg2:Number, _arg3:uint){ dchance = 0; if (debrisquality == 1){ dchance = Math.floor((Math.random() * 2)); }; if (dchance == 0){ linedebris[linedebriss] = new linedebrismc(); debriscontainer.addChild(linedebris[linedebriss]); linedebris[linedebriss].active = true; linedebris[linedebriss].visible = true; linedebris[linedebriss].x = -1000; linedebris[linedebriss].y = -1000; linedebris[linedebriss].frame = _arg3; linedebris[linedebriss].livetime = 0; linedebris[linedebriss].linenum = lines; createline((_arg1 - (linedebrislength * 0.5)), _arg2, (_arg1 + (linedebrislength * 0.5)), _arg2, linedebrisaf, linedebrisg, linedebrisf, true, -1, false); linedebriss = (linedebriss + 1); }; } public function rpgmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ q = 0; while (q < 4) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), correctdirection(((_arg3 + (Math.random() * 80)) - 40)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 10) + 20), muzzlesmokecolor, true); q = (q + 1); }; q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 3) + 3), correctdirection(((_arg3 + (Math.random() * 30)) - 15)), ((Math.random() * 2) + 2), 0.92, 0, ((Math.random() * 10) + 10), muzzleflashcolor, false); q = (q + 1); }; } public function pointcollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Boolean{ if ((((((((_arg1 > _arg3)) && ((_arg1 < _arg5)))) && ((_arg2 > _arg4)))) && ((_arg2 < _arg6)))){ return (true); }; return (false); } public function createlowerarm(_arg1){ lowerarm[lowerarms] = new lowerarmmc(); bodypartscontainer.addChild(lowerarm[lowerarms]); lowerarm[lowerarms].visible = true; lowerarm[lowerarms].active = true; lowerarm[lowerarms].x = -100; lowerarm[lowerarms].y = -100; lowerarm[lowerarms].frame = _arg1; lowerarm[lowerarms].gotoAndPlay((_arg1 + 1)); lowerarms = (lowerarms + 1); } public function chainsawimpact(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); creategp(_arg1, _arg2, ((Math.random() * 2) + 2), (Math.random() * 360), ((Math.random() * 3) + 1), 1, 0, ((Math.random() * 5) + 5), 0xFFFF00, true); } public function startflash(){ screenflash.active = true; screenflash.visible = true; screenflash.y = 0; screenflash.x = 0; screenflash.alpha = 1; } public function creategrenade(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int){ grenade[grenades] = new grenademc(); projectilecontainer.addChild(grenade[grenades]); grenade[grenades].active = true; grenade[grenades].visible = true; grenade[grenades].side = _arg6; grenade[grenades].x = _arg1; grenade[grenades].y = _arg2; grenade[grenades].rotation = (Math.random() * 360); grenade[grenades].playedsounds = 0; grenade[grenades].livetime = 0; grenade[grenades].rotatespeed = _arg5; grenade[grenades].pointnum = points; createpoint(_arg1, _arg2, grenadeaf, grenadeg, grenadef, true, -1, false); p[point[grenade[grenades].pointnum].firstpnum].x = (p[point[grenade[grenades].pointnum].firstpnum].x + vectorx2(_arg3, _arg4)); p[point[grenade[grenades].pointnum].firstpnum].y = (p[point[grenade[grenades].pointnum].firstpnum].y + vectory2(_arg3, _arg4)); grenades = (grenades + 1); } public function createbullet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int, _arg7:Number, _arg8:Number, _arg9:Boolean):Boolean{ foundbullet = -1; i = 0; while (i < bullets) { if (bullet[i].active == false){ foundbullet = i; i = (bullets + 1); }; i = (i + 1); }; hitsomething = false; if (foundbullet > -1){ bullet[foundbullet].x2 = (_arg1 + vectorx2(_arg3, _arg4)); bullet[foundbullet].y2 = (_arg2 + vectory2(_arg3, _arg4)); if (segmentcollide(_arg1, _arg2, bullet[foundbullet].x2, bullet[foundbullet].y2) == true){ hitsomething = true; bullet[foundbullet].x2 = bestcx; bullet[foundbullet].y2 = bestcy; }; bullet[foundbullet].active = true; bullet[foundbullet].side = _arg6; bullet[foundbullet].damage = _arg5; bullet[foundbullet].x1 = _arg1; bullet[foundbullet].y1 = _arg2; bullet[foundbullet].dismember = _arg9; bullet[foundbullet].direction = directiontopoint(bullet[foundbullet].x1, bullet[foundbullet].y1, bullet[foundbullet].x2, bullet[foundbullet].y2); drawline(bullet[foundbullet].x1, bullet[foundbullet].y1, bullet[foundbullet].x2, bullet[foundbullet].y2, _arg7, _arg8); } else { bullet[bullets] = new Object(); bullet[bullets].x2 = (_arg1 + vectorx2(_arg3, _arg4)); bullet[bullets].y2 = (_arg2 + vectory2(_arg3, _arg4)); if (segmentcollide(_arg1, _arg2, bullet[bullets].x2, bullet[bullets].y2) == true){ hitsomething = true; bullet[bullets].x2 = bestcx; bullet[bullets].y2 = bestcy; }; bullet[bullets].active = true; bullet[bullets].x1 = _arg1; bullet[bullets].y1 = _arg2; bullet[bullets].dismember = _arg9; bullet[bullets].direction = directiontopoint(bullet[bullets].x1, bullet[bullets].y1, bullet[bullets].x2, bullet[bullets].y2); bullet[bullets].side = _arg6; bullet[bullets].damage = _arg5; drawline(bullet[bullets].x1, bullet[bullets].y1, bullet[bullets].x2, bullet[bullets].y2, _arg7, _arg8); bullets = (bullets + 1); }; impactx = bestcx; impacty = bestcy; return (hitsomething); } public function createsmgammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ smgammo[smgammos] = new smgammomc(); pickupscontainer.addChild(smgammo[smgammos]); smgammo[smgammos].active = true; smgammo[smgammos].visible = true; smgammo[smgammos].fade = _arg3; smgammo[smgammos].x = -500; smgammo[smgammos].y = -500; smgammo[smgammos].livetime = 0; smgammo[smgammos].boxnum = boxes; createbox(_arg1, _arg2, smgammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); smgammos = (smgammos + 1); } public function rpgsmoke(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 2) + 2), Math.random(), Math.random(), 0.95, -0.1, ((Math.random() * 10) + 30), muzzlesmokecolor, true); } public function stopflash(){ screenflash.active = false; screenflash.visible = false; } public function createfire(_arg1:Number, _arg2:Number, _arg3:int){ fire[fires] = new Object(); fire[fires].x = _arg1; fire[fires].y = _arg2; fire[fires].delay = 0; fire[fires].active = true; fire[fires].livetime = 0; fire[fires].maxlivetime = _arg3; fires = (fires + 1); } public function fireparticles(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 4) + 8), (Math.random() * 360), Math.random(), 0.95, -0.1, ((Math.random() * 20) + 40), 0x3C3C3C, false); creategp(_arg1, (_arg2 + 5), ((Math.random() * 10) + 5), ((Math.random() * 90) + 45), (Math.random() + 1), 0.9, -0.05, ((Math.random() * 10) + 10), 16489988, false); } public function moregamesbtnclick(_arg1){ navigateToURL(url, "_blank"); } public function optionsbtnclick(_arg1){ gotoAndPlay(4); } public function zombiefire(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 4) + 8), (Math.random() * 360), Math.random(), 0.95, -0.2, ((Math.random() * 10) + 10), 0x3C3C3C, true); creategp(_arg1, (_arg2 + 5), ((Math.random() * 4) + 8), (Math.random() * 360), (Math.random() + 1), 0.9, -0.1, ((Math.random() * 5) + 5), 16489988, true); } public function mofunzonebtnclick(_arg1){ navigateToURL(url, "_blank"); } public function pistolimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 1) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 5) + 5), 0, 0, 0, 0, 4, impactflashcolor, false); } public function resetgame(){ var _local1:uint; scaleY = 1; scaleX = 1; x = 0; y = 0; pickuptextdelay = 0; pickuptext = ""; messagetextdelay = 0; messagetext = ""; messagestring = ""; ammotext = ""; healthtext = ""; inmap = false; deathcounter = 0; cursor.active = true; cursor.visible = true; wateraffectors = 0; ps = 0; _local1 = 0; _local1 = 0; while (_local1 < drawnlines) { if (vdrawnline[_local1].parent != null){ vdrawnline[_local1].parent.removeChild(vdrawnline[_local1]); }; _local1 = (_local1 + 1); }; drawnlines = 0; _local1 = 0; while (_local1 < gps) { if (vgp[_local1].parent != null){ vgp[_local1].parent.removeChild(vgp[_local1]); }; _local1 = (_local1 + 1); }; gps = 0; _local1 = 0; while (_local1 < objectlines) { objectline[_local1].active = false; if (vobjectline[_local1].parent != null){ vobjectline[_local1].parent.removeChild(vobjectline[_local1]); }; _local1 = (_local1 + 1); }; objectlines = 0; _local1 = 0; while (_local1 < points) { point[_local1].active = false; if (vpoint[_local1].parent != null){ vpoint[_local1].parent.removeChild(vpoint[_local1]); }; _local1 = (_local1 + 1); }; points = 0; _local1 = 0; while (_local1 < lines) { if (vline[_local1].parent != null){ vline[_local1].parent.removeChild(vline[_local1]); }; _local1 = (_local1 + 1); }; lines = 0; _local1 = 0; while (_local1 < ropes) { if (vrope[_local1].parent != null){ vrope[_local1].parent.removeChild(vrope[_local1]); }; _local1 = (_local1 + 1); }; ropes = 0; _local1 = 0; while (_local1 < collisionlines) { if (vcollisionline[_local1].parent != null){ vcollisionline[_local1].parent.removeChild(vcollisionline[_local1]); }; _local1 = (_local1 + 1); }; collisionlines = 0; _local1 = 0; while (_local1 < boxes) { if (vbox[_local1].parent != null){ vbox[_local1].parent.removeChild(vbox[_local1]); }; _local1 = (_local1 + 1); }; boxes = 0; _local1 = 0; while (_local1 < hinges) { if (vhinge[_local1].parent != null){ vhinge[_local1].parent.removeChild(vhinge[_local1]); }; _local1 = (_local1 + 1); }; hinges = 0; _local1 = 0; while (_local1 < waterpools) { if (vwaterpool[_local1].parent != null){ vwaterpool[_local1].parent.removeChild(vwaterpool[_local1]); }; _local1 = (_local1 + 1); }; waterpools = 0; _local1 = 0; while (_local1 < ragdolls) { if (vragdoll[_local1].parent != null){ vragdoll[_local1].parent.removeChild(vragdoll[_local1]); }; _local1 = (_local1 + 1); }; ragdolls = 0; players = 0; _local1 = 0; while (_local1 < bodyAs) { if (bodyA[_local1].parent != null){ bodyA[_local1].parent.removeChild(bodyA[_local1]); }; _local1 = (_local1 + 1); }; bodyAs = 0; _local1 = 0; while (_local1 < bodyBs) { if (bodyB[_local1].parent != null){ bodyB[_local1].parent.removeChild(bodyB[_local1]); }; _local1 = (_local1 + 1); }; bodyBs = 0; _local1 = 0; while (_local1 < bodyCs) { if (bodyC[_local1].parent != null){ bodyC[_local1].parent.removeChild(bodyC[_local1]); }; _local1 = (_local1 + 1); }; bodyCs = 0; _local1 = 0; while (_local1 < bodyDs) { if (bodyD[_local1].parent != null){ bodyD[_local1].parent.removeChild(bodyD[_local1]); }; _local1 = (_local1 + 1); }; bodyDs = 0; _local1 = 0; while (_local1 < legAs) { if (legA[_local1].parent != null){ legA[_local1].parent.removeChild(legA[_local1]); }; _local1 = (_local1 + 1); }; legAs = 0; _local1 = 0; while (_local1 < legBs) { if (legB[_local1].parent != null){ legB[_local1].parent.removeChild(legB[_local1]); }; _local1 = (_local1 + 1); }; legBs = 0; _local1 = 0; while (_local1 < legCs) { if (legC[_local1].parent != null){ legC[_local1].parent.removeChild(legC[_local1]); }; _local1 = (_local1 + 1); }; legCs = 0; _local1 = 0; while (_local1 < legDs) { if (legD[_local1].parent != null){ legD[_local1].parent.removeChild(legD[_local1]); }; _local1 = (_local1 + 1); }; legDs = 0; _local1 = 0; while (_local1 < torsos) { if (torso[_local1].parent != null){ torso[_local1].parent.removeChild(torso[_local1]); }; _local1 = (_local1 + 1); }; torsos = 0; _local1 = 0; while (_local1 < upperlegs) { if (upperleg[_local1].parent != null){ upperleg[_local1].parent.removeChild(upperleg[_local1]); }; _local1 = (_local1 + 1); }; upperlegs = 0; _local1 = 0; while (_local1 < lowerlegs) { if (lowerleg[_local1].parent != null){ lowerleg[_local1].parent.removeChild(lowerleg[_local1]); }; _local1 = (_local1 + 1); }; lowerlegs = 0; _local1 = 0; while (_local1 < upperarms) { if (upperarm[_local1].parent != null){ upperarm[_local1].parent.removeChild(upperarm[_local1]); }; _local1 = (_local1 + 1); }; upperarms = 0; _local1 = 0; while (_local1 < lowerarms) { if (lowerarm[_local1].parent != null){ lowerarm[_local1].parent.removeChild(lowerarm[_local1]); }; _local1 = (_local1 + 1); }; lowerarms = 0; _local1 = 0; while (_local1 < heads) { if (head[_local1].parent != null){ head[_local1].parent.removeChild(head[_local1]); }; _local1 = (_local1 + 1); }; heads = 0; _local1 = 0; while (_local1 < rifles) { if (rifle[_local1].parent != null){ rifle[_local1].parent.removeChild(rifle[_local1]); }; _local1 = (_local1 + 1); }; rifles = 0; _local1 = 0; while (_local1 < smgs) { if (smg[_local1].parent != null){ smg[_local1].parent.removeChild(smg[_local1]); }; _local1 = (_local1 + 1); }; smgs = 0; _local1 = 0; while (_local1 < pistols) { if (pistol[_local1].parent != null){ pistol[_local1].parent.removeChild(pistol[_local1]); }; _local1 = (_local1 + 1); }; pistols = 0; _local1 = 0; while (_local1 < chainsaws) { if (chainsaw[_local1].parent != null){ chainsaw[_local1].parent.removeChild(chainsaw[_local1]); }; _local1 = (_local1 + 1); }; chainsaws = 0; _local1 = 0; while (_local1 < shotguns) { if (shotgun[_local1].parent != null){ shotgun[_local1].parent.removeChild(shotgun[_local1]); }; _local1 = (_local1 + 1); }; shotguns = 0; _local1 = 0; while (_local1 < nailguns) { if (nailgun[_local1].parent != null){ nailgun[_local1].parent.removeChild(nailgun[_local1]); }; _local1 = (_local1 + 1); }; nailguns = 0; _local1 = 0; while (_local1 < rpgs) { if (rpg[_local1].parent != null){ rpg[_local1].parent.removeChild(rpg[_local1]); }; _local1 = (_local1 + 1); }; rpgs = 0; _local1 = 0; while (_local1 < grenades) { if (grenade[_local1].parent != null){ grenade[_local1].parent.removeChild(grenade[_local1]); }; _local1 = (_local1 + 1); }; _local1 = 0; while (_local1 < nails) { if (nail[_local1].parent != null){ nail[_local1].parent.removeChild(nail[_local1]); }; _local1 = (_local1 + 1); }; _local1 = 0; while (_local1 < rockets) { if (rocket[_local1].parent != null){ rocket[_local1].parent.removeChild(rocket[_local1]); }; _local1 = (_local1 + 1); }; lasers = 0; rockets = 0; nails = 0; movetrails = 0; grenades = 0; blasts = 0; bullets = 0; hitzones = 0; hits = 0; enemyAs = 0; enemyBs = 0; enemyCs = 0; _local1 = 0; while (_local1 < turretbases) { if (turretbase[_local1].parent != null){ turretbase[_local1].parent.removeChild(turretbase[_local1]); }; if (turretbarrel[_local1].parent != null){ turretbarrel[_local1].parent.removeChild(turretbarrel[_local1]); }; _local1 = (_local1 + 1); }; turretbarrels = 0; turretbases = 0; _local1 = 0; while (_local1 < megazombies) { if (megazombie[_local1].parent != null){ megazombie[_local1].parent.removeChild(megazombie[_local1]); }; if (megazombiegun[_local1].parent != null){ megazombiegun[_local1].parent.removeChild(megazombiegun[_local1]); }; _local1 = (_local1 + 1); }; megazombies = 0; megazombieguns = 0; chaindebriss = 0; _local1 = 0; while (_local1 < strings) { if (vstring[_local1].parent != null){ vstring[_local1].parent.removeChild(vstring[_local1]); }; _local1 = (_local1 + 1); }; strings = 0; _local1 = 0; while (_local1 < pointdebriss) { if (pointdebris[_local1].parent != null){ pointdebris[_local1].parent.removeChild(pointdebris[_local1]); }; _local1 = (_local1 + 1); }; pointdebriss = 0; _local1 = 0; while (_local1 < linedebriss) { if (linedebris[_local1].parent != null){ linedebris[_local1].parent.removeChild(linedebris[_local1]); }; _local1 = (_local1 + 1); }; linedebriss = 0; _local1 = 0; while (_local1 < boxdebriss) { if (boxdebris[_local1].parent != null){ boxdebris[_local1].parent.removeChild(boxdebris[_local1]); }; _local1 = (_local1 + 1); }; boxdebriss = 0; chaindebriss = 0; limbs = 0; corpses = 0; _local1 = 0; while (_local1 < bulletcasings) { if (bulletcasing[_local1].parent != null){ bulletcasing[_local1].parent.removeChild(bulletcasing[_local1]); }; _local1 = (_local1 + 1); }; bulletcasings = 0; chains = 0; _local1 = 0; while (_local1 < links) { if (link[_local1].parent != null){ link[_local1].parent.removeChild(link[_local1]); }; _local1 = (_local1 + 1); }; links = 0; _local1 = 0; while (_local1 < healths) { if (health[_local1].parent != null){ health[_local1].parent.removeChild(health[_local1]); }; _local1 = (_local1 + 1); }; healths = 0; _local1 = 0; while (_local1 < shotgunammos) { if (shotgunammo[_local1].parent != null){ shotgunammo[_local1].parent.removeChild(shotgunammo[_local1]); }; _local1 = (_local1 + 1); }; shotgunammos = 0; _local1 = 0; while (_local1 < smgammos) { if (smgammo[_local1].parent != null){ smgammo[_local1].parent.removeChild(smgammo[_local1]); }; _local1 = (_local1 + 1); }; smgammos = 0; _local1 = 0; while (_local1 < pistolammos) { if (pistolammo[_local1].parent != null){ pistolammo[_local1].parent.removeChild(pistolammo[_local1]); }; _local1 = (_local1 + 1); }; pistolammos = 0; _local1 = 0; while (_local1 < grenadeammos) { if (grenadeammo[_local1].parent != null){ grenadeammo[_local1].parent.removeChild(grenadeammo[_local1]); }; _local1 = (_local1 + 1); }; grenadeammos = 0; _local1 = 0; while (_local1 < rifleammos) { if (rifleammo[_local1].parent != null){ rifleammo[_local1].parent.removeChild(rifleammo[_local1]); }; _local1 = (_local1 + 1); }; rifleammos = 0; _local1 = 0; while (_local1 < nailgunammos) { if (nailgunammo[_local1].parent != null){ nailgunammo[_local1].parent.removeChild(nailgunammo[_local1]); }; _local1 = (_local1 + 1); }; nailgunammos = 0; schannel.stop(); loopchannel.stop(); loopchannel2.stop(); nodes = 0; winzones = 0; killzones = 0; damagezones = 0; _local1 = 0; while (_local1 < walldoors) { if (walldoor[_local1].parent != null){ walldoor[_local1].parent.removeChild(walldoor[_local1]); }; _local1 = (_local1 + 1); }; walldoors = 0; _local1 = 0; while (_local1 < floordoors) { if (floordoor[_local1].parent != null){ floordoor[_local1].parent.removeChild(floordoor[_local1]); }; _local1 = (_local1 + 1); }; floordoors = 0; _local1 = 0; while (_local1 < spinlights) { if (spinlight[_local1].parent != null){ spinlight[_local1].parent.removeChild(spinlight[_local1]); }; _local1 = (_local1 + 1); }; spinlights = 0; _local1 = 0; while (_local1 < barrels) { if (barrel[_local1].parent != null){ barrel[_local1].parent.removeChild(barrel[_local1]); }; _local1 = (_local1 + 1); }; barrels = 0; _local1 = 0; while (_local1 < crates) { if (crate[_local1].parent != null){ crate[_local1].parent.removeChild(crate[_local1]); }; _local1 = (_local1 + 1); }; crates = 0; _local1 = 0; while (_local1 < computers) { if (computer[_local1].parent != null){ computer[_local1].parent.removeChild(computer[_local1]); }; _local1 = (_local1 + 1); }; computers = 0; _local1 = 0; while (_local1 < cities) { if (city[_local1].parent != null){ city[_local1].parent.removeChild(city[_local1]); }; _local1 = (_local1 + 1); }; cities = 0; stoprain(); stopfade(); stopfog(); stopflash(); stopberserkscreen(); fires = 0; _local1 = 0; while (_local1 < rats) { if (rat[_local1].parent != null){ rat[_local1].parent.removeChild(rat[_local1]); }; _local1 = (_local1 + 1); }; rats = 0; _local1 = 0; while (_local1 < crows) { if (crow[_local1].parent != null){ crow[_local1].parent.removeChild(crow[_local1]); }; if (crowwing[_local1].parent != null){ crowwing[_local1].parent.removeChild(crowwing[_local1]); }; _local1 = (_local1 + 1); }; crows = 0; crowwings = 0; } public function megazombieexhaustparticles(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 4) + 8), ((Math.random() * 60) + 240), ((Math.random() * 1) + 1), 0.96, 0.01, ((Math.random() * 10) + 20), 0x8C8C8C, true); } public function startfade(){ fade.active = true; fade.visible = true; fade.y = 0; fade.x = 0; fade.alpha = 1; } public function physicspush(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){ var _local6:Number; var _local7:uint; var _local8:uint; var _local9:Number; var _local10:Number; var _local11:Number; _local6 = _arg5; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = 0; if (_local6 > maxdelta){ _local6 = maxdelta; }; _local7 = 0; while (_local7 < ropes) { if (rope[_local7].active == true){ _local9 = 0; _local10 = 0; _local8 = rope[_local7].firstpnum; while (_local8 < (rope[_local7].firstpnum + rope[_local7].segments)) { _local9 = (_local9 + p[_local8].x); _local10 = (_local10 + p[_local8].y); _local8 = (_local8 + 1); }; _local9 = (_local9 / rope[_local7].segments); _local10 = (_local10 / rope[_local7].segments); if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + rope[_local7].maxlength)){ if (rope[_local7].atrest == false){ _local8 = rope[_local7].firstpnum; while (_local8 < (rope[_local7].firstpnum + rope[_local7].segments)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; rope[_local7].restcounter = 0; rope[_local7].atrest = false; _local8 = rope[_local7].firstpnum; while (_local8 < (rope[_local7].firstpnum + rope[_local7].segments)) { p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < ragdolls) { if (ragdoll[_local7].active == true){ _local9 = ((p[(ragdoll[_local7].firstpnum + 4)].x + p[(ragdoll[_local7].firstpnum + 5)].x) * 0.5); _local10 = ((p[(ragdoll[_local7].firstpnum + 4)].y + p[(ragdoll[_local7].firstpnum + 5)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + (ragdollheight * 2))){ if (ragdoll[_local7].atrest == false){ _local8 = ragdoll[_local7].firstpnum; while (_local8 < (ragdoll[_local7].firstpnum + 14)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; ragdoll[_local7].restcounter = 0; wateraffector[ragdoll[_local7].wateraffectornum].active = true; ragdoll[_local7].atrest = false; _local8 = ragdoll[_local7].firstpnum; while (_local8 < (ragdoll[_local7].firstpnum + 14)) { if (p[_local8].destroyed == false){ p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < boxes) { if (box[_local7].active == true){ _local9 = ((p[box[_local7].firstpnum].x + p[(box[_local7].firstpnum + 2)].x) * 0.5); _local10 = ((p[box[_local7].firstpnum].y + p[(box[_local7].firstpnum + 2)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + box[_local7].sidelength)){ if (box[_local7].atrest == false){ _local8 = box[_local7].firstpnum; while (_local8 < (box[_local7].firstpnum + 4)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; wateraffector[box[_local7].wateraffectornum].active = true; box[_local7].restcounter = 0; box[_local7].atrest = false; _local8 = box[_local7].firstpnum; while (_local8 < (box[_local7].firstpnum + 4)) { p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < hinges) { if (hinge[_local7].active == true){ _local9 = p[(hinge[_local7].firstpnum + 1)].x; _local10 = p[(hinge[_local7].firstpnum + 1)].y; if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + hinge[_local7].hingelength)){ if (hinge[_local7].atrest == false){ _local8 = hinge[_local7].firstpnum; while (_local8 < (hinge[_local7].firstpnum + 3)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; hinge[_local7].restcounter = 0; hinge[_local7].atrest = false; _local8 = hinge[_local7].firstpnum; while (_local8 < (hinge[_local7].firstpnum + 3)) { p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < lines) { if (line[_local7].active == true){ _local9 = ((p[line[_local7].firstpnum].x + p[(line[_local7].firstpnum + 1)].x) * 0.5); _local10 = ((p[line[_local7].firstpnum].y + p[(line[_local7].firstpnum + 1)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + line[_local7].linelength)){ if (line[_local7].atrest == false){ _local8 = line[_local7].firstpnum; while (_local8 < (line[_local7].firstpnum + 2)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; line[_local7].restcounter = 0; line[_local7].atrest = false; _local8 = line[_local7].firstpnum; while (_local8 < (line[_local7].firstpnum + 2)) { p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < points) { if (point[_local7].active == true){ _local9 = p[point[_local7].firstpnum].x; _local10 = p[point[_local7].firstpnum].y; if (approxdistance(_arg1, _arg2, _local9, _local10) <= (_arg3 + safetydistance)){ if (point[_local7].atrest == false){ _local8 = point[_local7].firstpnum; while (_local8 < (point[_local7].firstpnum + 1)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; point[_local7].restcounter = 0; point[_local7].atrest = false; _local8 = point[_local7].firstpnum; while (_local8 < (point[_local7].firstpnum + 1)) { p[_local8].active = true; _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; _local7 = 0; while (_local7 < objectlines) { if (objectline[_local7].active == true){ _local9 = ((p[objectline[_local7].firstpnum].x + p[(objectline[_local7].firstpnum + 1)].x) * 0.5); _local10 = ((p[objectline[_local7].firstpnum].y + p[(objectline[_local7].firstpnum + 1)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local9, _local10) <= ((_arg3 + safetydistance) + objectline[_local7].yheight)){ _local8 = objectline[_local7].firstpnum; while (_local8 < (objectline[_local7].firstpnum + 2)) { _local11 = approxdistance(_arg1, _arg2, p[_local8].x, p[_local8].y); if (_local11 < _arg3){ p[_local8].x = (p[_local8].x + vectorx(_arg4, _local6)); p[_local8].y = (p[_local8].y + vectory(_arg4, _local6)); }; _local8 = (_local8 + 1); }; }; }; _local7 = (_local7 + 1); }; } public function findclosestp(_arg1:Number, _arg2:Number):int{ var _local3:Number; var _local4:int; var _local5:Number; var _local6:uint; _local3 = 0; _local4 = -1; _local5 = 10000; _local6 = 0; _local6 = 0; while (_local6 < ps) { if ((((p[_local6].active == true)) && ((p[_local6].destroyed == false)))){ _local3 = approxdistance(_arg1, _arg2, p[_local6].x, p[_local6].y); if (_local3 < _local5){ _local5 = _local3; _local4 = _local6; }; }; _local6 = (_local6 + 1); }; return (_local4); } public function turretimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 4) + 4), 0, 0, 0, 0, 3, impactflashcolor, false); } public function spawnenemies(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:uint){ if (countenemies() < 3){ if (Math.floor((Math.random() * enemychance)) == 0){ if (_arg4 == 0){ createenemyA(_arg1, _arg2, _arg3, true, false); }; if (_arg4 == 1){ createenemyB(_arg1, _arg2, _arg3, true, false); }; if (_arg4 == 2){ createenemyC(_arg1, _arg2, _arg3, true); }; }; }; } public function createwateraffector(_arg1:Number, _arg2:Number, _arg3:Number){ wateraffector[wateraffectors] = new Object(); wateraffector[wateraffectors].active = true; wateraffector[wateraffectors].x = _arg1; wateraffector[wateraffectors].y = _arg2; wateraffector[wateraffectors].ly = _arg2; wateraffector[wateraffectors].radius = _arg3; wateraffectors = (wateraffectors + 1); } public function pcollisions2(_arg1:uint){ var _local2:Number; var _local3:uint; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local2 = 10000; _local3 = 0; _local4 = 0; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local3 = 0; while (_local3 < possiblelines) { if (linecollide(p[_arg1].sx, p[_arg1].sy, p[_arg1].x, p[_arg1].y, collisionline[possiblelinenum[_local3]].x1, collisionline[possiblelinenum[_local3]].y1, collisionline[possiblelinenum[_local3]].x2, collisionline[possiblelinenum[_local3]].y2, collisionline[possiblelinenum[_local3]].slope) == true){ _local4 = approxdistance(cx, cy, p[_arg1].sx, p[_arg1].sy); if (_local4 < _local2){ _local2 = _local4; bestcx = cx; bestcy = cy; bestsurfacedirection = surfacedirection; }; }; _local3 = (_local3 + 1); }; if (_local2 < 10000){ _local5 = directiontopoint(p[_arg1].sx, p[_arg1].sy, bestcx, bestcy); _local6 = (approxdistance(p[_arg1].x, p[_arg1].y, p[_arg1].lx, p[_arg1].ly) * p[_arg1].f); _local7 = (approxdistance(p[_arg1].x, p[_arg1].y, bestcx, bestcy) * p[_arg1].f); _local6 = (_local6 - _local7); _local8 = Math.abs(finddirection(bestsurfacedirection, _local5)); if (_local8 > 90){ _local8 = correctdirection((bestsurfacedirection + 180)); } else { _local8 = bestsurfacedirection; }; _local10 = ((90 - Math.abs(finddirection(_local8, _local5))) / 90); _local7 = (Math.abs((_local7 * _local10)) + 0.001); _local6 = (Math.abs((_local6 * _local10)) + 0.001); _local9 = Math.abs(finddirection((bestsurfacedirection + 90), _local5)); if (_local9 < 90){ _local9 = correctdirection((bestsurfacedirection - 90)); } else { _local9 = correctdirection((bestsurfacedirection + 90)); }; p[_arg1].sx = (bestcx + vectorx(_local9, 1)); p[_arg1].sy = (bestcy + vectory(_local9, 1)); p[_arg1].x = (p[_arg1].sx + vectorx(_local8, _local7)); p[_arg1].y = (p[_arg1].sy + vectory(_local8, _local7)); p[_arg1].lx = (p[_arg1].sx - vectorx(_local8, _local6)); p[_arg1].ly = (p[_arg1].sy - vectory(_local8, _local6)); } else { p[_arg1].sy = p[_arg1].y; p[_arg1].sx = p[_arg1].x; }; } public function crateexplosion(_arg1:Number, _arg2:Number){ smallcrash.play(); q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 8) + 16), (Math.random() * 360), (Math.random() * 2), 0.975, -0.03, ((Math.random() * 20) + 20), 11643546, true); q = (q + 1); }; } public function reducedbtn0click(_arg1){ graphicsquality = 1; } public function createnailgunammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ nailgunammo[nailgunammos] = new nailgunammomc(); pickupscontainer.addChild(nailgunammo[nailgunammos]); nailgunammo[nailgunammos].active = true; nailgunammo[nailgunammos].visible = true; nailgunammo[nailgunammos].fade = _arg3; nailgunammo[nailgunammos].x = -500; nailgunammo[nailgunammos].y = -500; nailgunammo[nailgunammos].livetime = 0; nailgunammo[nailgunammos].boxnum = boxes; createbox(_arg1, _arg2, nailgunammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); nailgunammos = (nailgunammos + 1); } public function dismembermentcheck(_arg1:Number, _arg2:Number){ if (Math.floor((Math.random() * 2)) == 0){ if ((((_arg1 >= ((_arg2 + necklength) + vectory(216, chestlength)))) && ((_arg1 < (((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength))))){ leftarmdamage = 2; }; if ((((_arg1 >= (((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength))) && ((_arg1 < ((((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength) + lowerarmlength))))){ leftarmdamage = 1; }; } else { if ((((_arg1 >= ((_arg2 + necklength) + vectory(216, chestlength)))) && ((_arg1 < (((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength))))){ rightarmdamage = 2; }; if ((((_arg1 >= (((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength))) && ((_arg1 < ((((_arg2 + necklength) + vectory(216, chestlength)) + upperarmlength) + lowerarmlength))))){ rightarmdamage = 1; }; }; if (Math.floor((Math.random() * 2)) == 0){ if ((((_arg1 >= ((_arg2 + necklength) + vectory(288, chestconstraint)))) && ((_arg1 < (((_arg2 + necklength) + vectory(288, chestconstraint)) + upperleglength))))){ leftlegdamage = 2; }; if ((((_arg1 >= (((_arg2 + necklength) + vectory(288, chestconstraint)) + upperleglength))) && ((_arg1 < ((((_arg2 + necklength) + vectory(288, chestconstraint)) + lowerleglength) + upperleglength))))){ leftlegdamage = 1; }; } else { if ((((_arg1 >= ((_arg2 + necklength) + vectory(288, chestconstraint)))) && ((_arg1 < (((_arg2 + necklength) + vectory(288, chestconstraint)) + upperleglength))))){ rightlegdamage = 2; }; if ((((_arg1 >= (((_arg2 + necklength) + vectory(288, chestconstraint)) + upperleglength))) && ((_arg1 < ((((_arg2 + necklength) + vectory(288, chestconstraint)) + lowerleglength) + upperleglength))))){ rightlegdamage = 1; }; }; } public function berserksparks(_arg1:Number, _arg2:Number){ creategp(_arg1, (_arg2 + (Math.random() * 24)), ((Math.random() * 2) + 2), (Math.random() * 360), (Math.random() * 2), 1, 0, ((Math.random() * 5) + 5), 65382, true); } public function createsmg(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ smg[smgs] = new smgmc(); weaponscontainer.addChild(smg[smgs]); smg[smgs].active = true; smg[smgs].visible = true; smg[smgs].fade = _arg5; smg[smgs].facedirection = _arg3; if (_arg3 == 1){ smg[smgs].scaleX = -1; }; smg[smgs].x = -1000; smg[smgs].y = -1000; smg[smgs].livetime = 0; smg[smgs].pointdirection = _arg4; smg[smgs].linenum = lines; createline((_arg1 - vectorx(_arg4, (smglength * 0.5))), (_arg2 - vectory(_arg4, (smglength * 0.5))), (_arg1 + vectorx(_arg4, (smglength * 0.5))), (_arg2 + vectory(_arg4, (smglength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); smgs = (smgs + 1); } public function createragdoll(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:int, _arg8:Boolean, _arg9:uint, _arg10:uint, _arg11:uint, _arg12:uint){ var _local13:Number; var _local14:Number; var _local15:uint; _local13 = 0; _local14 = 0; ragdoll[ragdolls] = new Object(); vragdoll[ragdolls] = new Shape(); physicscontainer.addChild(vragdoll[ragdolls]); if (_arg6 == true){ ragdoll[ragdolls].atrest = false; } else { ragdoll[ragdolls].atrest = true; }; ragdoll[ragdolls].leftarmsegments = _arg9; ragdoll[ragdolls].rightarmsegments = _arg10; ragdoll[ragdolls].leftlegsegments = _arg11; ragdoll[ragdolls].rightlegsegments = _arg12; ragdoll[ragdolls].ignorecollisions = _arg8; ragdoll[ragdolls].restcounter = 0; ragdoll[ragdolls].deformed = false; ragdoll[ragdolls].x = _arg1; ragdoll[ragdolls].y = _arg2; ragdoll[ragdolls].active = true; ragdoll[ragdolls].wateraffectornum = wateraffectors; ragdoll[ragdolls].firstpnum = ps; createp(_arg1, (_arg2 + ragdollheight), _arg1, _arg2, _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), _arg1, (_arg2 + necklength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), (_arg1 + vectorx(324, chestlength)), ((_arg2 + necklength) + vectory(324, chestlength)), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), (_arg1 + vectorx(216, chestlength)), ((_arg2 + necklength) + vectory(216, chestlength)), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), (_arg1 + vectorx(288, chestconstraint)), ((_arg2 + necklength) + vectory(288, chestconstraint)), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), (_arg1 + vectorx(252, chestconstraint)), ((_arg2 + necklength) + vectory(252, chestconstraint)), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + upperleglength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + upperleglength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + lowerleglength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + lowerleglength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 8)].x, (p[(ps - 8)].y + upperarmlength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 8)].x, (p[(ps - 8)].y + upperarmlength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + lowerarmlength), _arg3, _arg4, _arg5, _arg6); createp(_arg1, (_arg2 + ragdollheight), p[(ps - 2)].x, (p[(ps - 2)].y + lowerarmlength), _arg3, _arg4, _arg5, _arg6); if (ragdoll[ragdolls].leftarmsegments == 0){ p[(ragdoll[ragdolls].firstpnum + 11)].active = false; p[(ragdoll[ragdolls].firstpnum + 13)].active = false; p[(ragdoll[ragdolls].firstpnum + 11)].destroyed = true; p[(ragdoll[ragdolls].firstpnum + 13)].destroyed = true; }; if (ragdoll[ragdolls].leftarmsegments == 1){ p[(ragdoll[ragdolls].firstpnum + 13)].active = false; p[(ragdoll[ragdolls].firstpnum + 13)].destroyed = true; }; if (ragdoll[ragdolls].rightarmsegments == 0){ p[(ragdoll[ragdolls].firstpnum + 10)].active = false; p[(ragdoll[ragdolls].firstpnum + 12)].active = false; p[(ragdoll[ragdolls].firstpnum + 10)].destroyed = true; p[(ragdoll[ragdolls].firstpnum + 12)].destroyed = true; }; if (ragdoll[ragdolls].rightarmsegments == 1){ p[(ragdoll[ragdolls].firstpnum + 12)].active = false; p[(ragdoll[ragdolls].firstpnum + 12)].destroyed = true; }; if (ragdoll[ragdolls].leftlegsegments == 0){ p[(ragdoll[ragdolls].firstpnum + 7)].active = false; p[(ragdoll[ragdolls].firstpnum + 9)].active = false; p[(ragdoll[ragdolls].firstpnum + 7)].destroyed = true; p[(ragdoll[ragdolls].firstpnum + 9)].destroyed = true; }; if (ragdoll[ragdolls].leftlegsegments == 1){ p[(ragdoll[ragdolls].firstpnum + 9)].active = false; p[(ragdoll[ragdolls].firstpnum + 9)].destroyed = true; }; if (ragdoll[ragdolls].rightlegsegments == 0){ p[(ragdoll[ragdolls].firstpnum + 6)].active = false; p[(ragdoll[ragdolls].firstpnum + 8)].active = false; p[(ragdoll[ragdolls].firstpnum + 6)].destroyed = true; p[(ragdoll[ragdolls].firstpnum + 8)].destroyed = true; }; if (ragdoll[ragdolls].rightlegsegments == 1){ p[(ragdoll[ragdolls].firstpnum + 8)].active = false; p[(ragdoll[ragdolls].firstpnum + 8)].destroyed = true; }; createwateraffector(_arg1, (_arg2 + ragdollheight), ragdollheight); if (_arg7 > -1){ _local13 = (p[_arg7].x - p[_arg7].lx); _local14 = (p[_arg7].y - p[_arg7].ly); _local15 = (ps - 14); _local15 = (ps - 14); while (_local15 < ps) { p[_local15].lx = (p[_local15].lx - _local13); p[_local15].ly = (p[_local15].ly - _local14); _local15 = (_local15 + 1); }; }; ragdolls = (ragdolls + 1); } public function fullbtn0click(_arg1){ graphicsquality = 0; } public function createrocket(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){ rocket[rockets] = new rocketmc(); projectilecontainer.addChild(rocket[rockets]); rocket[rockets].side = _arg4; rocket[rockets].active = true; rocket[rockets].visible = true; rocket[rockets].x = _arg1; rocket[rockets].y = _arg2; rocket[rockets].livetime = 0; rocket[rockets].direction = _arg3; rocket[rockets].rotation = -(_arg3); rocket[rockets].side = _arg4; rocket[rockets].hs = vectorx2(_arg3, rocketspeed); rocket[rockets].vs = vectory2(_arg3, rocketspeed); rockets = (rockets + 1); } public function chainsawpuff(_arg1:Number, _arg2:Number){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 3) + 3), (Math.random() * 180), Math.random(), 1, -0.1, ((Math.random() * 10) + 10), impactsmokecolor, true); q = (q + 1); }; } public function mediumbtnclick(_arg1){ difficulty = 1; wait = -5; gotoAndPlay(6); } public function vectorx2(_arg1:Number, _arg2:Number):Number{ return ((Math.cos((_arg1 * degtorad)) * _arg2)); } public function drawline(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ var founddrawnline:int; var d:uint; var x1 = _arg1; var y1 = _arg2; var x2 = _arg3; var y2 = _arg4; var linecolor = _arg5; var linealpha = _arg6; founddrawnline = -1; d = 0; d = 0; while (d < drawnlines) { if (drawnline[d].active == false){ founddrawnline = d; d = (drawnlines + 1); }; d = (d + 1); }; if (founddrawnline > -1){ drawnline[founddrawnline].active = true; vdrawnline[founddrawnline].visible = true; drawnline[founddrawnline].x = x1; drawnline[founddrawnline].y = y1; vdrawnline[founddrawnline].x = x1; vdrawnline[founddrawnline].y = y1; var _local8 = vdrawnline[founddrawnline].graphics; with (_local8) { clear(); lineStyle(1, linecolor, linealpha); lineTo((x2 - x1), (y2 - y1)); }; } else { vdrawnline[drawnlines] = new Shape(); drawnline[drawnlines] = new Object(); physicscontainer.addChild(vdrawnline[drawnlines]); _local8 = vdrawnline[drawnlines].graphics; with (_local8) { lineStyle(1, linecolor, linealpha); lineTo((x2 - x1), (y2 - y1)); }; drawnline[drawnlines].active = true; vdrawnline[drawnlines].visible = true; drawnline[drawnlines].x = x1; drawnline[drawnlines].y = y1; vdrawnline[drawnlines].x = x1; vdrawnline[drawnlines].y = y1; drawnlines = (drawnlines + 1); }; } public function createrifle(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:Boolean, _arg6:int){ rifle[rifles] = new riflemc(); weaponscontainer.addChild(rifle[rifles]); rifle[rifles].active = true; rifle[rifles].visible = true; rifle[rifles].fade = _arg5; rifle[rifles].facedirection = _arg3; if (_arg3 == 1){ rifle[rifles].scaleX = -1; }; rifle[rifles].x = -1000; rifle[rifles].y = -1000; rifle[rifles].livetime = 0; rifle[rifles].pointdirection = _arg4; rifle[rifles].linenum = lines; createline((_arg1 - vectorx(_arg4, (riflelength * 0.5))), (_arg2 - vectory(_arg4, (riflelength * 0.5))), (_arg1 + vectorx(_arg4, (riflelength * 0.5))), (_arg2 + vectory(_arg4, (riflelength * 0.5))), weaponaf, weapong, weaponf, _arg5, _arg6, false); rifles = (rifles + 1); } public function createlaser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){ laser[lasers] = new Object(); laser[lasers].side = _arg4; laser[lasers].active = true; laser[lasers].visible = true; laser[lasers].x = _arg1; laser[lasers].y = _arg2; laser[lasers].livetime = 0; laser[lasers].side = _arg4; laser[lasers].hs = vectorx2(_arg3, laserspeed); laser[lasers].vs = vectory2(_arg3, laserspeed); lasers = (lasers + 1); } public function vectory2(_arg1:Number, _arg2:Number):Number{ return ((-(Math.sin((_arg1 * degtorad))) * _arg2)); } public function createbox(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean, _arg8:int, _arg9:Boolean){ var _local10:Number; var _local11:Number; var _local12:uint; _local10 = 0; _local11 = 0; box[boxes] = new Object(); vbox[boxes] = new Shape(); physicscontainer.addChild(vbox[boxes]); box[boxes].restcounter = 0; if (_arg7 == true){ box[boxes].atrest = false; } else { box[boxes].atrest = true; }; box[boxes].ignorecollisions = _arg9; box[boxes].x = _arg1; box[boxes].y = _arg2; box[boxes].active = true; box[boxes].sidelength = _arg3; box[boxes].firstpnum = ps; box[boxes].wateraffectornum = wateraffectors; createp(_arg1, _arg2, (_arg1 - (_arg3 * 0.5)), (_arg2 - (_arg3 * 0.5)), _arg4, _arg5, _arg6, _arg7); createp(_arg1, _arg2, (_arg1 + (_arg3 * 0.5)), (_arg2 - (_arg3 * 0.5)), _arg4, _arg5, _arg6, _arg7); createp(_arg1, _arg2, (_arg1 + (_arg3 * 0.5)), (_arg2 + (_arg3 * 0.5)), _arg4, _arg5, _arg6, _arg7); createp(_arg1, _arg2, (_arg1 - (_arg3 * 0.5)), (_arg2 + (_arg3 * 0.5)), _arg4, _arg5, _arg6, _arg7); createwateraffector(_arg1, _arg2, _arg3); if (_arg8 > -1){ _local10 = (p[_arg8].x - p[_arg8].lx); _local11 = (p[_arg8].y - p[_arg8].ly); _local12 = (ps - 4); _local12 = (ps - 4); while (_local12 < ps) { p[_local12].lx = (p[_local12].lx - _local10); p[_local12].ly = (p[_local12].ly - _local11); _local12 = (_local12 + 1); }; }; boxes = (boxes + 1); } public function createmovetrail(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint, _arg6:Number){ var _local7:int; _local7 = -1; i = 0; while (i < movetrails) { if (movetrail[i].active == false){ _local7 = i; i = (movetrails + 1); }; i = (i + 1); }; if (_local7 > -1){ movetrail[_local7].active = true; movetrail[_local7].x1 = _arg1; movetrail[_local7].y1 = _arg2; movetrail[_local7].x2 = _arg3; movetrail[_local7].y2 = _arg4; movetrail[_local7].alpha = 1; movetrail[_local7].livetime = 0; movetrail[_local7].maxlivetime = _arg5; movetrail[_local7].color = _arg6; } else { movetrail[movetrails] = new Object(); movetrail[movetrails].active = true; movetrail[movetrails].x1 = _arg1; movetrail[movetrails].y1 = _arg2; movetrail[movetrails].x2 = _arg3; movetrail[movetrails].y2 = _arg4; movetrail[movetrails].alpha = 1; movetrail[movetrails].livetime = 0; movetrail[movetrails].maxlivetime = _arg5; movetrail[movetrails].color = _arg6; movetrails = (movetrails + 1); }; } public function createupperarm(_arg1){ upperarm[upperarms] = new upperarmmc(); bodypartscontainer.addChild(upperarm[upperarms]); upperarm[upperarms].visible = true; upperarm[upperarms].active = true; upperarm[upperarms].x = -100; upperarm[upperarms].y = -100; upperarm[upperarms].frame = _arg1; upperarm[upperarms].gotoAndPlay((_arg1 + 1)); upperarms = (upperarms + 1); } public function keydown(_arg1:KeyboardEvent){ if (_arg1.keyCode == 32){ pkeyspace = true; }; if (_arg1.keyCode == 81){ pkeyq = true; smgshoot.play(); }; if (_arg1.keyCode == 68){ pkeyd = true; }; if (_arg1.keyCode == 87){ pkeyw = true; }; if (_arg1.keyCode == 65){ pkeya = true; }; if (_arg1.keyCode == 49){ pkey1 = true; }; if (_arg1.keyCode == 50){ pkey2 = true; }; if (_arg1.keyCode == 51){ pkey3 = true; }; if (_arg1.keyCode == 52){ pkey4 = true; }; if (_arg1.keyCode == 53){ pkey5 = true; }; if (_arg1.keyCode == 54){ pkey6 = true; }; if (_arg1.keyCode == 55){ pkey7 = true; }; if (_arg1.keyCode == 56){ pkey8 = true; }; } public function reducedbtn2click(_arg1){ debrisquality = 1; } public function createcrowwing(_arg1:uint){ crowwing[crowwings] = new crowwingmc(); npccontainer.addChild(crowwing[crowwings]); crowwing[crowwings].active = true; crowwing[crowwings].visible = true; crowwing[crowwings].x = -300; crowwing[crowwings].y = -300; crowwing[crowwings].scaleY = 0; if (_arg1 == 1){ crow[crows].scaleX = -1; }; crowwing[crowwings].scalespeed = 0.2; crowwings = (crowwings + 1); } public function createfloordoor(_arg1:Number, _arg2:Number){ floordoor[floordoors] = new floordoormc(); backgroundmappropscontainer.addChild(floordoor[floordoors]); floordoor[floordoors].active = true; floordoor[floordoors].visible = true; floordoor[floordoors].x = _arg1; floordoor[floordoors].y = _arg2; floordoors = (floordoors + 1); } public function fullbtn2click(_arg1){ debrisquality = 0; } public function pistolmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ pistolshoot.play(); q = 0; while (q < 1) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 15) + 15), muzzlesmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 6) + 6), 0, 0, 0, 0, 3, muzzleflashcolor, false); } public function createcity(_arg1:Number, _arg2:Number){ city[cities] = new citymc(); backgroundmappropscontainer.addChild(city[cities]); city[cities].active = true; city[cities].visible = true; city[cities].x = _arg1; city[cities].y = _arg2; city[cities].frame = 0; cities = (cities + 1); } public function nonebtn0click(_arg1){ graphicsquality = 2; } public function createpointdebris(_arg1:Number, _arg2:Number, _arg3:uint){ dchance = 0; if (debrisquality == 1){ dchance = Math.floor((Math.random() * 2)); }; if (dchance == 0){ pointdebris[pointdebriss] = new pointdebrismc(); debriscontainer.addChild(pointdebris[pointdebriss]); pointdebris[pointdebriss].active = true; pointdebris[pointdebriss].visible = true; pointdebris[pointdebriss].x = -1000; pointdebris[pointdebriss].y = -1000; pointdebris[pointdebriss].frame = _arg3; pointdebris[pointdebriss].rotation = (Math.random() * 360); pointdebris[pointdebriss].livetime = 0; pointdebris[pointdebriss].rotatespeed = (Math.random() * pointdebrisrotatespeed); pointdebris[pointdebriss].pointnum = points; createpoint(_arg1, _arg2, pointdebrisaf, pointdebrisg, pointdebrisf, true, -1, false); pointdebriss = (pointdebriss + 1); }; } public function turrethit(_arg1:Number, _arg2:Number){ q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 3) + 3), (Math.random() * 360), ((Math.random() * 4) + 4), 0.8, 0.25, ((Math.random() * 8) + 8), 15829518, true); q = (q + 1); }; } public function physicsexplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:uint; var _local9:uint; var _local10:Number; var _local11:Number; var _local12:Number; _local5 = 0; _local6 = 0; _local7 = 0; _local8 = 0; _local9 = 0; _local10 = 0; _local11 = 0; _local12 = 0; _local8 = 0; while (_local8 < ropes) { if (rope[_local8].active == true){ _local10 = 0; _local11 = 0; _local9 = rope[_local8].firstpnum; while (_local9 < (rope[_local8].firstpnum + rope[_local8].segments)) { _local10 = (_local10 + p[_local9].x); _local11 = (_local11 + p[_local9].y); _local9 = (_local9 + 1); }; _local10 = (_local10 / rope[_local8].segments); _local11 = (_local11 / rope[_local8].segments); if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + rope[_local8].maxlength)){ if (rope[_local8].atrest == false){ _local9 = rope[_local8].firstpnum; while (_local9 < (rope[_local8].firstpnum + rope[_local8].segments)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; rope[_local8].restcounter = 0; rope[_local8].atrest = false; _local9 = rope[_local8].firstpnum; while (_local9 < (rope[_local8].firstpnum + rope[_local8].segments)) { p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < ragdolls) { if (ragdoll[_local8].active == true){ _local10 = ((p[(ragdoll[_local8].firstpnum + 4)].x + p[(ragdoll[_local8].firstpnum + 5)].x) * 0.5); _local11 = ((p[(ragdoll[_local8].firstpnum + 4)].y + p[(ragdoll[_local8].firstpnum + 5)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + (ragdollheight * 2))){ if (ragdoll[_local8].atrest == false){ _local9 = ragdoll[_local8].firstpnum; while (_local9 < (ragdoll[_local8].firstpnum + 14)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; wateraffector[ragdoll[_local8].wateraffectornum].active = true; ragdoll[_local8].restcounter = 0; ragdoll[_local8].atrest = false; _local9 = ragdoll[_local8].firstpnum; while (_local9 < (ragdoll[_local8].firstpnum + 14)) { if (p[_local9].destroyed == false){ p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < boxes) { if (box[_local8].active == true){ _local10 = ((p[box[_local8].firstpnum].x + p[(box[_local8].firstpnum + 2)].x) * 0.5); _local11 = ((p[box[_local8].firstpnum].y + p[(box[_local8].firstpnum + 2)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + box[_local8].sidelength)){ if (box[_local8].atrest == false){ _local9 = box[_local8].firstpnum; while (_local9 < (box[_local8].firstpnum + 4)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; wateraffector[box[_local8].wateraffectornum].active = true; box[_local8].restcounter = 0; box[_local8].atrest = false; _local9 = box[_local8].firstpnum; while (_local9 < (box[_local8].firstpnum + 4)) { p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < hinges) { if (hinge[_local8].active == true){ _local10 = p[(hinge[_local8].firstpnum + 1)].x; _local11 = p[(hinge[_local8].firstpnum + 1)].y; if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + hinge[_local8].hingelength)){ if (hinge[_local8].atrest == false){ _local9 = hinge[_local8].firstpnum; while (_local9 < (hinge[_local8].firstpnum + 3)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; hinge[_local8].restcounter = 0; hinge[_local8].atrest = false; _local9 = hinge[_local8].firstpnum; while (_local9 < (hinge[_local8].firstpnum + 3)) { p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < lines) { if (line[_local8].active == true){ _local10 = ((p[line[_local8].firstpnum].x + p[(line[_local8].firstpnum + 1)].x) * 0.5); _local11 = ((p[line[_local8].firstpnum].y + p[(line[_local8].firstpnum + 1)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + line[_local8].linelength)){ if (line[_local8].atrest == false){ _local9 = line[_local8].firstpnum; while (_local9 < (line[_local8].firstpnum + 2)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; line[_local8].restcounter = 0; line[_local8].atrest = false; _local9 = line[_local8].firstpnum; while (_local9 < (line[_local8].firstpnum + 2)) { p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < points) { if (point[_local8].active == true){ _local10 = p[point[_local8].firstpnum].x; _local11 = p[point[_local8].firstpnum].y; if (approxdistance(_arg1, _arg2, _local10, _local11) <= (_arg3 + safetydistance)){ if (point[_local8].atrest == false){ _local9 = point[_local8].firstpnum; while (_local9 < (point[_local8].firstpnum + 1)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; point[_local8].restcounter = 0; point[_local8].atrest = false; _local9 = point[_local8].firstpnum; while (_local9 < (point[_local8].firstpnum + 1)) { p[_local9].active = true; _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; _local5 = 0; _local6 = 0; _local8 = 0; while (_local8 < objectlines) { if (objectline[_local8].active == true){ _local10 = ((p[objectline[_local8].firstpnum].x + p[(objectline[_local8].firstpnum + 1)].x) * 0.5); _local11 = ((p[objectline[_local8].firstpnum].y + p[(objectline[_local8].firstpnum + 1)].y) * 0.5); if (approxdistance(_arg1, _arg2, _local10, _local11) <= ((_arg3 + safetydistance) + objectline[_local8].yheight)){ _local9 = objectline[_local8].firstpnum; while (_local9 < (objectline[_local8].firstpnum + 2)) { _local5 = approxdistance(_arg1, _arg2, p[_local9].x, p[_local9].y); if (_local5 < _arg3){ _local6 = directiontopoint(_arg1, _arg2, p[_local9].x, p[_local9].y); _local7 = (((_arg3 - _local5) / _arg3) * _arg4); if (_local7 > maxdelta){ _local7 = maxdelta; }; p[_local9].x = (p[_local9].x + vectorx(_local6, _local7)); p[_local9].y = (p[_local9].y + vectory(_local6, _local7)); }; _local9 = (_local9 + 1); }; }; }; _local8 = (_local8 + 1); }; } public function shotgunimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 2) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 3) + 3), 0, 0, 0, 0, 2, impactflashcolor, false); } public function smgimpact(_arg1:Number, _arg2:Number){ q = 0; while (q < 1) { creategp(_arg1, _arg2, ((Math.random() * 5) + 5), (Math.random() * 360), ((Math.random() * 5) + 3), 0.5, -0.15, ((Math.random() * 15) + 10), impactsmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 4) + 4), 0, 0, 0, 0, 3, impactflashcolor, false); } public function grenadesmoke(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 2) + 2), (Math.random() * 360), (Math.random() * 0.5), 1, -0.03, ((Math.random() * 10) + 10), 0x9D9D9D, true); } public function startberserkscreen(){ berserkscreen.active = true; berserkscreen.visible = true; berserkscreen.y = 0; berserkscreen.x = 0; berserkscreen.alpha = 0; berserkscreen.livetime = 0; berserk.play(); } public function chainsawsmoke(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 3) + 3), ((Math.random() * 90) + 45), Math.random(), 1, -0.1, ((Math.random() * 5) + 10), impactsmokecolor, true); } public function createwinzone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ winzone[winzones] = new Object(); winzone[winzones].x1 = _arg1; winzone[winzones].y1 = _arg2; winzone[winzones].x2 = _arg3; winzone[winzones].y2 = _arg4; winzone[winzones].active = true; winzones = (winzones + 1); } public function createnail(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){ nail[nails] = new nailmc(); projectilecontainer.addChild(nail[nails]); nail[nails].active = true; nail[nails].visible = true; nail[nails].alpha = 1; nail[nails].x = _arg1; nail[nails].y = _arg2; nail[nails].lx = _arg1; nail[nails].lx = _arg1; nail[nails].madeeffect = false; nail[nails].bleedtime = 0; nail[nails].attachedparticle = -1; nail[nails].livetime = 0; nail[nails].direction = _arg3; nail[nails].dummy = false; nail[nails].side = _arg4; nail[nails].hs = vectorx2(_arg3, nailspeed); nail[nails].vs = vectory2(_arg3, nailspeed); nails = (nails + 1); } public function reducedbtn4click(_arg1){ particlequality = 1; } public function nailgunimpact(_arg1:Number, _arg2:Number){ nailhit.play(); q = 0; while (q < 8) { creategp(_arg1, _arg2, ((Math.random() * 2) + 1), (Math.random() * 360), ((Math.random() * 3) + 1), 0.9, 0, ((Math.random() * 10) + 5), 0xFFFF00, true); q = (q + 1); }; } public function stopberserkscreen(){ berserkscreen.active = false; berserkscreen.visible = false; } public function stopfog(){ fog.active = false; fog.visible = false; } public function stopfade(){ fade.active = false; fade.visible = false; } public function fullbtn4click(_arg1){ particlequality = 0; } public function grenadeexplosion(_arg1:Number, _arg2:Number){ grenadeexplode.play(); q = 0; while (q < 5) { creategp(_arg1, _arg2, ((Math.random() * 8) + 16), (Math.random() * 180), ((Math.random() * 3) + 1), 0.92, -0.05, ((Math.random() * 30) + 30), explosionsmokecolor, true); q = (q + 1); }; q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), ((Math.random() * 90) + 45), ((Math.random() * 3) + 1), 0.95, 0, ((Math.random() * 8) + 8), explosionflashcolor, true); q = (q + 1); }; } public function createboxdebris(_arg1:Number, _arg2:Number, _arg3:uint){ dchance = 0; if (debrisquality == 1){ dchance = Math.floor((Math.random() * 2)); }; if (dchance == 0){ boxdebris[boxdebriss] = new boxdebrismc(); debriscontainer.addChild(boxdebris[boxdebriss]); boxdebris[boxdebriss].active = true; boxdebris[boxdebriss].visible = true; boxdebris[boxdebriss].x = -1000; boxdebris[boxdebriss].y = -1000; boxdebris[boxdebriss].frame = _arg3; boxdebris[boxdebriss].livetime = 0; boxdebris[boxdebriss].boxnum = boxes; createbox(_arg1, _arg2, boxdebrissidelength, boxdebrisaf, boxdebrisg, boxdebrisf, true, -1, false); boxdebriss = (boxdebriss + 1); }; } public function createcrow(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:int){ crow[crows] = new crowmc(); npccontainer.addChild(crow[crows]); crow[crows].active = true; crow[crows].visible = true; crow[crows].x = _arg1; crow[crows].y = _arg2; crow[crows].hs = 0; crow[crows].vs = 0; crow[crows].hitzonenum = hitzones; createhitzone(crow[crows].x, crow[crows].y, crowradius); crow[crows].facedirection = _arg3; if (_arg3 == 1){ crow[crows].scaleX = -1; }; if (_arg4 == 1){ if (_arg3 == 0){ crow[crows].hs = 5; } else { crow[crows].hs = -5; }; }; crow[crows].frame = _arg4; crow[crows].wingnum = crowwings; createcrowwing(_arg3); crows = (crows + 1); } public function berserkpuff(_arg1:Number, _arg2:Number){ q = 0; while (q < 4) { creategp(_arg1, (_arg2 + (Math.random() * 24)), ((Math.random() * 8) + 12), (Math.random() * 360), (Math.random() * 0.5), 0.995, -0.02, ((Math.random() * 20) + 50), 65382, true); q = (q + 1); }; } public function createhinge(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Boolean, _arg10:int, _arg11:Boolean){ var _local12:Number; var _local13:Number; var _local14:uint; _local12 = 0; _local13 = 0; hinge[hinges] = new Object(); vhinge[hinges] = new Shape(); physicscontainer.addChild(vhinge[hinges]); hinge[hinges].restcounter = 0; if (_arg9 == true){ hinge[hinges].atrest = false; } else { hinge[hinges].atrest = true; }; hinge[hinges].ignorecollisions = _arg11; hinge[hinges].x = _arg1; hinge[hinges].y = _arg2; hinge[hinges].length1 = _arg3; hinge[hinges].length2 = _arg4; hinge[hinges].active = true; hinge[hinges].hingelength = (_arg3 + _arg4); hinge[hinges].hingedistance = _arg5; hinge[hinges].firstpnum = ps; createp(_arg1, _arg2, _arg1, _arg2, _arg6, _arg7, _arg8, _arg9); createp(_arg1, _arg2, _arg1, (_arg2 + _arg3), _arg6, _arg7, _arg8, _arg9); createp(_arg1, _arg2, _arg1, ((_arg2 + _arg3) + _arg4), _arg6, _arg7, _arg8, _arg9); if (_arg10 > -1){ _local12 = (p[_arg10].x - p[_arg10].lx); _local13 = (p[_arg10].y - p[_arg10].ly); _local14 = (ps - 3); _local14 = (ps - 3); while (_local14 < ps) { p[_local14].lx = (p[_local14].lx - _local12); p[_local14].ly = (p[_local14].ly - _local13); _local14 = (_local14 + 1); }; }; hinges = (hinges + 1); } public function rectcollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{ var _local9:Boolean; var _local10:Boolean; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; _local9 = false; _local10 = false; _local11 = 0; _local12 = 0; _local13 = 0; _local14 = 0; _local15 = 0; _local16 = 0; _local17 = 0; _local18 = 0; if (_arg3 > _arg1){ _local11 = _arg1; _local12 = _arg3; } else { _local11 = _arg3; _local12 = _arg1; }; if (_arg4 > _arg2){ _local13 = _arg2; _local14 = _arg4; } else { _local13 = _arg4; _local14 = _arg2; }; if (_arg7 > _arg5){ _local17 = _arg5; _local18 = _arg7; } else { _local17 = _arg7; _local18 = _arg5; }; if (_arg8 > _arg6){ _local15 = _arg6; _local16 = _arg8; } else { _local15 = _arg8; _local16 = _arg6; }; if ((((_local11 >= _local17)) && ((_local11 <= _local18)))){ _local9 = true; } else { if ((((_local12 >= _local17)) && ((_local12 <= _local18)))){ _local9 = true; } else { if ((((_local17 >= _local11)) && ((_local17 <= _local12)))){ _local9 = true; } else { if ((((_local18 >= _local11)) && ((_local18 <= _local12)))){ _local9 = true; }; }; }; }; if ((((_local13 >= _local15)) && ((_local13 <= _local16)))){ _local10 = true; } else { if ((((_local14 >= _local15)) && ((_local14 <= _local16)))){ _local10 = true; } else { if ((((_local15 >= _local13)) && ((_local15 <= _local14)))){ _local10 = true; } else { if ((((_local16 >= _local13)) && ((_local16 <= _local14)))){ _local10 = true; }; }; }; }; if ((((_local9 == true)) && ((_local10 == true)))){ return (true); }; return (false); } public function spawnweapons(_arg1:Number, _arg2:Number){ spawnfacedirection = Math.floor((Math.random() * 2)); spawnpointdirection = (Math.random() * 360); if (countweapons() == 0){ if (Math.floor((Math.random() * weaponchance)) == 0){ chance = Math.floor((Math.random() * 8)); if (chance == 0){ createpistol(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1); }; if (chance == 1){ createrifle(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1); }; if (chance == 2){ createshotgun(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1); }; if (chance == 3){ createsmg(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1); }; if (chance == 4){ creategrenadeammo(_arg1, _arg2, true); }; if (chance == 5){ createnailgun(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1); }; if (chance >= 6){ createrpg(_arg1, _arg2, spawnfacedirection, spawnpointdirection, true, -1, false); }; physicspush(_arg1, _arg2, 16, (Math.random() * 360), (Math.random() * 1.5)); teleportsparks(_arg1, _arg2); }; }; } public function barrelexplosion(_arg1:Number, _arg2:Number){ explosion.play(); q = 0; while (q < 3) { creategp(_arg1, _arg2, ((Math.random() * 6) + 16), (Math.random() * 180), (Math.random() * 3), 0.97, 0.03, ((Math.random() * 30) + 30), 0xFF8000, true); creategp(_arg1, _arg2, ((Math.random() * 6) + 16), (Math.random() * 180), (Math.random() * 3), 0.97, 0.03, ((Math.random() * 30) + 30), 0xFFFF00, true); q = (q + 1); }; } public function countenemies():uint{ enemies = 0; z = 0; while (z < enemyAs) { if (enemyA[z].active == true){ enemies = (enemies + 1); }; z = (z + 1); }; z = 0; while (z < enemyBs) { if (enemyB[z].active == true){ enemies = (enemies + 1); }; z = (z + 1); }; z = 0; while (z < enemyCs) { if (enemyC[z].active == true){ enemies = (enemies + 1); }; z = (z + 1); }; return (enemies); } public function debrisspark(_arg1:Number, _arg2:Number){ creategp(_arg1, _arg2, ((Math.random() * 3) + 3), (Math.random() * 360), (Math.random() * 2), 1, 0, ((Math.random() * 10) + 5), 0xFFFF00, true); } public function createblast(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:int){ foundblast = -1; i = 0; while (i < blasts) { if (blast[i].active == false){ foundblast = i; i = (blasts + 1); }; i = (i + 1); }; if (foundblast > -1){ blast[foundblast].x = _arg1; blast[foundblast].y = _arg2; blast[foundblast].active = true; blast[foundblast].side = _arg6; blast[foundblast].damage = _arg5; blast[foundblast].push = _arg4; blast[foundblast].radius = _arg3; } else { blast[blasts] = new Object(); blast[blasts].x = _arg1; blast[blasts].y = _arg2; blast[blasts].active = true; blast[blasts].side = _arg6; blast[blasts].damage = _arg5; blast[blasts].push = _arg4; blast[blasts].radius = _arg3; blasts = (blasts + 1); }; } public function createbulletcasing(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:uint){ bcchance = bulletcasingquality; if (bulletcasingquality == 1){ bcchance = Math.floor((Math.random() * 2)); }; if (bcchance == 0){ bulletcasing[bulletcasings] = new bulletcasingmc(); debriscontainer.addChild(bulletcasing[bulletcasings]); bulletcasing[bulletcasings].active = true; bulletcasing[bulletcasings].visible = true; bulletcasing[bulletcasings].x = -1000; bulletcasing[bulletcasings].y = -1000; bulletcasing[bulletcasings].playedsounds = 0; bulletcasing[bulletcasings].frame = _arg7; bulletcasing[bulletcasings].rotation = 0; bulletcasing[bulletcasings].width = _arg3; bulletcasing[bulletcasings].rotation = (Math.random() * 360); bulletcasing[bulletcasings].livetime = 0; bulletcasing[bulletcasings].rotatespeed = _arg6; bulletcasing[bulletcasings].pointnum = points; createpoint(_arg1, _arg2, bulletcasingaf, bulletcasingg, bulletcasingf, true, -1, false); p[point[bulletcasing[bulletcasings].pointnum].firstpnum].x = (p[point[bulletcasing[bulletcasings].pointnum].firstpnum].x + vectorx2(_arg4, _arg5)); p[point[bulletcasing[bulletcasings].pointnum].firstpnum].y = (p[point[bulletcasing[bulletcasings].pointnum].firstpnum].y + vectory2(_arg4, _arg5)); bulletcasings = (bulletcasings + 1); }; } public function creategrenadeammo(_arg1:Number, _arg2:Number, _arg3:Boolean){ grenadeammo[grenadeammos] = new grenadeammomc(); pickupscontainer.addChild(grenadeammo[grenadeammos]); grenadeammo[grenadeammos].active = true; grenadeammo[grenadeammos].visible = true; grenadeammo[grenadeammos].fade = _arg3; grenadeammo[grenadeammos].x = -500; grenadeammo[grenadeammos].y = -500; grenadeammo[grenadeammos].livetime = 0; grenadeammo[grenadeammos].boxnum = boxes; createbox(_arg1, _arg2, grenadeammosidelength, pickupaf, pickupg, pickupf, _arg3, -1, false); grenadeammos = (grenadeammos + 1); } public function loadmap(_arg1:uint){ wait = -5; isplayer = false; if (players > 0){ if (player[0].active == true){ isplayer = true; getplayerinfo(); }; }; resetgame(); startfade(); inmap = true; mapnumber = _arg1; bool1 = false; bool2 = false; bool3 = false; bool4 = false; bool5 = false; bool6 = false; counter1 = 0; counter2 = 0; counter3 = 0; counter4 = 0; counter5 = 0; counter6 = 0; backdrop.active = true; backdrop.visible = true; background.active = true; background.visible = true; foreground.active = true; foreground.visible = true; if (_arg1 == 1){ music.play(0, 100); startfog(); backdrop.frame = 0; background.frame = 0; foreground.frame = 0; createplayer(20, 208, 0); createcollisionline(-155, 244, 155, 268); createcollisionline(155, 268, 342, 245); createcollisionline(342, 245, 466, 264); createcollisionline(466, 264, 734, 248); messagetextdelay = 90; messagestring = "The Cemetary Gates"; }; if (_arg1 == 2){ startfog(); backdrop.frame = 0; background.frame = 1; foreground.frame = 1; createplayer(20, 203, 0); createcollisionline(-210, 211, 210, 267); createcollisionline(210, 267, 420, 229); createcollisionline(420, 229, 780, 289); collisionline[2].active = false; createcrow(610, 200, 1, 1); createcorpse(202, 210, true, -1, 1, 2, 2, 2, 2); ragdoll[0].ignorecollisions = true; corpse[0].fade = false; createchain(195, 161, false, true, 202, 220, true, false, true, 2); messagetextdelay = 90; messagestring = "Further Into the Cemetary"; }; if (_arg1 == 3){ startfog(); backdrop.frame = 0; background.frame = 2; foreground.frame = 2; createplayer(20, 203, 0); createcollisionline(-196, 223, 196, 267); createcollisionline(196, 267, 395, 248); createcollisionline(395, 248, 535, 267); createcollisionline(535, 267, 730, 228); createcrow(347, 167, 1, 0); messagetextdelay = 90; messagestring = "Mausoleum"; }; if (_arg1 == 4){ startfog(); backdrop.frame = 0; background.frame = 3; foreground.frame = 3; createplayer(20, 203, 0); createcollisionline(-184, 218, 184, 272); createcollisionline(184, 272, 417, 248); createcollisionline(417, 248, 473, 0x0100); createcollisionline(473, 0x0100, 488, 242); createcollisionline(488, 242, 800, 242); createcrow(339, 235, 1, 0); messagetextdelay = 90; messagestring = "Mansion Entrance"; }; if (_arg1 == 5){ backdrop.frame = 1; background.frame = 4; foreground.frame = 4; createplayer(20, 220, 0); createcollisionline(-200, 260, 305, 260); createcollisionline(305, 260, 425, 140); createcollisionline(425, 140, 800, 140); messagetextdelay = 90; messagestring = "The Mansion"; }; if (_arg1 == 6){ createcrate(194, 200, 0); backdrop.frame = 1; background.frame = 5; foreground.frame = 5; createplayer(20, 180, 0); createcollisionline(-200, 224, 800, 224); createfire(0x0202, 210, 90000); createchain(418, 50, false, true, 450, 175, false, false, true, 1); createshotgun(194, 212, 0, 315, false, -1); messagetextdelay = 90; messagestring = "Further Into the Mansion"; }; if (_arg1 == 7){ backdrop.frame = 2; background.frame = 6; foreground.frame = 6; createrat(200, 150, 0, false); createcollisionline(-200, 150, 800, 150); createchain(200, 0, false, true, 205, 115, false, false, true, 0); createbarrel(450, 130, 1); xposition = 50; yposition = -50; createlinedebris((xposition + 3), (yposition + 10), 2); createboxdebris((xposition - 4), (yposition + 8), 2); createpointdebris((xposition + 2), (yposition + 23), 2); createpointdebris((xposition + 6), (yposition + 16), 2); physicsexplosion(xposition, yposition, 50, 3); bigcrash.play(); i = 0; while (i < 7) { creategp((xposition - 20), yposition, ((Math.random() * 10) + 15), ((Math.random() * 40) + 250), ((Math.random() * 3) + 1), 0.97, 0.08, ((Math.random() * 40) + 40), 10263181, true); i = (i + 1); }; createplayer(50, -70, 0); messagetextdelay = 90; messagestring = "Sewers"; }; if (_arg1 == 8){ backdrop.frame = 2; background.frame = 7; foreground.frame = 7; createcollisionline(-200, 200, 182, 200); createcollisionline(182, 200, 224, 260); createcollisionline(224, 260, 375, 260); createcollisionline(375, 260, 417, 200); createcollisionline(417, 200, 800, 200); createwaterpool(190, 240, 220, 20, 24, 0.25, 0.9, 2, 0.05, 6982733, 0.4); createhitzone(300, 140, 20); createplayer(20, 160, 0); messagetextdelay = 90; messagestring = "Further Into the Sewers"; }; if (_arg1 == 9){ backdrop.frame = 2; background.frame = 9; foreground.frame = 9; createrat(250, 0x0100, 1, true); createcollisionline(-200, 0x0100, 318, 0x0100); createcollisionline(318, 0x0100, 412, 192); createcollisionline(412, 192, 800, 192); createcollisionline(-20, 150, 60, 150); createcrate(500, 168, 0); creategrenadeammo(500, 180, false); createplayer(20, 220, 0); messagetextdelay = 90; messagestring = "Sewer Exit"; }; if (_arg1 == 10){ backdrop.frame = 3; background.frame = 10; foreground.frame = 10; startrain(); createcollisionline(-500, 250, 1100, 250); createcollisionline(233, 250, 264, 211); createcollisionline(264, 211, 310, 220); createcollisionline(310, 220, 330, 250); createplayer(20, 218, 0); messagetextdelay = 90; messagestring = "City Streets"; loopchannel = hydrantspray.play(0, 100); }; if (_arg1 == 11){ backdrop.frame = 3; background.frame = 11; foreground.frame = 11; startrain(); createcollisionline(-500, 250, 1100, 250); createplayer(20, 218, 0); messagetextdelay = 90; messagestring = "Lab Entrance"; createbarrel(120, 230, 0); createfire(298, 218, 90000); loopchannel = rainfall.play(0, 100); }; if (_arg1 == 12){ backdrop.frame = 4; background.frame = 12; foreground.frame = 12; createcollisionline(-500, 150, 1100, 150); createplayer(20, 118, 0); messagetextdelay = 90; messagestring = "Lab"; createstring(450, -15, false, true, 350, -15, false, true, true, 0, 1); createnailgun(450, 145, 0, 0, false, -1); }; if (_arg1 == 13){ backdrop.frame = 4; background.frame = 13; foreground.frame = 13; createcollisionline(-500, 150, 1100, 150); createcollisionline(477, 0, 509.6, 54); createcollisionline(509.6, 54, 700, 54); createcollisionline(592, 0, 592, 150); createcollisionline(-500, 160, 100, 160); createplayer(20, 118, 0); messagetextdelay = 90; messagestring = "Further Into the Lab"; createfire(413, 139, 90000); createturretbase(555, 59, 270); createcrate(565, 125, 0); createsmg(564, 135, 0, 315, false, -1); createwalldoor(592, 54); }; if (_arg1 == 14){ backdrop.frame = 4; background.frame = 14; foreground.frame = 14; createcollisionline(-500, 150, 420, 150); createcollisionline(420, 150, 1200, 150); createcollisionline(300, 150, 300, 225); createcollisionline(420, 150, 420, 225); createcollisionline(300, 225, 420, 225); createplayer(20, 118, 0); messagetextdelay = 90; messagestring = "???"; createcomputer(504, 126); createspinlight(323, 78); createfloordoor(296.4, 150); spinlight[0].visible = false; createwaterpool(300, 175, 124, 50, 16, 0.15, 0.9, 1, 0.08, 1762862, 0.6); createdamagezone(300, 175, 420, 300, 5); }; if (_arg1 == 15){ backdrop.frame = 4; background.frame = 16; foreground.frame = 16; createplayer(20, 116, 0); createcollisionline(-500, 148, 100, 148); createcollisionline(100, 148, 200, 248); createcollisionline(200, 248, 400, 248); createcollisionline(400, 248, 500, 148); createcollisionline(500, 148, 800, 148); createspinlight(300, 128); spinlight[0].visible = false; createmegazombie(300, 160); createchain(267, 184, false, true, 330, 184, false, true, false, 1); createchain(333, 218, false, true, 270, 218, false, true, false, 1); createchain(267, 218, false, true, 330, 218, false, true, false, 1); createchain(333, 184, false, true, 270, 184, false, true, false, 1); playerweapon = chainsawnum; playerrifleammo = 0; playerhasrifle = false; playerpistolammo = 0; playerhaspistol = false; playergrenadeammo = 0; playerhasgrenade = false; playershotgunammo = 0; playerhasshotgun = false; playersmgammo = 0; playerhassmg = false; playernailgunammo = 0; playerhasnailgun = false; playerrpgammo = 0; playerhasrpg = false; playerhaschainsaw = true; createrpg(552, 134, 0, 84, false, -1, false); createrpg(559, 134, 0, 89, false, -1, false); createrpg(566, 134, 0, 91, false, -1, false); createrpg(573, 134, 0, 94, false, -1, false); createhealth(50, 105, false); createhealth(65, 105, false); createhealth(44, 123, false); createhealth(62, 123, false); }; if (_arg1 == 16){ backdrop.frame = 4; background.frame = 13; foreground.frame = 13; createcollisionline(-500, 150, 1100, 150); createfire(413, 139, 90000); createenemyC(-160, 118, 0, true); createenemyA(-120, 118, 0, true, false); createenemyC(-50, 118, 0, true); }; if (_arg1 == 17){ startrain(); backdrop.frame = 5; background.frame = 15; foreground.frame = 15; createcity(300, 250); }; if (isplayer == true){ restoreplayerinfo(); getplayerinfo(); }; lowestframerate = 30; } public function smgmuzzleflash(_arg1:Number, _arg2:Number, _arg3:Number){ smgshoot.play(); q = 0; while (q < 1) { creategp(_arg1, _arg2, ((Math.random() * 8) + 8), correctdirection(((_arg3 + (Math.random() * 50)) - 25)), ((Math.random() * 3) + 1), 0.9, -0.05, ((Math.random() * 15) + 15), muzzlesmokecolor, true); q = (q + 1); }; creategp(_arg1, _arg2, ((Math.random() * 4) + 4), 0, 0, 0, 0, 3, muzzleflashcolor, false); } public function createplayer(_arg1, _arg2, _arg3){ cutscene = false; player[players] = new Object(); player[players].active = true; player[players].berserk = false; player[players].berserkcounter = 0; player[players].berserkamount = 0; player[players].slow = 0; player[players].shootdelay = 0; player[players].damage = 0; player[players].weapon = chainsawnum; player[players].framedelay = 0; player[players].rifleammo = 0; player[players].hasrifle = false; player[players].pistolammo = 0; player[players].haspistol = false; player[players].grenadeammo = 0; player[players].hasgrenade = true; player[players].shotgunammo = 0; player[players].hasshotgun = false; player[players].smgammo = 0; player[players].hassmg = false; player[players].nailgunammo = 0; player[players].hasnailgun = false; player[players].rpgammo = 0; player[players].hasrpg = false; player[players].haschainsaw = true; player[players].x = -2000; player[players].y = -2000; player[players].bodynormal = 90; player[players].bodyx = -2000; player[players].bodyy = -2000; player[players].jumpdelay = 0; player[players].lookdirection = 0; player[players].gundirection = 0; player[players].walkdirection = _arg3; player[players].facedirection = _arg3; player[players].objectlinenum = objectlines; player[players].gundirection = 0; player[players].lookdirection = 0; player[players].bodynormal = 90; createobjectline(_arg1, _arg2, (ragdollheight * 2), playeraf, playerg, playerf); player[players].firstlegnum = legAs; createlegA(); createlegA(); legA[(player[players].firstlegnum + 1)].framerate = 0; legA[player[players].firstlegnum].framerate = 0; if (_arg3 == 0){ legA[player[players].firstlegnum].frame = 4; legA[(player[players].firstlegnum + 1)].frame = 14; } else { legA[player[players].firstlegnum].frame = 14; legA[(player[players].firstlegnum + 1)].frame = 4; }; player[players].bodynum = bodyAs; createbodyA(); players = (players + 1); } public function creategp(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:uint, _arg9:Number, _arg10:Boolean){ var pchance:int; var foundgp:int; var j:uint; var x = _arg1; var y = _arg2; var radius = _arg3; var gpdirection = _arg4; var speed = _arg5; var af = _arg6; var g = _arg7; var gptime = _arg8; var gpcolor = _arg9; var obeyquality = _arg10; pchance = 0; if (obeyquality == true){ pchance = 0; if (particlequality == 1){ pchance = Math.floor((Math.random() * 2)); }; } else { pchance = 0; }; if (pchance == 0){ foundgp = -1; j = 0; j = 0; while (j < gps) { if (gp[j].active == false){ foundgp = j; j = (gps + 1); }; j = (j + 1); }; if (foundgp > -1){ gp[foundgp].x = x; gp[foundgp].y = y; gp[foundgp].radius = radius; gp[foundgp].visible = true; gp[foundgp].active = true; gp[foundgp].gpcolor = gpcolor; gp[foundgp].gptime = gptime; gp[foundgp].gpstarttime = gptime; gp[foundgp].af = af; gp[foundgp].g = g; gp[foundgp].vs = vectory2(gpdirection, speed); gp[foundgp].hs = vectorx2(gpdirection, speed); vgp[foundgp].visible = true; vgp[foundgp].x = x; vgp[foundgp].y = y; var _local12 = vgp[foundgp].graphics; with (_local12) { clear(); moveTo(-(radius), -(radius)); lineStyle(1, 0, 0); beginFill(gpcolor, 1); drawCircle(0, 0, radius); }; } else { gp[gps] = new Object(); vgp[gps] = new Shape(); _local12 = vgp[gps].graphics; with (_local12) { moveTo(-(radius), -(radius)); lineStyle(1, 0, 0); beginFill(gpcolor, 1); drawCircle(0, 0, radius); }; vgp[gps].x = x; vgp[gps].y = y; physicscontainer.addChild(vgp[gps]); gp[gps].x = x; gp[gps].y = y; gp[gps].radius = radius; gp[gps].visible = true; gp[gps].active = true; gp[gps].gpcolor = gpcolor; gp[gps].gptime = gptime; gp[gps].gpstarttime = gptime; gp[gps].af = af; gp[gps].g = g; gp[gps].vs = vectory2(gpdirection, speed); gp[gps].hs = vectorx2(gpdirection, speed); gps = (gps + 1); }; }; } public function createp(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Boolean){ p[ps] = new Object(); p[ps].x = _arg3; p[ps].y = _arg4; p[ps].g = _arg6; p[ps].af = _arg5; p[ps].f = _arg7; p[ps].lx = _arg3; p[ps].sx = _arg1; p[ps].ly = _arg4; p[ps].sy = _arg2; p[ps].active = _arg8; p[ps].destroyed = false; ps = (ps + 1); } public function startrain(){ z = 0; while (z < raindrops) { rain[z].active = true; rain[z].visible = true; z = (z + 1); }; } public function checknode(_arg1:Number, _arg2:Number):Boolean{ currentnode = -1; found = false; z = 0; while (z < nodes) { if (node[z].active == true){ if (approxdistance(_arg1, _arg2, node[z].x, node[z].y) < noderadius){ found = true; currentnode = z; z = (nodes + 1); }; }; z = (z + 1); }; return (found); } public function createcorpse(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:int, _arg5:uint, _arg6:uint, _arg7:uint, _arg8:uint, _arg9:uint){ corpse[corpses] = new Object(); if (_arg5 > 0){ player[0].berserkamount = (player[0].berserkamount + killberserkamount); }; corpse[corpses].leftarmsegments = _arg6; corpse[corpses].rightarmsegments = _arg7; corpse[corpses].leftlegsegments = _arg8; corpse[corpses].rightlegsegments = _arg9; corpse[corpses].alpha = 1; corpse[corpses].active = true; corpse[corpses].type = _arg5; corpse[corpses].x = _arg1; corpse[corpses].y = _arg2; corpse[corpses].lastx = _arg1; corpse[corpses].lasty = _arg2; corpse[corpses].bloodtimer = 0; corpse[corpses].fade = _arg3; corpse[corpses].livetime = 0; corpse[corpses].ragdollnum = ragdolls; createragdoll(_arg1, _arg2, corpseaf, corpseg, corpsef, _arg3, _arg4, false, _arg6, _arg7, _arg8, _arg9); if (_arg6 == 0){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 3)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 3)].y, 0, (2 - _arg6), _arg4, _arg5, 1); }; if (_arg6 == 1){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 11)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 11)].y, 0, (2 - _arg6), _arg4, _arg5, 1); }; if (_arg7 == 0){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 2)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 2)].y, 0, (2 - _arg7), _arg4, _arg5, 0); }; if (_arg7 == 1){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 10)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 10)].y, 0, (2 - _arg7), _arg4, _arg5, 0); }; if (_arg8 == 0){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 5)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 5)].y, 1, (2 - _arg8), _arg4, _arg5, 1); }; if (_arg8 == 1){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 7)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 7)].y, 1, (2 - _arg8), _arg4, _arg5, 1); }; if (_arg9 == 0){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 4)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 4)].y, 1, (2 - _arg9), _arg4, _arg5, 0); }; if (_arg9 == 1){ createlimb(p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 6)].x, p[(ragdoll[corpse[corpses].ragdollnum].firstpnum + 6)].y, 1, (2 - _arg9), _arg4, _arg5, 0); }; corpse[corpses].headnum = heads; corpse[corpses].torsonum = torsos; corpse[corpses].firstupperlegnum = upperlegs; corpse[corpses].firstlowerarmnum = lowerarms; corpse[corpses].firstupperarmnum = upperarms; corpse[corpses].firstlowerlegnum = lowerlegs; createlowerleg(_arg5); createlowerleg(_arg5); createupperleg(_arg5); createupperleg(_arg5); createtorso(_arg5); createhead(_arg5); createlowerarm(_arg5); createlowerarm(_arg5); createupperarm(_arg5); createupperarm(_arg5); upperarm[corpse[corpses].firstupperarmnum].scaleX = -1; lowerarm[corpse[corpses].firstlowerarmnum].scaleX = -1; upperleg[corpse[corpses].firstupperlegnum].scaleX = -1; lowerleg[corpse[corpses].firstlowerlegnum].scaleX = -1; if (countcorpses() >= maxcorpses){ ragdoll[corpse[corpses].ragdollnum].deformed = true; }; corpses = (corpses + 1); } } }//package mainfla_fla
Section 13
//THEPRELOADER_1 (mainfla_fla.THEPRELOADER_1) package mainfla_fla { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class THEPRELOADER_1 extends MovieClip { public var shiftamt; public var bar:MovieClip; public var onRelease; public var isloaded; public function THEPRELOADER_1(){ addFrameScript(0, frame1, 9, frame10); } function frame10(){ stage.removeEventListener(MouseEvent.CLICK, onRelease); } function frame1(){ stop(); MovieClip(root).stop(); shiftamt = 17; isloaded = false; parent.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING); onRelease = function (){ var url:*; var request:*; url = "http://www.mofunzone.com/"; request = new URLRequest(url); try { navigateToURL(request, "_blank"); } catch(e:Error) { }; }; stage.addEventListener(MouseEvent.CLICK, onRelease); if (parent.loaderInfo.bytesLoaded >= parent.loaderInfo.bytesTotal){ parent.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, PL_LOADING); gotoAndStop(10); }; } public function PL_LOADING(_arg1:ProgressEvent):void{ var _local2:*; var _local3:*; var _local4:*; _local2 = Math.round(_arg1.bytesLoaded); _local3 = Math.round(_arg1.bytesTotal); _local4 = (_local2 / _local3); MovieClip(MovieClip(getChildByName("bar")).getChildByName("barmask")).scaleX = _local4; if (_local2 == _local3){ isloaded = true; }; } } }//package mainfla_fla
Section 14
//alarmsound (alarmsound) package { import flash.media.*; public dynamic class alarmsound extends Sound { } }//package
Section 15
//ammodisplaymc (ammodisplaymc) package { import flash.display.*; public dynamic class ammodisplaymc extends MovieClip { } }//package
Section 16
//ammopickupsound (ammopickupsound) package { import flash.media.*; public dynamic class ammopickupsound extends Sound { } }//package
Section 17
//backdropmc (backdropmc) package { import flash.display.*; public dynamic class backdropmc extends MovieClip { } }//package
Section 18
//backgroundmc (backgroundmc) package { import flash.display.*; public dynamic class backgroundmc extends MovieClip { } }//package
Section 19
//barrelmc (barrelmc) package { import flash.display.*; public dynamic class barrelmc extends MovieClip { } }//package
Section 20
//berserkbarmc (berserkbarmc) package { import flash.display.*; public dynamic class berserkbarmc extends MovieClip { } }//package
Section 21
//berserkdisplaymc (berserkdisplaymc) package { import flash.display.*; public dynamic class berserkdisplaymc extends MovieClip { } }//package
Section 22
//berserkscreenmc (berserkscreenmc) package { import flash.display.*; public dynamic class berserkscreenmc extends MovieClip { } }//package
Section 23
//berserksound (berserksound) package { import flash.media.*; public dynamic class berserksound extends Sound { } }//package
Section 24
//bigcrashsound (bigcrashsound) package { import flash.media.*; public dynamic class bigcrashsound extends Sound { } }//package
Section 25
//bodyAmc (bodyAmc) package { import flash.display.*; public dynamic class bodyAmc extends MovieClip { } }//package
Section 26
//bodyBmc (bodyBmc) package { import flash.display.*; public dynamic class bodyBmc extends MovieClip { } }//package
Section 27
//bodyCmc (bodyCmc) package { import flash.display.*; public dynamic class bodyCmc extends MovieClip { } }//package
Section 28
//bodyDmc (bodyDmc) package { import flash.display.*; public dynamic class bodyDmc extends MovieClip { } }//package
Section 29
//boxdebrismc (boxdebrismc) package { import flash.display.*; public dynamic class boxdebrismc extends MovieClip { } }//package
Section 30
//bulletcasingmc (bulletcasingmc) package { import flash.display.*; public dynamic class bulletcasingmc extends MovieClip { } }//package
Section 31
//chainsawmc (chainsawmc) package { import flash.display.*; public dynamic class chainsawmc extends MovieClip { } }//package
Section 32
//chainsawrevsound (chainsawrevsound) package { import flash.media.*; public dynamic class chainsawrevsound extends Sound { } }//package
Section 33
//chainsawstartsound (chainsawstartsound) package { import flash.media.*; public dynamic class chainsawstartsound extends Sound { } }//package
Section 34
//citymc (citymc) package { import flash.display.*; public dynamic class citymc extends MovieClip { } }//package
Section 35
//computermc (computermc) package { import flash.display.*; public dynamic class computermc extends MovieClip { } }//package
Section 36
//cratemc (cratemc) package { import flash.display.*; public dynamic class cratemc extends MovieClip { } }//package
Section 37
//crowcawsound (crowcawsound) package { import flash.media.*; public dynamic class crowcawsound extends Sound { } }//package
Section 38
//crowmc (crowmc) package { import flash.display.*; public dynamic class crowmc extends MovieClip { } }//package
Section 39
//crowwingmc (crowwingmc) package { import flash.display.*; public dynamic class crowwingmc extends MovieClip { } }//package
Section 40
//cursormc (cursormc) package { import flash.display.*; public dynamic class cursormc extends MovieClip { } }//package
Section 41
//dooropensound (dooropensound) package { import flash.media.*; public dynamic class dooropensound extends Sound { } }//package
Section 42
//dripsound (dripsound) package { import flash.media.*; public dynamic class dripsound extends Sound { } }//package
Section 43
//dryfiresound (dryfiresound) package { import flash.media.*; public dynamic class dryfiresound extends Sound { } }//package
Section 44
//electricbuzzsound (electricbuzzsound) package { import flash.media.*; public dynamic class electricbuzzsound extends Sound { } }//package
Section 45
//explosionsound (explosionsound) package { import flash.media.*; public dynamic class explosionsound extends Sound { } }//package
Section 46
//fademc (fademc) package { import flash.display.*; public dynamic class fademc extends MovieClip { } }//package
Section 47
//floordoormc (floordoormc) package { import flash.display.*; public dynamic class floordoormc extends MovieClip { } }//package
Section 48
//fogmc (fogmc) package { import flash.display.*; public dynamic class fogmc extends MovieClip { } }//package
Section 49
//foregroundmc (foregroundmc) package { import flash.display.*; public dynamic class foregroundmc extends MovieClip { } }//package
Section 50
//format (format) package { import flash.text.*; public dynamic class format extends Font { } }//package
Section 51
//format2 (format2) package { import flash.text.*; public dynamic class format2 extends Font { } }//package
Section 52
//grenadeammomc (grenadeammomc) package { import flash.display.*; public dynamic class grenadeammomc extends MovieClip { } }//package
Section 53
//grenadebounce1sound (grenadebounce1sound) package { import flash.media.*; public dynamic class grenadebounce1sound extends Sound { } }//package
Section 54
//grenadebounce2sound (grenadebounce2sound) package { import flash.media.*; public dynamic class grenadebounce2sound extends Sound { } }//package
Section 55
//grenadebounce3sound (grenadebounce3sound) package { import flash.media.*; public dynamic class grenadebounce3sound extends Sound { } }//package
Section 56
//grenadeexplodesound (grenadeexplodesound) package { import flash.media.*; public dynamic class grenadeexplodesound extends Sound { } }//package
Section 57
//grenademc (grenademc) package { import flash.display.*; public dynamic class grenademc extends MovieClip { } }//package
Section 58
//headmc (headmc) package { import flash.display.*; public dynamic class headmc extends MovieClip { } }//package
Section 59
//healthbarmc (healthbarmc) package { import flash.display.*; public dynamic class healthbarmc extends MovieClip { } }//package
Section 60
//healthdisplaymc (healthdisplaymc) package { import flash.display.*; public dynamic class healthdisplaymc extends MovieClip { } }//package
Section 61
//healthmc (healthmc) package { import flash.display.*; public dynamic class healthmc extends MovieClip { } }//package
Section 62
//healthpickupsound (healthpickupsound) package { import flash.media.*; public dynamic class healthpickupsound extends Sound { } }//package
Section 63
//hydrantspraysound (hydrantspraysound) package { import flash.media.*; public dynamic class hydrantspraysound extends Sound { } }//package
Section 64
//lasershootsound (lasershootsound) package { import flash.media.*; public dynamic class lasershootsound extends Sound { } }//package
Section 65
//legAmc (legAmc) package { import flash.display.*; public dynamic class legAmc extends MovieClip { } }//package
Section 66
//legBmc (legBmc) package { import flash.display.*; public dynamic class legBmc extends MovieClip { } }//package
Section 67
//legCmc (legCmc) package { import flash.display.*; public dynamic class legCmc extends MovieClip { } }//package
Section 68
//legDmc (legDmc) package { import flash.display.*; public dynamic class legDmc extends MovieClip { } }//package
Section 69
//linedebrismc (linedebrismc) package { import flash.display.*; public dynamic class linedebrismc extends MovieClip { } }//package
Section 70
//linkmc (linkmc) package { import flash.display.*; public dynamic class linkmc extends MovieClip { } }//package
Section 71
//lowerarmmc (lowerarmmc) package { import flash.display.*; public dynamic class lowerarmmc extends MovieClip { } }//package
Section 72
//lowerlegmc (lowerlegmc) package { import flash.display.*; public dynamic class lowerlegmc extends MovieClip { } }//package
Section 73
//megazombiediesound (megazombiediesound) package { import flash.media.*; public dynamic class megazombiediesound extends Sound { } }//package
Section 74
//megazombieenginesound (megazombieenginesound) package { import flash.media.*; public dynamic class megazombieenginesound extends Sound { } }//package
Section 75
//megazombieexhaustsound (megazombieexhaustsound) package { import flash.media.*; public dynamic class megazombieexhaustsound extends Sound { } }//package
Section 76
//megazombiegunmc (megazombiegunmc) package { import flash.display.*; public dynamic class megazombiegunmc extends MovieClip { } }//package
Section 77
//megazombieintrosound (megazombieintrosound) package { import flash.media.*; public dynamic class megazombieintrosound extends Sound { } }//package
Section 78
//megazombiemc (megazombiemc) package { import flash.display.*; public dynamic class megazombiemc extends MovieClip { } }//package
Section 79
//metalcrashsound (metalcrashsound) package { import flash.media.*; public dynamic class metalcrashsound extends Sound { } }//package
Section 80
//musicsound (musicsound) package { import flash.media.*; public dynamic class musicsound extends Sound { } }//package
Section 81
//nailgunammomc (nailgunammomc) package { import flash.display.*; public dynamic class nailgunammomc extends MovieClip { } }//package
Section 82
//nailgunmc (nailgunmc) package { import flash.display.*; public dynamic class nailgunmc extends MovieClip { } }//package
Section 83
//nailhitsound (nailhitsound) package { import flash.media.*; public dynamic class nailhitsound extends Sound { } }//package
Section 84
//nailmc (nailmc) package { import flash.display.*; public dynamic class nailmc extends MovieClip { } }//package
Section 85
//pistolammomc (pistolammomc) package { import flash.display.*; public dynamic class pistolammomc extends MovieClip { } }//package
Section 86
//pistolmc (pistolmc) package { import flash.display.*; public dynamic class pistolmc extends MovieClip { } }//package
Section 87
//pistolshootsound (pistolshootsound) package { import flash.media.*; public dynamic class pistolshootsound extends Sound { } }//package
Section 88
//planesound (planesound) package { import flash.media.*; public dynamic class planesound extends Sound { } }//package
Section 89
//playerdamagesound (playerdamagesound) package { import flash.media.*; public dynamic class playerdamagesound extends Sound { } }//package
Section 90
//pointdebrismc (pointdebrismc) package { import flash.display.*; public dynamic class pointdebrismc extends MovieClip { } }//package
Section 91
//rainfallsound (rainfallsound) package { import flash.media.*; public dynamic class rainfallsound extends Sound { } }//package
Section 92
//rainmc (rainmc) package { import flash.display.*; public dynamic class rainmc extends MovieClip { } }//package
Section 93
//ratmc (ratmc) package { import flash.display.*; public dynamic class ratmc extends MovieClip { } }//package
Section 94
//ratsqueaksound (ratsqueaksound) package { import flash.media.*; public dynamic class ratsqueaksound extends Sound { } }//package
Section 95
//rifleammomc (rifleammomc) package { import flash.display.*; public dynamic class rifleammomc extends MovieClip { } }//package
Section 96
//riflemc (riflemc) package { import flash.display.*; public dynamic class riflemc extends MovieClip { } }//package
Section 97
//rifleshootsound (rifleshootsound) package { import flash.media.*; public dynamic class rifleshootsound extends Sound { } }//package
Section 98
//rocketmc (rocketmc) package { import flash.display.*; public dynamic class rocketmc extends MovieClip { } }//package
Section 99
//rocketshootsound (rocketshootsound) package { import flash.media.*; public dynamic class rocketshootsound extends Sound { } }//package
Section 100
//rpgmc (rpgmc) package { import flash.display.*; public dynamic class rpgmc extends MovieClip { } }//package
Section 101
//screenflashmc (screenflashmc) package { import flash.display.*; public dynamic class screenflashmc extends MovieClip { } }//package
Section 102
//shell1sound (shell1sound) package { import flash.media.*; public dynamic class shell1sound extends Sound { } }//package
Section 103
//shell2sound (shell2sound) package { import flash.media.*; public dynamic class shell2sound extends Sound { } }//package
Section 104
//shell3sound (shell3sound) package { import flash.media.*; public dynamic class shell3sound extends Sound { } }//package
Section 105
//shell4sound (shell4sound) package { import flash.media.*; public dynamic class shell4sound extends Sound { } }//package
Section 106
//shell5sound (shell5sound) package { import flash.media.*; public dynamic class shell5sound extends Sound { } }//package
Section 107
//shotgunammomc (shotgunammomc) package { import flash.display.*; public dynamic class shotgunammomc extends MovieClip { } }//package
Section 108
//shotgunmc (shotgunmc) package { import flash.display.*; public dynamic class shotgunmc extends MovieClip { } }//package
Section 109
//shotgunshootsound (shotgunshootsound) package { import flash.media.*; public dynamic class shotgunshootsound extends Sound { } }//package
Section 110
//smallcrashsound (smallcrashsound) package { import flash.media.*; public dynamic class smallcrashsound extends Sound { } }//package
Section 111
//smgammomc (smgammomc) package { import flash.display.*; public dynamic class smgammomc extends MovieClip { } }//package
Section 112
//smgmc (smgmc) package { import flash.display.*; public dynamic class smgmc extends MovieClip { } }//package
Section 113
//smgshootsound (smgshootsound) package { import flash.media.*; public dynamic class smgshootsound extends Sound { } }//package
Section 114
//spinlightmc (spinlightmc) package { import flash.display.*; public dynamic class spinlightmc extends MovieClip { } }//package
Section 115
//squishsound (squishsound) package { import flash.media.*; public dynamic class squishsound extends Sound { } }//package
Section 116
//teleportsound (teleportsound) package { import flash.media.*; public dynamic class teleportsound extends Sound { } }//package
Section 117
//torsomc (torsomc) package { import flash.display.*; public dynamic class torsomc extends MovieClip { } }//package
Section 118
//turretbarrelmc (turretbarrelmc) package { import flash.display.*; public dynamic class turretbarrelmc extends MovieClip { } }//package
Section 119
//turretbasemc (turretbasemc) package { import flash.display.*; public dynamic class turretbasemc extends MovieClip { } }//package
Section 120
//turretexplodesound (turretexplodesound) package { import flash.media.*; public dynamic class turretexplodesound extends Sound { } }//package
Section 121
//turretshootsound (turretshootsound) package { import flash.media.*; public dynamic class turretshootsound extends Sound { } }//package
Section 122
//upperarmmc (upperarmmc) package { import flash.display.*; public dynamic class upperarmmc extends MovieClip { } }//package
Section 123
//upperlegmc (upperlegmc) package { import flash.display.*; public dynamic class upperlegmc extends MovieClip { } }//package
Section 124
//walldoormc (walldoormc) package { import flash.display.*; public dynamic class walldoormc extends MovieClip { } }//package
Section 125
//waterfallsound (waterfallsound) package { import flash.media.*; public dynamic class waterfallsound extends Sound { } }//package
Section 126
//watermarkbtn (watermarkbtn) package { import flash.display.*; public dynamic class watermarkbtn extends MovieClip { } }//package
Section 127
//waterspraysound (waterspraysound) package { import flash.media.*; public dynamic class waterspraysound extends Sound { } }//package
Section 128
//weapondisplaymc (weapondisplaymc) package { import flash.display.*; public dynamic class weapondisplaymc extends MovieClip { } }//package
Section 129
//weaponpickupsound (weaponpickupsound) package { import flash.media.*; public dynamic class weaponpickupsound extends Sound { } }//package
Section 130
//zombiediesound (zombiediesound) package { import flash.media.*; public dynamic class zombiediesound extends Sound { } }//package

Library Items

Symbol 1 Font {format2}
Symbol 2 Font {format}Used by:415 417 419 420 422 423 424 425 431 432 434 435 437 438 440 441 443 444 445 446 447 448 449 450 452 453 455 456 458
Symbol 3 Sound {zombiediesound}
Symbol 4 Sound {weaponpickupsound}
Symbol 5 Sound {waterspraysound}
Symbol 6 Sound {waterfallsound}
Symbol 7 Sound {turretshootsound}
Symbol 8 Sound {turretexplodesound}
Symbol 9 Sound {teleportsound}
Symbol 10 Sound {squishsound}
Symbol 11 Sound {smgshootsound}
Symbol 12 Sound {smallcrashsound}
Symbol 13 Sound {shotgunshootsound}
Symbol 14 Sound {shell5sound}
Symbol 15 Sound {shell4sound}
Symbol 16 Sound {shell3sound}
Symbol 17 Sound {shell2sound}
Symbol 18 Sound {shell1sound}
Symbol 19 Sound {rocketshootsound}
Symbol 20 Sound {rifleshootsound}
Symbol 21 Sound {ratsqueaksound}
Symbol 22 Sound {rainfallsound}
Symbol 23 Sound {playerdamagesound}
Symbol 24 Sound {planesound}
Symbol 25 Sound {pistolshootsound}
Symbol 26 Sound {nailhitsound}
Symbol 27 Sound {musicsound}
Symbol 28 Sound {metalcrashsound}
Symbol 29 Sound {megazombieintrosound}
Symbol 30 Sound {megazombieexhaustsound}
Symbol 31 Sound {megazombieenginesound}
Symbol 32 Sound {megazombiediesound}
Symbol 33 Sound {lasershootsound}
Symbol 34 Sound {hydrantspraysound}
Symbol 35 Sound {healthpickupsound}
Symbol 36 Sound {grenadeexplodesound}
Symbol 37 Sound {grenadebounce3sound}
Symbol 38 Sound {grenadebounce2sound}
Symbol 39 Sound {grenadebounce1sound}
Symbol 40 Sound {explosionsound}
Symbol 41 Sound {electricbuzzsound}
Symbol 42 Sound {dryfiresound}
Symbol 43 Sound {dripsound}
Symbol 44 Sound {dooropensound}
Symbol 45 Sound {crowcawsound}
Symbol 46 Sound {chainsawstartsound}
Symbol 47 Sound {chainsawrevsound}
Symbol 48 Sound {bigcrashsound}
Symbol 49 Sound {berserksound}
Symbol 50 Sound {ammopickupsound}
Symbol 51 Sound {alarmsound}
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClip {berserkbarmc}Uses:52
Symbol 54 GraphicUsed by:55
Symbol 55 MovieClip {berserkdisplaymc}Uses:54
Symbol 56 GraphicUsed by:57 228 260
Symbol 57 MovieClip {nailgunmc}Uses:56
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClip {cursormc}Uses:58
Symbol 60 GraphicUsed by:61
Symbol 61 MovieClip {cratemc}Uses:60
Symbol 62 GraphicUsed by:64
Symbol 63 GraphicUsed by:64
Symbol 64 MovieClip {barrelmc}Uses:62 63
Symbol 65 GraphicUsed by:72
Symbol 66 GraphicUsed by:72
Symbol 67 GraphicUsed by:72
Symbol 68 GraphicUsed by:72
Symbol 69 GraphicUsed by:72
Symbol 70 GraphicUsed by:72
Symbol 71 GraphicUsed by:72
Symbol 72 MovieClip {linkmc}Uses:65 66 67 68 69 70 71
Symbol 73 GraphicUsed by:93
Symbol 74 GraphicUsed by:93
Symbol 75 GraphicUsed by:93
Symbol 76 GraphicUsed by:93
Symbol 77 GraphicUsed by:93
Symbol 78 GraphicUsed by:93
Symbol 79 GraphicUsed by:93
Symbol 80 GraphicUsed by:93
Symbol 81 GraphicUsed by:93
Symbol 82 GraphicUsed by:93
Symbol 83 GraphicUsed by:93
Symbol 84 GraphicUsed by:93 109
Symbol 85 GraphicUsed by:93
Symbol 86 GraphicUsed by:93
Symbol 87 GraphicUsed by:93
Symbol 88 FontUsed by:89
Symbol 89 TextUses:88Used by:93
Symbol 90 GraphicUsed by:93
Symbol 91 GraphicUsed by:93
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {backgroundmc}Uses:73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 89 90 91 92
Symbol 94 GraphicUsed by:109
Symbol 95 GraphicUsed by:109
Symbol 96 GraphicUsed by:109
Symbol 97 GraphicUsed by:109
Symbol 98 GraphicUsed by:109
Symbol 99 GraphicUsed by:109
Symbol 100 GraphicUsed by:109
Symbol 101 GraphicUsed by:109
Symbol 102 GraphicUsed by:109
Symbol 103 GraphicUsed by:109
Symbol 104 GraphicUsed by:109
Symbol 105 GraphicUsed by:109
Symbol 106 GraphicUsed by:109
Symbol 107 GraphicUsed by:109
Symbol 108 GraphicUsed by:109
Symbol 109 MovieClip {foregroundmc}Uses:94 95 96 97 98 99 100 101 102 103 104 105 84 106 107 108
Symbol 110 GraphicUsed by:111
Symbol 111 MovieClip {screenflashmc}Uses:110
Symbol 112 GraphicUsed by:118
Symbol 113 GraphicUsed by:118
Symbol 114 GraphicUsed by:118
Symbol 115 GraphicUsed by:118
Symbol 116 GraphicUsed by:118
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClip {backdropmc}Uses:112 113 114 115 116 117
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClip {fademc}Uses:119
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClip {rifleammomc}Uses:121
Symbol 123 GraphicUsed by:125
Symbol 124 GraphicUsed by:125 152 206 228 260
Symbol 125 MovieClip {grenadeammomc}Uses:123 124
Symbol 126 GraphicUsed by:127
Symbol 127 MovieClip {pistolammomc}Uses:126
Symbol 128 GraphicUsed by:129
Symbol 129 MovieClip {smgammomc}Uses:128
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClip {rainmc}Uses:130
Symbol 132 GraphicUsed by:133
Symbol 133 MovieClip {fogmc}Uses:132
Symbol 134 GraphicUsed by:136 226
Symbol 135 GraphicUsed by:136 225
Symbol 136 MovieClip {legDmc}Uses:134 135
Symbol 137 GraphicUsed by:143 222
Symbol 138 GraphicUsed by:143 224
Symbol 139 GraphicUsed by:143 205
Symbol 140 GraphicUsed by:143 180
Symbol 141 GraphicUsed by:143 220
Symbol 142 GraphicUsed by:143 152 195 228
Symbol 143 MovieClip {bodyDmc}Uses:137 138 139 140 141 142
Symbol 144 GraphicUsed by:146 226
Symbol 145 GraphicUsed by:146 225
Symbol 146 MovieClip {legCmc}Uses:144 145
Symbol 147 GraphicUsed by:152 222
Symbol 148 GraphicUsed by:152 224
Symbol 149 GraphicUsed by:152 205
Symbol 150 GraphicUsed by:152 180
Symbol 151 GraphicUsed by:152 220
Symbol 152 MovieClip {bodyCmc}Uses:147 148 149 150 151 142 124
Symbol 153 GraphicUsed by:155
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClip {ratmc}Uses:153 154
Symbol 156 GraphicUsed by:159
Symbol 157 GraphicUsed by:159
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClip {turretbasemc}Uses:156 157 158
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClip {turretbarrelmc}Uses:160
Symbol 162 GraphicUsed by:165
Symbol 163 GraphicUsed by:165
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClip {boxdebrismc}Uses:162 163 164
Symbol 166 GraphicUsed by:169
Symbol 167 GraphicUsed by:169
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClip {linedebrismc}Uses:166 167 168
Symbol 170 GraphicUsed by:180
Symbol 171 GraphicUsed by:180
Symbol 172 GraphicUsed by:180
Symbol 173 GraphicUsed by:180
Symbol 174 GraphicUsed by:180
Symbol 175 GraphicUsed by:180
Symbol 176 GraphicUsed by:180
Symbol 177 GraphicUsed by:180
Symbol 178 GraphicUsed by:180
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClip {pointdebrismc}Uses:170 171 172 173 174 175 176 177 178 179 140 150
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClip {crowwingmc}Uses:181
Symbol 183 GraphicUsed by:185
Symbol 184 GraphicUsed by:185
Symbol 185 MovieClip {crowmc}Uses:183 184
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClip {shotgunammomc}Uses:186
Symbol 188 GraphicUsed by:190 226
Symbol 189 GraphicUsed by:190 225
Symbol 190 MovieClip {legBmc}Uses:188 189
Symbol 191 GraphicUsed by:195 222
Symbol 192 GraphicUsed by:195 224
Symbol 193 GraphicUsed by:195 205
Symbol 194 GraphicUsed by:195 220
Symbol 195 MovieClip {bodyBmc}Uses:191 192 193 194 142
Symbol 196 GraphicUsed by:197 228 260
Symbol 197 MovieClip {chainsawmc}Uses:196
Symbol 198 GraphicUsed by:199 228 260
Symbol 199 MovieClip {smgmc}Uses:198
Symbol 200 GraphicUsed by:201 228 260
Symbol 201 MovieClip {shotgunmc}Uses:200
Symbol 202 GraphicUsed by:203 228 260
Symbol 203 MovieClip {pistolmc}Uses:202
Symbol 204 GraphicUsed by:205 228
Symbol 205 MovieClip {torsomc}Uses:204 193 149 139
Symbol 206 MovieClip {grenademc}Uses:124
Symbol 207 GraphicUsed by:208
Symbol 208 MovieClip {healthmc}Uses:207
Symbol 209 GraphicUsed by:213
Symbol 210 GraphicUsed by:213
Symbol 211 GraphicUsed by:213
Symbol 212 GraphicUsed by:213
Symbol 213 MovieClip {bulletcasingmc}Uses:209 210 211 212
Symbol 214 GraphicUsed by:216 226
Symbol 215 GraphicUsed by:216 225
Symbol 216 MovieClip {legAmc}Uses:214 215
Symbol 217 GraphicUsed by:218 228 260
Symbol 218 MovieClip {riflemc}Uses:217
Symbol 219 GraphicUsed by:220 228
Symbol 220 MovieClip {headmc}Uses:219 194 151 141
Symbol 221 GraphicUsed by:222 228
Symbol 222 MovieClip {upperarmmc}Uses:221 191 147 137
Symbol 223 GraphicUsed by:224 228
Symbol 224 MovieClip {lowerarmmc}Uses:223 192 148 138
Symbol 225 MovieClip {upperlegmc}Uses:215 189 145 135
Symbol 226 MovieClip {lowerlegmc}Uses:214 188 144 134
Symbol 227 GraphicUsed by:228 260 265
Symbol 228 MovieClip {bodyAmc}Uses:223 221 204 217 219 202 124 200 198 196 142 56 227
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClip {berserkscreenmc}Uses:229
Symbol 231 GraphicUsed by:233
Symbol 232 GraphicUsed by:233
Symbol 233 MovieClip {citymc}Uses:231 232
Symbol 234 GraphicUsed by:235
Symbol 235 MovieClip {spinlightmc}Uses:234
Symbol 236 GraphicUsed by:237
Symbol 237 MovieClip {floordoormc}Uses:236
Symbol 238 GraphicUsed by:239
Symbol 239 MovieClip {walldoormc}Uses:238
Symbol 240 GraphicUsed by:242
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClip {computermc}Uses:240 241
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClip {healthdisplaymc}Uses:243
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {ammodisplaymc}Uses:245
Symbol 247 GraphicUsed by:251 306
Symbol 248 GraphicUsed by:251
Symbol 249 GraphicUsed by:251
Symbol 250 GraphicUsed by:251
Symbol 251 MovieClip {healthbarmc}Uses:247 248 249 250
Symbol 252 GraphicUsed by:260
Symbol 253 GraphicUsed by:260
Symbol 254 GraphicUsed by:260
Symbol 255 GraphicUsed by:260
Symbol 256 GraphicUsed by:260
Symbol 257 GraphicUsed by:260
Symbol 258 GraphicUsed by:260
Symbol 259 GraphicUsed by:260
Symbol 260 MovieClip {weapondisplaymc}Uses:252 196 253 202 254 217 255 198 256 200 257 124 258 56 259 227
Symbol 261 GraphicUsed by:262
Symbol 262 MovieClip {nailmc}Uses:261
Symbol 263 GraphicUsed by:264
Symbol 264 MovieClip {rocketmc}Uses:263
Symbol 265 MovieClip {rpgmc}Uses:227
Symbol 266 GraphicUsed by:267
Symbol 267 MovieClip {nailgunammomc}Uses:266
Symbol 268 GraphicUsed by:270
Symbol 269 GraphicUsed by:270
Symbol 270 MovieClip {megazombiemc}Uses:268 269
Symbol 271 GraphicUsed by:272
Symbol 272 MovieClip {megazombiegunmc}Uses:271
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:275 427
Symbol 275 MovieClip {watermarkbtn}Uses:274
Symbol 276 GraphicUsed by:Timeline
Symbol 277 GraphicUsed by:278
Symbol 278 MovieClipUses:277Used by:302 311 403
Symbol 279 GraphicUsed by:280
Symbol 280 MovieClipUses:279Used by:302 311 403
Symbol 281 GraphicUsed by:282
Symbol 282 MovieClipUses:281Used by:302 311 403
Symbol 283 GraphicUsed by:284 285 298
Symbol 284 MovieClipUses:283Used by:302 311 403
Symbol 285 MovieClipUses:283Used by:302 311 403
Symbol 286 GraphicUsed by:287
Symbol 287 MovieClipUses:286Used by:302 311 403
Symbol 288 GraphicUsed by:289
Symbol 289 MovieClipUses:288Used by:302 311 403
Symbol 290 GraphicUsed by:291
Symbol 291 MovieClipUses:290Used by:302 311 403
Symbol 292 GraphicUsed by:293
Symbol 293 MovieClipUses:292Used by:302 311 403
Symbol 294 GraphicUsed by:295 299
Symbol 295 MovieClipUses:294Used by:302 311 403
Symbol 296 GraphicUsed by:297
Symbol 297 MovieClipUses:296Used by:302 311 403
Symbol 298 MovieClipUses:283Used by:302 311 403
Symbol 299 MovieClipUses:294Used by:302 311 403
Symbol 300 GraphicUsed by:301
Symbol 301 MovieClipUses:300Used by:302 311 403
Symbol 302 MovieClip {mainfla_fla.BG_2}Uses:278 280 282 284 285 287 289 291 293 295 297 298 299 301Used by:410
Symbol 303 GraphicUsed by:304
Symbol 304 MovieClipUses:303Used by:410
Symbol 305 GraphicUsed by:410
Symbol 306 MovieClipUses:247Used by:310
Symbol 307 GraphicUsed by:308
Symbol 308 MovieClipUses:307Used by:309
Symbol 309 MovieClipUses:308Used by:310
Symbol 310 MovieClip {mainfla_fla.bar_root_18}Uses:306 309Used by:410
Symbol 311 MovieClipUses:278 280 284 287 291 295 297 298 299 301 293 289 285 282Used by:410
Symbol 312 GraphicUsed by:313
Symbol 313 MovieClipUses:312Used by:343 354 362 370 378 386 394 402 409
Symbol 314 GraphicUsed by:343
Symbol 315 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 316 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 317 GraphicUsed by:318
Symbol 318 MovieClipUses:317Used by:343 354 362 370 378 386 394 402
Symbol 319 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 320 GraphicUsed by:338 343
Symbol 321 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 322 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 323 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 324 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 325 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 326 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 327 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 328 FontUsed by:329
Symbol 329 TextUses:328Used by:343 354 362 370 378 386 394 402
Symbol 330 GraphicUsed by:343
Symbol 331 ShapeTweeningUsed by:343
Symbol 332 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 333 ShapeTweeningUsed by:343
Symbol 334 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 335 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 336 GraphicUsed by:343
Symbol 337 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 338 MovieClipUses:320Used by:343
Symbol 339 SoundUsed by:343 354 362 370 378 386 394 402
Symbol 340 GraphicUsed by:343 354 362 370 378 386 394 402 409
Symbol 341 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 342 GraphicUsed by:343 354 362 370 378 386 394 402
Symbol 343 MovieClip {mainfla_fla.LOGOPRELOAD_0_23}Uses:313 314 315 316 318 319 320 321 322 323 324 325 326 327 329 330 331 332 333 334 335 336 337 338 339 340 341 342Used by:410
Symbol 344 GraphicUsed by:354
Symbol 345 GraphicUsed by:351 354
Symbol 346 GraphicUsed by:354 362 370 378 386 394 402
Symbol 347 GraphicUsed by:354
Symbol 348 ShapeTweeningUsed by:354
Symbol 349 ShapeTweeningUsed by:354
Symbol 350 GraphicUsed by:354
Symbol 351 MovieClipUses:345Used by:354
Symbol 352 GraphicUsed by:353
Symbol 353 MovieClipUses:352Used by:354
Symbol 354 MovieClip {mainfla_fla.LOGOPRELOAD_1_27}Uses:313 344 315 316 318 319 345 321 322 323 324 325 326 327 346 329 347 348 332 349 334 335 350 337 351 339 340 341 342 353Used by:410
Symbol 355 GraphicUsed by:362
Symbol 356 GraphicUsed by:361 362
Symbol 357 GraphicUsed by:362
Symbol 358 ShapeTweeningUsed by:362
Symbol 359 ShapeTweeningUsed by:362
Symbol 360 GraphicUsed by:362
Symbol 361 MovieClipUses:356Used by:362
Symbol 362 MovieClip {mainfla_fla.LOGOPRELOAD_2_30}Uses:313 355 315 316 318 319 356 321 322 323 324 325 326 327 346 329 357 358 332 359 334 335 360 337 361 339 340 341 342Used by:410
Symbol 363 GraphicUsed by:370
Symbol 364 GraphicUsed by:369 370
Symbol 365 GraphicUsed by:370
Symbol 366 ShapeTweeningUsed by:370
Symbol 367 ShapeTweeningUsed by:370
Symbol 368 GraphicUsed by:370
Symbol 369 MovieClipUses:364Used by:370
Symbol 370 MovieClip {mainfla_fla.LOGOPRELOAD_3_32}Uses:313 363 315 316 318 319 364 321 322 323 324 325 326 327 346 329 365 366 332 367 334 335 368 337 369 339 340 341 342Used by:410
Symbol 371 GraphicUsed by:378
Symbol 372 GraphicUsed by:377 378
Symbol 373 GraphicUsed by:378
Symbol 374 ShapeTweeningUsed by:378
Symbol 375 ShapeTweeningUsed by:378
Symbol 376 GraphicUsed by:378
Symbol 377 MovieClipUses:372Used by:378
Symbol 378 MovieClip {mainfla_fla.LOGOPRELOAD_4_34}Uses:313 371 315 316 318 319 372 321 322 323 324 325 326 327 346 329 373 374 332 375 334 335 376 337 377 339 340 341 342Used by:410
Symbol 379 GraphicUsed by:386
Symbol 380 GraphicUsed by:385 386
Symbol 381 GraphicUsed by:386
Symbol 382 ShapeTweeningUsed by:386
Symbol 383 ShapeTweeningUsed by:386
Symbol 384 GraphicUsed by:386
Symbol 385 MovieClipUses:380Used by:386
Symbol 386 MovieClip {mainfla_fla.LOGOPRELOAD_5_36}Uses:313 379 315 316 318 319 380 321 322 323 324 325 326 327 346 329 381 382 332 383 334 335 384 337 385 339 340 341 342Used by:410
Symbol 387 GraphicUsed by:394
Symbol 388 GraphicUsed by:393 394
Symbol 389 GraphicUsed by:394
Symbol 390 ShapeTweeningUsed by:394
Symbol 391 ShapeTweeningUsed by:394
Symbol 392 GraphicUsed by:394
Symbol 393 MovieClipUses:388Used by:394
Symbol 394 MovieClip {mainfla_fla.LOGOPRELOAD_6_38}Uses:313 387 315 316 318 319 388 321 322 323 324 325 326 327 346 329 389 390 332 391 334 335 392 337 393 339 340 341 342Used by:410
Symbol 395 GraphicUsed by:402
Symbol 396 GraphicUsed by:401 402
Symbol 397 GraphicUsed by:402
Symbol 398 ShapeTweeningUsed by:402
Symbol 399 ShapeTweeningUsed by:402
Symbol 400 GraphicUsed by:402
Symbol 401 MovieClipUses:396Used by:402
Symbol 402 MovieClip {mainfla_fla.LOGOPRELOAD_7_40}Uses:313 395 315 316 318 319 396 321 322 323 324 325 326 327 346 329 397 398 332 399 334 335 400 337 401 339 340 341 342Used by:410
Symbol 403 MovieClipUses:278 280 284 287 291 295 297 298 299 301 293 289 285 282Used by:410
Symbol 404 GraphicUsed by:409
Symbol 405 GraphicUsed by:409
Symbol 406 GraphicUsed by:409
Symbol 407 GraphicUsed by:408
Symbol 408 MovieClipUses:407Used by:409
Symbol 409 MovieClip {mainfla_fla.LOGOEND_43}Uses:313 340 404 405 406 408 SS1Used by:410
Symbol 410 MovieClip {mainfla_fla.THEPRELOADER_1}Uses:302 304 305 310 311 343 354 362 370 378 386 394 402 403 409Used by:Timeline
Symbol 411 GraphicUsed by:412
Symbol 412 ButtonUses:411Used by:Timeline
Symbol 413 GraphicUsed by:Timeline
Symbol 414 GraphicUsed by:418 421 426 433 436 439 442 451 454 457
Symbol 415 EditableTextUses:2Used by:418
Symbol 416 GraphicUsed by:418 421 426 433 436 439 442 451 457
Symbol 417 EditableTextUses:2Used by:418
Symbol 418 ButtonUses:414 415 416 417Used by:Timeline
Symbol 419 EditableTextUses:2Used by:421
Symbol 420 EditableTextUses:2Used by:421
Symbol 421 ButtonUses:414 419 416 420Used by:Timeline
Symbol 422 EditableTextUses:2Used by:Timeline
Symbol 423 EditableTextUses:2Used by:Timeline
Symbol 424 EditableTextUses:2Used by:426
Symbol 425 EditableTextUses:2Used by:426
Symbol 426 ButtonUses:414 424 416 425Used by:Timeline
Symbol 427 ButtonUses:274Used by:Timeline
Symbol 428 GraphicUsed by:Timeline
Symbol 429 GraphicUsed by:430
Symbol 430 MovieClipUses:429Used by:Timeline
Symbol 431 EditableTextUses:2Used by:433
Symbol 432 EditableTextUses:2Used by:433
Symbol 433 ButtonUses:414 431 416 432Used by:Timeline
Symbol 434 EditableTextUses:2Used by:436
Symbol 435 EditableTextUses:2Used by:436
Symbol 436 ButtonUses:414 434 416 435Used by:Timeline
Symbol 437 EditableTextUses:2Used by:439
Symbol 438 EditableTextUses:2Used by:439
Symbol 439 ButtonUses:414 437 416 438Used by:Timeline
Symbol 440 EditableTextUses:2Used by:442
Symbol 441 EditableTextUses:2Used by:442
Symbol 442 ButtonUses:414 440 416 441Used by:Timeline
Symbol 443 EditableTextUses:2Used by:Timeline
Symbol 444 EditableTextUses:2Used by:Timeline
Symbol 445 EditableTextUses:2Used by:Timeline
Symbol 446 EditableTextUses:2Used by:Timeline
Symbol 447 EditableTextUses:2Used by:Timeline
Symbol 448 EditableTextUses:2Used by:Timeline
Symbol 449 EditableTextUses:2Used by:451
Symbol 450 EditableTextUses:2Used by:451
Symbol 451 ButtonUses:414 449 416 450Used by:Timeline
Symbol 452 EditableTextUses:2Used by:454
Symbol 453 EditableTextUses:2Used by:454
Symbol 454 ButtonUses:414 452 453Used by:Timeline
Symbol 455 EditableTextUses:2Used by:457
Symbol 456 EditableTextUses:2Used by:457
Symbol 457 ButtonUses:414 455 416 456Used by:Timeline
Symbol 458 EditableTextUses:2Used by:Timeline
Symbol 459 GraphicUsed by:460
Symbol 460 MovieClipUses:459Used by:Timeline
Streaming Sound 1Used by:Symbol 409 MovieClip {mainfla_fla.LOGOEND_43}

Instance Names

"beginbtn"Frame 3Symbol 418 Button
"optionsbtn"Frame 3Symbol 421 Button
"moregamesbtn"Frame 3Symbol 426 Button
"mofunzonebtn"Frame 3Symbol 427 Button
"particlequalityselection"Frame 4Symbol 430 MovieClip
"particlealphaselection"Frame 4Symbol 430 MovieClip
"debrisqualityselection"Frame 4Symbol 430 MovieClip
"qualityselection"Frame 4Symbol 430 MovieClip
"fullbtn0"Frame 4Symbol 433 Button
"reducedbtn0"Frame 4Symbol 436 Button
"nonebtn0"Frame 4Symbol 439 Button
"fullbtn1"Frame 4Symbol 433 Button
"reducedbtn1"Frame 4Symbol 436 Button
"nonebtn1"Frame 4Symbol 439 Button
"fullbtn2"Frame 4Symbol 433 Button
"reducedbtn2"Frame 4Symbol 436 Button
"fullbtn3"Frame 4Symbol 433 Button
"nonebtn3"Frame 4Symbol 439 Button
"fullbtn4"Frame 4Symbol 433 Button
"reducedbtn4"Frame 4Symbol 436 Button
"bulletcasingselection"Frame 4Symbol 430 MovieClip
"menubtn"Frame 4Symbol 442 Button
"mediumbtn"Frame 5Symbol 451 Button
"hardbtn"Frame 5Symbol 454 Button
"easybtn"Frame 5Symbol 457 Button
"menubtn2"Frame 5Symbol 442 Button
"maskmc"Frame 6Symbol 460 MovieClip
"barmask"Symbol 310 MovieClip {mainfla_fla.bar_root_18} Frame 1Symbol 306 MovieClip
"bar"Symbol 410 MovieClip {mainfla_fla.THEPRELOADER_1} Frame 1Symbol 310 MovieClip {mainfla_fla.bar_root_18}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.




http://swfchan.com/8/39585/info.shtml
Created: 12/5 -2019 03:51:32 Last modified: 12/5 -2019 03:51:32 Server time: 05/11 -2024 06:56:13