home *** CD-ROM | disk | FTP | other *** search
Wrap
_root.bulletmovement = function() { if(_root.bulletarray.length > 0) { var bc = _root.bulletarray.length - 1; while(bc >= 0) { if(_root.bulletarray[bc]._name eq "") { _root.bulletarray.splice(bc,1); } if(_root.bulletarray[bc].enemyshottype == "fbossgun") { if(Math.abs(_root.bulletarray[bc]._y - _root.bulletarray[bc].desty) > 5) { if(_root.bulletarray[bc]._y > _root.bulletarray[bc].desty) { _root.bulletarray[bc]._y -= 10; } else { _root.bulletarray[bc]._y += 10; } } else { _root.bulletarray[bc].desty = _root.bulletarray[bc].starty + (_root.bulletarray[bc].starty - _root.bulletarray[bc].desty); } } if(_root.bulletarray[bc].enemyshottype != "boss2laser1" and _root.bulletarray[bc].enemyshottype != "boss2laser2" and _root.bulletarray[bc].enemyshottype != "enemymissilet" and _root.bulletarray[bc].enemyshottype != "enemymissileb" and _root.bulletarray[bc].shottype != "homingmissile" and _root.bulletarray[bc].shottype != "bomb") { _root.bulletarray[bc]._x += _root.bulletarray[bc].xvalue; _root.bulletarray[bc]._y += _root.bulletarray[bc].yvalue; if(_root.bulletarray[bc].shottype == "sred") { if(Math.abs(_root.bulletarray[bc]._x - _root.bulletarray[bc].destx) < 15 and Math.abs(_root.bulletarray[bc]._y - _root.bulletarray[bc].desty) < 15) { if(_root.bulletarray[bc].exploding == false) { _root.bulletarray[bc].bomb.gotoAndStop(2); _root.bombexplodesound.stop(); _root.bombexplodesound.start(0,0); _root.bulletarray[bc].xvalue = 0; _root.bulletarray[bc].yvalue = 0; _root.bulletarray[bc].exploding = true; } } } } else if(_root.bulletarray[bc].enemyshottype == "boss2laser1") { _root.bulletarray[bc]._x = _root.enemyarray[_root.enemyarray.length - 1]._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun._x; _root.bulletarray[bc]._y = _root.enemyarray[_root.enemyarray.length - 1]._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun._y; } else if(_root.bulletarray[bc].enemyshottype == "boss2laser2") { _root.bulletarray[bc]._x = _root.enemyarray[_root.enemyarray.length - 1]._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype._x + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun2._x; _root.bulletarray[bc]._y = _root.enemyarray[_root.enemyarray.length - 1]._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype._y + _root.enemyarray[_root.enemyarray.length - 1].enemytype.lasergun2._y; } else if(_root.bulletarray[bc].shottype == "homingmissile") { if(_root.bulletarray[bc]._x > 730 or _root.bulletarray[bc]._x < -30) { _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } if(_root.bulletarray[bc].deploy == true) { _root.bulletarray[bc]._y += _root.bulletarray[bc].deployrate; _root.bulletarray[bc].deployrate -= 0.5; if(_root.bulletarray[bc].deployrate <= 0) { _root.bulletarray[bc].deployrate = false; } } if(_root.bulletarray[bc].deployrate <= 3) { _root.bulletarray[bc].gotoAndStop("boost"); if(_root[_root.bulletarray[bc].targetname]._visible == true) { diffx = int(_root[_root.bulletarray[bc].targetname]._x + _root[_root.bulletarray[bc].targetname].enemytype._x - _root.bulletarray[bc]._x); diffy = int(_root[_root.bulletarray[bc].targetname]._y + _root[_root.bulletarray[bc].targetname].enemytype._y - _root.bulletarray[bc]._y); if(diffx > 0 && diffy > 0) { quad = Number(4); } if(diffx < 0 && diffy > 0) { quad = Number(1); } if(diffx < 0 && diffy < 0) { quad = Number(2); } if(diffx > 0 && diffy < 0) { quad = Number(3); } abs_x = Math.abs(diffx); abs_y = Math.abs(diffy); tg = abs_y / abs_x; _root.maths = Math.atan(tg) * Number(180) / 3.141592653589793; distance = Math.sqrt(_root.bulletarray[bc]._x - _root.bulletarray[bc].targetx ^ 2 + (_root.bulletarray[bc]._y - _root.bulletarray[bc].targety) ^ 2); if(quad == 1) { angle = Number(180) - Number(_root.maths); } if(quad == 2) { angle = Number(180) + Number(_root.maths); } if(quad == 3) { angle = Number(360) - Number(_root.maths); } if(quad == 4) { angle = Number(_root.maths); } xmove = _root.bulletarray[bc].speedx * Math.cos(0.017453292519943295 * angle); ymove = _root.bulletarray[bc].speedy * Math.sin(0.017453292519943295 * angle); _root.bulletarray[bc].speedx += 2; _root.bulletarray[bc].speedy += 2; if(angle <= 180) { if(_root.bulletarray[bc]._rotation + 180 >= angle) { _root.bulletarray[bc]._rotation += (angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay; } else if(angle >= _root.bulletarray[bc]._rotation) { _root.bulletarray[bc]._rotation += (angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay; } else { _root.bulletarray[bc]._rotation -= (_root.bulletarray[bc]._rotation - angle) / _root.bulletarray[bc].megahomingturndelay; } } else if(angle > 180) { if(angle - 180 < _root.bulletarray[bc]._rotation) { if(_root.bulletarray[bc]._rotation < angle) { _root.bulletarray[bc]._rotation += (angle - _root.bulletarray[bc]._rotation) / _root.bulletarray[bc].megahomingturndelay; } else { _root.bulletarray[bc]._rotation -= (_root.bulletarray[bc]._rotation - angle) / _root.bulletarray[bc].megahomingturndelay; } } else { _root.bulletarray[bc]._rotation -= (360 - (angle - _root.bulletarray[bc]._rotation)) / _root.bulletarray[bc].megahomingturndelay; } } _root.bulletarray[bc]._x += xmove; _root.bulletarray[bc]._y += ymove; } else { if(_root.bulletarray[bc]._rotation != 0) { _root.bulletarray[bc]._rotation -= _root.bulletarray[bc]._rotation / megahomingturndelay; } _root.bulletarray[bc]._x += _root.bulletarray[bc].megahomingacceleratex; _root.bulletarray[bc].megahomingacceleratex += 2; } } } else if(_root.bulletarray[bc].shottype == "bomb") { if(_root.bombexplode != true) { _root.bulletarray[bc]._x += _root.bulletarray[bc].xvalue; } } else if(_root.bulletarray[bc].enemyshottype == "enemymissilet") { if(_root.bulletarray[bc].deploy != false) { _root.bulletarray[bc]._y -= _root.bulletarray[bc].deployrate; _root.bulletarray[bc].deployrate--; if(_root.bulletarray[bc].angle2 > _root.bulletarray[bc]._rotation) { if(_root.bulletarray[bc].angle2 - _root.bulletarray[bc]._rotation > 20) { _root.bulletarray[bc]._rotation += 20; } else { _root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2; } } else if(_root.bulletarray[bc]._rotation - _root.bulletarray[bc].angle2 > 50) { _root.bulletarray[bc]._rotation -= 50; } else { _root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2; } if(_root.bulletarray[bc].deployrate <= 0) { _root.bulletarray[bc].speed = 5; _root.bulletarray[bc].xvalue = Math.cos(_root.bulletarray[bc].angle); _root.bulletarray[bc].yvalue = Math.sin(_root.bulletarray[bc].angle); _root.bulletarray[bc].deploy = false; } } else { _root.bulletarray[bc]._x -= _root.bulletarray[bc].speed * _root.bulletarray[bc].xvalue; _root.bulletarray[bc]._y -= _root.bulletarray[bc].speed * _root.bulletarray[bc].yvalue; _root.bulletarray[bc].speed += 2; } } else if(_root.bulletarray[bc].enemyshottype == "enemymissileb") { if(_root.bulletarray[bc].deploy != false) { _root.bulletarray[bc]._y += _root.bulletarray[bc].deployrate; _root.bulletarray[bc].deployrate--; if(_root.bulletarray[bc].angle2 > _root.bulletarray[bc]._rotation) { if(_root.bulletarray[bc].angle2 - _root.bulletarray[bc]._rotation > 50) { _root.bulletarray[bc]._rotation += 50; } else { _root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2; } } else if(_root.bulletarray[bc]._rotation - _root.bulletarray[bc].angle2 > 50) { _root.bulletarray[bc]._rotation -= 50; } else { _root.bulletarray[bc]._rotation = _root.bulletarray[bc].angle2; } if(_root.bulletarray[bc].deployrate <= 0) { _root.bulletarray[bc].speed = 5; _root.bulletarray[bc].xvalue = Math.cos(_root.bulletarray[bc].angle); _root.bulletarray[bc].yvalue = Math.sin(_root.bulletarray[bc].angle); _root.bulletarray[bc].deploy = false; } } else { _root.bulletarray[bc]._x -= _root.bulletarray[bc].speed * _root.bulletarray[bc].xvalue; _root.bulletarray[bc]._y -= _root.bulletarray[bc].speed * _root.bulletarray[bc].yvalue; _root.bulletarray[bc].speed += 2; } } if(_root.bulletarray[bc].enemyshottype == "boss3") { if(_root.bulletarray[bc].follow < 25) { _root.bulletarray[bc].follow = _root.bulletarray[bc].follow + 1; _root.bulletarray[bc].diffx = _root.bulletarray[bc]._x - (_root.ship._x + _root.ship.shipmc._x); _root.bulletarray[bc].diffy = _root.bulletarray[bc]._y - (_root.ship._y + _root.ship.shipmc._y); _root.bulletarray[bc].angle = Math.atan2(_root.bulletarray[bc].diffy,_root.bulletarray[bc].diffx); _root.bulletarray[bc].xvalue = -7 * Math.cos(_root.bulletarray[bc].angle); _root.bulletarray[bc].yvalue = -7 * Math.sin(_root.bulletarray[bc].angle); } } if(_root.bulletarray[bc].shottype == "enemy") { if(_root.bulletarray[bc].hitTest(_root.ship.protector.sphere) or _root.bulletarray[bc].hitTest(_root.ship.protector2.sphere) or _root.bulletarray[bc].hitTest(_root.bomb1)) { if(_root.bulletarray[bc].enemyshottype != "boss2laser1" and _root.bulletarray[bc].enemyshottype != "boss2laser2" and _root.bulletarray[bc].enemyshottype != "fbosslaser") { if(_root.bulletarray[bc].hitTest(_root.ship.protector.sphere)) { _root.protector1health -= 1; if(_root.protector1health < 7 and _root.protector1health > 2) { _root.ship.protector.sphere.gotoAndStop("half"); } else if(_root.protector1health <= 2 and _root.protector1health >= 0) { _root.ship.protector.sphere.gotoAndStop("critical"); } else if(_root.protector1health < 0) { trace("Protector1 Gone"); if(_root.protectorlevel > 2) { _root.protectorframe = _root.ship.protector2._currentframe - 19; if(_root.protectorframe < 3) { _root.protectorframe = 41 + _root.protectorframe; } _root.protectorlevel = 2; if(_root.autorotate == true) { _root.ship.protector.gotoAndPlay(_root.protectorframe); } else { _root.ship.protector.gotoAndStop(_root.protectorframe); } _root.protector1health = _root.protector2health; if(_root.protector1health < 7 and _root.protector1health > 2) { _root.ship.protector.sphere.gotoAndStop("half"); } else if(_root.protector1health <= 2 and _root.protector1health >= 0) { _root.ship.protector.sphere.gotoAndStop("critical"); } } else { _root.protectorlevel = 0; } _root.enemyexplodesound.stop(); _root.enemyexplodesound.start(0,0); duplicateMovieClip(_root.shipexplosion,"shipexplosion" + _root.depth,16384 + _root.depth); _root["shipexplosion" + _root.depth]._x = _root.ship._x + _root.ship.protector._x + _root.ship.protector.sphere._x; _root["shipexplosion" + _root.depth]._y = _root.ship._y + _root.ship.protector._y + _root.ship.protector.sphere._y; _root["shipexplosion" + _root.depth]._xscale = _root["shipexplosion" + _root.depth]._yscale = 50; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } } } if(_root.bulletarray[bc].hitTest(_root.ship.protector2.sphere)) { _root.protector2health -= 1; if(_root.protector2health < 7 and _root.protector2health > 2) { _root.ship.protector2.sphere.gotoAndStop("half"); } else if(_root.protector2health <= 2 and _root.protector2health >= 0) { _root.ship.protector2.sphere.gotoAndStop("critical"); } else if(_root.protector2health < 0) { trace("Protector2 Gone"); _root.protectorlevel = 2; _root.enemyexplodesound.stop(); _root.enemyexplodesound.start(0,0); duplicateMovieClip(_root.shipexplosion,"shipexplosion" + _root.depth,16384 + _root.depth); _root["shipexplosion" + _root.depth]._x = _root.ship._x + _root.ship.protector2._x + _root.ship.protector2.sphere._x; _root["shipexplosion" + _root.depth]._y = _root.ship._y + _root.ship.protector2._y + _root.ship.protector2.sphere._y; _root["shipexplosion" + _root.depth]._xscale = _root["shipexplosion" + _root.depth]._yscale = 50; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } } } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } } if(_root.boss2stoplaser == true) { if(_root.bulletarray[bc].enemyshottype == "boss2laser1" or _root.bulletarray[bc].enemyshottype == "boss2laser2") { _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } } if(_root.bulletarray[bc].hitTest(_root.ship.shipmc)) { _root.hitship = true; _root.shieldfadein = true; _root.checkhealth = true; if(_root.difficulty == "expert") { _root.hitshipcounter = _root.hitshipcounter + 1; if(_root.hitshipcounter == 6) { if(_root.weaponnumber > 1) { _root.weaponnumber--; } _root.hitshipcounter = 0; } } if(_root.bulletarray[bc].enemyshottype == "shot1") { _root.shipshield -= 5; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "enemymissilet" or _root.bulletarray[bc].enemyshottype == "enemymissileb") { _root.shipshield -= 7; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "enemy7") { _root.shipshield -= 8; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "boss1electric") { _root.shipshield -= 8; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "boss1canon") { _root.mhexplosion.stop(); _root.mhexplosion.start(0,0); _root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth,_root.depth); _root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x; _root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y; _root["mhexplode" + _root.depth]._xscale = _root["mhexplode" + _root.depth]._yscale = 300; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } _root.shipshield -= 15; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "boss2laser1" or _root.bulletarray[bc].enemyshottype == "boss2laser2") { _root.shipshield -= 2; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); } else if(_root.bulletarray[bc].enemyshottype == "boss2gun") { _root.shipshield -= 6; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "boss2big") { _root.shipshield -= 10; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "boss3") { _root.shipshield -= 4; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "fbossgun") { _root.shipshield -= 6; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].enemyshottype == "fbosslaser" or _root.bulletarray[bc].enemyshottype == "boss2laser2") { _root.shipshield -= 1; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); } } } else if(_root.bulletarray[bc].shottype != "enemy") { if(_root.bulletarray[bc].shottype == "airmine" and _root.bulletarray[bc].hitTest(_root.ship.shipmc)) { _root.shipshield -= 0.3; _root.status.mask.shield._xscale = 100 * (_root.shipshield / _root.shipshieldtotal); } i = 0; while(i < _root.enemyarray.length) { if(_root.bulletarray[bc].hitTest(_root.enemyarray[i].enemytype)) { _root.hitenemy = _root.enemyarray[i]._name; if(_root.bulletarray[bc].shottype != "blue1" and _root.bulletarray[bc].shottype != "blue4" and _root.bulletarray[bc].shottype != "blue3" and _root.bulletarray[bc].shottype != "blue2" and _root.bulletarray[bc].shottype != "sblue" and _root.bulletarray[bc].shottype != "bomb" and _root.bulletarray[bc].shottype != "sred" and _root.bulletarray[bc].shottype != "sgreen") { if(_root.bulletarray[bc].xvalue >= 0) { _root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth,_root.depth); _root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x + 20; _root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y; _root["mhexplode" + _root.depth]._xscale = _root["mhexplode" + _root.depth]._yscale = 50; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } } else { _root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth,_root.depth); _root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x - 20; _root["mhexplode" + _root.depth]._y = _root.bulletarray[bc]._y; _root["mhexplode" + _root.depth]._xscale = _root["mhexplode" + _root.depth]._yscale = 50; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } } } else if(_root.bulletarray[bc].shottype != "sblue" and _root.bulletarray[bc].shottype != "bomb" and _root.bulletarray[bc].shottype != "sred" and _root.bulletarray[bc].shottype != "sgreen") { _root.bulletarray[bc].explodedelay = _root.bulletarray[bc].explodedelay + 1; if(_root.bulletarray[bc].explodedelay == 3) { _root.mhexplosionmc.duplicateMovieClip("mhexplode" + _root.depth,_root.depth); _root["mhexplode" + _root.depth]._x = _root.bulletarray[bc]._x + 30; _root["mhexplode" + _root.depth]._y = _root.enemyarray[i]._y + _root.enemyarray[i].enemytype._y + (random(30) - 15); _root["mhexplode" + _root.depth]._xscale = _root["mhexplode" + _root.depth]._yscale = 50; if(_root.depth < 100000) { _root.depth = _root.depth + 1; } else { _root.depth = 100; } _root.bulletarray[bc].explodedelay = 0; } } if(_root.bulletarray[bc].shottype == "homingmissile") { _root.mhexplosion.stop(); _root.mhexplosion.start(0,0); _root.enemyarray[i].health -= 2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "red1") { _root.enemyarray[i].health -= 1.5; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 1.5; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "red2") { _root.enemyarray[i].health -= 1.9; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 1.9; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "red3") { _root.enemyarray[i].health -= 2.3; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2.3; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "red4") { _root.enemyarray[i].health -= 2.7; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2.7; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "sred") { if(_root.bulletarray[bc].exploding == true) { _root.enemyarray[i].health -= 1; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.2; } } } else if(_root.bulletarray[bc].shottype == "blue1") { _root.enemyarray[i].health -= 0.3; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.3; } } else if(_root.bulletarray[bc].shottype == "blue2") { _root.enemyarray[i].health -= 0.34; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.36; } } else if(_root.bulletarray[bc].shottype == "blue3") { _root.enemyarray[i].health -= 0.48; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.42; } } else if(_root.bulletarray[bc].shottype == "blue4") { _root.enemyarray[i].health -= 0.42; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.47; } } else if(_root.bulletarray[bc].shottype == "sblue") { _root.enemyarray[i].health -= 2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.4; } } else if(_root.bulletarray[bc].shottype == "green1") { _root.enemyarray[i].health -= 1.8; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 1.8; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "green2") { _root.enemyarray[i].health -= 2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "green3") { _root.enemyarray[i].health -= 2.2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2.4; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "green4") { _root.enemyarray[i].health -= 2.5; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 2.5; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } else if(_root.bulletarray[bc].shottype == "sgreen") { _root.enemyarray[i].health -= 2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.4; } } else if(_root.bulletarray[bc].shottype == "laser") { _root.enemyarray[i].health -= 3.5; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 1.17; } } else if(_root.bulletarray[bc].shottype == "bomb") { if(_root.bombexplode == true) { _root.enemyarray[i].health -= 2; if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.boss3health -= 0.4; } } } _root.enemyarray[i].gotoAndPlay("hit"); if(_root.enemyarray[i].enemytypevar == "boss3head" or _root.enemyarray[i].enemytypevar == "boss3body" or _root.enemyarray[i].enemytypevar == "boss3tail") { _root.enemyarray[_root.enemyarray.length - 1].gotoAndPlay("hit"); _root.enemyarray[_root.enemyarray.length - 2].gotoAndPlay("hit"); _root.enemyarray[_root.enemyarray.length - 3].gotoAndPlay("hit"); _root.enemyarray[_root.enemyarray.length - 4].gotoAndPlay("hit"); _root.enemyarray[_root.enemyarray.length - 5].gotoAndPlay("hit"); } } i++; } } if(_root.bulletarray[bc].xvalue > 0) { if(_root.bulletarray[bc]._x > 730 or _root.bulletarray[bc]._y < -50 or _root.bulletarray[bc]._y > 550) { if(_root.bulletarray[bc].shottype == "bomb") { _root.bombfire = false; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } } else if(_root.bulletarray[bc].xvalue < 0) { if(_root.bulletarray[bc]._x < -30 or _root.bulletarray[bc]._y < -50 or _root.bulletarray[bc]._y > 550) { if(_root.bulletarray[bc].shottype == "bomb") { _root.bombfire = false; } _root.bulletarray[bc].removeMovieClip(); _root.bulletarray.splice(bc,1); } } bc--; } } };