home *** CD-ROM | disk | FTP | other *** search
- function SargDraft()
- {
- attachMovie("sargeant","sargeant",2880);
- _root.sargeant._x = 700;
- _root.sargeant._y = 175;
- _root.sargeant._xscale = 80;
- _root.sargeant._yscale = 80;
- ascent = int(Math(random) * 4);
- dessent = 2;
- }
- function sargcolliz()
- {
- attachMovie("Scolz","Scolz",21);
- _root.Scolz._visible = false;
- }
- function sargboltload()
- {
- attachMovie("SargBolt","SargBolt1",2885);
- _root.SargBolt1._x = _root.sargeant._x - 24;
- _root.SargBolt1._y = _root.sargeant._y - 28;
- _root.SargBolt1._visible = false;
- _root.SargBolt1._xscale = 185;
- _root.SargBolt1._yscale = 185;
- samocl = 0;
- sloaddd = true;
- again = int(Math.random() * 5);
- }
- function powerupper()
- {
- attachMovie("healthupper","powerup",7689);
- _root.powerup._visible = false;
- _root.powerup._x = _root.sargeant._x;
- _root.powerup._y = _root.sargeant._y;
- _root.powerup._xscale = 27;
- _root.powerup._yscale = 27;
- }
- function airmobleZ()
- {
- _root.airmobl._x = int(Math.random() * 195 + 380);
- _root.airmobl._y = -120;
- _root.airmobl.gotoAndPlay(1);
- airMO = int(Math.random() * 8 + 4);
- Napo = 2;
- _root.airmobl.rockit = 0;
- _root.airmobl.swapDepths(3175);
- }
- function airmissload()
- {
- _root.missile._xscale = 65;
- _root.missile._yscale = 65;
- _root.missile._x = _root.airmobl._x + 30;
- _root.missile._y = _root.airmobl._y - 15;
- _root.missile.swapDepths(3325);
- }
- function draftgrunt1()
- {
- attachMovie("grunt","grunt1",4100);
- _root.grunt1._x = 720;
- _root.grunt1._y = 312;
- starter = false;
- snipertime = getTimer() + 2500;
- aimfire = false;
- _root.grunt1._xscale = 72;
- _root.grunt1._yscale = 72;
- onfield = false;
- grunTime = 0;
- velo = int(Math.random() * 5);
- verto = int(Math.random() * 8);
- upordown = int(Math.random() * 4);
- _root.grunt1._visible = false;
- _root.grunt1.swapDepths(4100);
- }
- function draftgrunt2()
- {
- attachMovie("grunt","grunt2",3200);
- _root.grunt2._x = 720;
- _root.grunt2._y = 245;
- Bstarter = false;
- Bsnipertime = getTimer() + 2500;
- Baimfire = false;
- _root.grunt2._xscale = 68;
- _root.grunt2._yscale = 68;
- Bonfield = false;
- BgrunTime = 0;
- Bvelo = int(Math.random() * 5);
- Bverto = int(Math.random() * 8);
- Bupordown = int(Math.random() * 4);
- _root.grunt2._visible = false;
- }
- function draftgrunt3()
- {
- attachMovie("grunt","grunt3",2500);
- _root.grunt3._x = 720;
- _root.grunt3._y = 180;
- starter = false;
- Caimfire = false;
- _root.grunt3._xscale = 65;
- _root.grunt3._yscale = 65;
- Confield = false;
- CgrunTime = 0;
- Cvelo = int(Math.random() * 5);
- Cverto = int(Math.random() * 8);
- Cupordown = int(Math.random() * 4);
- _root.grunt3._visible = false;
- }
- function draftgrunt4()
- {
- attachMovie("grunt","grunt4",2000);
- _root.grunt4._x = 720;
- _root.grunt4._y = 120;
- Dstarter = false;
- Dsnipertime = getTimer() + 2500;
- Daimfire = false;
- _root.grunt4._xscale = 63;
- _root.grunt4._yscale = 63;
- Donfield = false;
- DgrunTime = 0;
- Dvelo = int(Math.random() * 5);
- Dverto = int(Math.random() * 8);
- Dupordown = int(Math.random() * 4);
- _root.grunt4._visible = false;
- }
- function draftgrunt5()
- {
- attachMovie("grunt","grunt5",1000);
- _root.grunt5._x = 720;
- _root.grunt5._y = 80;
- Estarter = false;
- Esnipertime = getTimer() + 2500;
- Eaimfire = false;
- _root.grunt5._xscale = 60;
- _root.grunt5._yscale = 60;
- Eonfield = false;
- EgrunTime = 0;
- Evelo = int(Math.random() * 5);
- Everto = int(Math.random() * 8);
- Eupordown = int(Math.random() * 4);
- _root.grunt5._visible = false;
- }
- function fiveshotload()
- {
- attachMovie("gruntbolt","gruntbolt5",1900);
- gruntbolt5._x = _root.grunt5._x - 60;
- gruntbolt5._y = _root.grunt5._y - 8;
- gruntbolt5.swapDepths(1900);
- gruntbolt5._visible = false;
- Efirenow = 0;
- Eammoloaded = true;
- Ereload = int(Math.random() * 5);
- gruntbolt5._xscale = 84;
- gruntbolt5._yscale = 84;
- }
- function airmobdeploy()
- {
- if(_root.airmobl.rockit > 250 && _root.viza._currentframe <= 50)
- {
- _root.airmobl._x += Napo;
- _root.airmobl._y += airMO;
- }
- if(_root.viza._currentframe > 50)
- {
- Napo = 0;
- airMO = 0;
- }
- if(_root.airmobl._y <= 60)
- {
- airMO = int(Math.random() * 14 + 2);
- }
- if(_root.airmobl._y >= 320)
- {
- airMO *= -1;
- }
- if(_root.airmobl._x > 575)
- {
- Napo *= -1;
- }
- else if(_root.airmobl._x < 380)
- {
- Napo *= -1;
- }
- if(_root.airmobl._currentframe >= 14)
- {
- _root.airmobl._x = int(Math.random() * 195 + 380);
- _root.airmobl._y = -120;
- _root.airmobl.gotoAndPlay(1);
- _root.airmobl.rockit = 0;
- }
- if(_root.airmobl._y < 0 && _root.vtol.deadlies == true)
- {
- _root.airmobl._x = int(Math.random() * 195 + 380);
- _root.airmobl._y = -120;
- _root.airmobl.gotoAndPlay(1);
- _root.airmobl.rockit = 0;
- }
- if(_root.airmobl._y < 0 && _root.maus.happy == true)
- {
- _root.airmobl._x = int(Math.random() * 195 + 380);
- _root.airmobl._y = -120;
- _root.airmobl.gotoAndPlay(1);
- _root.airmobl.rockit = 0;
- }
- _root.airmobl.rockit = _root.airmobl.rockit + 1;
- }
- function airmocolliz()
- {
- _root.airCoz._x = _root.airmobl._x;
- _root.airCoz._y = _root.airmobl._y;
- _root.airCoz._yscale = 97;
- _root.airCoz._visible = false;
- }
- function airmisLock()
- {
- timetolaunch = getTimer() + 4000;
- if(timetolaunch <= getTimer() || _root.missile._x < -200)
- {
- _root.missile._x = _root.airmobl._x + 30;
- _root.missile._y = _root.airmobl._y - 15;
- _root.missile.gotoAndPlay(1);
- }
- if(_root.airmobl._x >= 2 && timetolaunch >= getTimer())
- {
- _root.missile._x -= 30;
- timetolaunch = getTimer() + int(Math.random() * 1966 + 2500);
- }
- }
- function SargDeploy()
- {
- _root.sargeant._x -= 3;
- if(ascent <= 2)
- {
- _root.sargeant._y += dessent;
- }
- else
- {
- _root.sargeant._y -= dessent;
- }
- if(_root.sargeant._y < 80 || _root.sargeant._y > 320)
- {
- dessent *= -1;
- }
- if(_root.sargeant._x < -120 && _root.viza._currentframe <= 50)
- {
- _root.sargeant._x = -120;
- holding = int(Math.random() * 800);
- if(holding < 5)
- {
- _root.sargeant._x = 700;
- _root.sargeant.gotoAndPlay(1);
- }
- }
- holding--;
- }
- function sargcolbox()
- {
- if(_root.sargeant._visible == true && _root.sargeant._x <= 700)
- {
- _root.Scolz._x = _root.sargeant._x;
- _root.Scolz._y = _root.sargeant._y;
- }
- else
- {
- _root.Scolz._x = 720;
- _root.Scolz._y = 188;
- }
- }
- function sargboltfire()
- {
- if(sloadd == true && _root.SargBolt1._visible == false)
- {
- _root.SargBolt1._x = _root.sargeant._x - 24;
- _root.SargBolt1._y = _root.sargeant._y - 28;
- }
- else
- {
- _root.SargBolt1._visible == true && sloadd == false;
- }
- _root.SargBolt1._x -= 45;
- if(_root.SargBolt1._x <= -55)
- {
- sloadd = true;
- _root.SargBolt1._visible = false;
- }
- if(samocl >= 30 && _root.sargeant._x >= 80 && _root.sargeant._x <= 650 && _root.sargeant._currentframe < 7)
- {
- _root.SargBolt1._x = _root.sargeant._x - 24;
- _root.SargBolt1._y = _root.sargeant._y - 28;
- sloadd = false;
- _root.SargBolt1._visible = true;
- _root.SargBolt1.gotoAndPlay(1);
- if(again <= 2)
- {
- samocl = 0;
- }
- if(again == 3)
- {
- samocl = int(Math.random() * 15) * -1;
- }
- if(again >= 4)
- {
- samocl = int(Math.random() * 20);
- }
- }
- samocl++;
- }
- function powerhealth()
- {
- _root.powerup._x = _root.sargeant._x;
- _root.powerup._y = _root.sargeant._y;
- if(_root.powerup._x <= -50)
- {
- _root.powerup._visible = false;
- }
- }
- function deployGrunt1()
- {
- if(grunTime > 45)
- {
- if(Math.random() < 0.08 && onfield == false)
- {
- starter = true;
- onfield = true;
- }
- if((starter = true) && (onfield = true))
- {
- _root.grunt1._visible = true;
- _root.grunt1._x -= 6 + velo;
- gruntTime = 0;
- if(_root.grunt1._x >= 0 && _root.grunt1._x <= 655)
- {
- aimfire = true;
- }
- if(upordown == 1 || upordown == 0)
- {
- _root.grunt1._y += 0;
- }
- if(upordown == 2)
- {
- _root.grunt1._y += verto;
- }
- if(upordown >= 3)
- {
- _root.grunt1._y -= verto;
- }
- if(_root.grunt1._y > 320)
- {
- upordown = 3;
- }
- if(_root.grunt1._y < 65)
- {
- upordown = 2;
- }
- }
- }
- if(_root.grunt1._x < -100 && _root.viza._currentframe <= 50)
- {
- starter = false;
- onfield = false;
- _root.grunt1._x = 720;
- _root.grunt1._y = 312;
- grunTime = 0;
- velo = int(Math.random() * 5);
- verto = int(Math.random() * 8);
- upordown = int(Math.random() * 3);
- _root.grunt1.gotoAndPlay(1);
- _root.grunt1._visible = false;
- aimfire == false;
- _root.gruntbolt1.reload = int(Math.random() * 5);
- _root.gruntCount = _root.gruntCount + 1;
- }
- grunTime++;
- }
- function deployGrunt2()
- {
- if(BgrunTime > 30)
- {
- if(Math.random() < 0.08 && Bonfield == false)
- {
- Bstarter = true;
- Bonfield = true;
- }
- if((Bstarter = true) && (Bonfield = true))
- {
- _root.grunt2._visible = true;
- _root.grunt2._x -= 6 + Bvelo;
- BgruntTime = 0;
- if(_root.grunt2._x >= 0 && _root.grunt2._x <= 655)
- {
- Baimfire = true;
- }
- if(Bupordown == 1 || Bupordown == 0)
- {
- _root.grunt2._y += 0;
- }
- if(Bupordown == 2)
- {
- _root.grunt2._y += Bverto;
- }
- if(Bupordown >= 3)
- {
- _root.grunt2._y -= Bverto;
- }
- if(_root.grunt2._y > 320)
- {
- Bupordown = 3;
- }
- if(_root.grunt2._y < 65)
- {
- Bupordown = 2;
- }
- }
- }
- if(_root.grunt2._x < -100 && _root.viza._currentframe <= 50)
- {
- Bstarter = false;
- Bonfield = false;
- _root.grunt2._x = 720;
- _root.grunt2._y = 245;
- BgrunTime = 0;
- Bvelo = int(Math.random() * 5);
- Bverto = int(Math.random() * 8);
- Bupordown = int(Math.random() * 3);
- _root.grunt2.gotoAndPlay(1);
- _root.grunt2._visible = false;
- Baimfire == false;
- _root.gruntbolt2.reload = int(Math.random() * 5);
- _root.gruntCount = _root.gruntCount + 1;
- }
- BgrunTime++;
- }
- function deployGrunt3()
- {
- if(CgrunTime > 25)
- {
- if(Math.random() < 0.08 && Confield == false)
- {
- Cstarter = true;
- Confield = true;
- }
- if((Cstarter = true) && (Confield = true))
- {
- _root.grunt3._visible = true;
- _root.grunt3._x -= 6 + Cvelo;
- CgruntTime = 0;
- if(_root.grunt3._x >= 0 && _root.grunt3._x <= 655)
- {
- Caimfire = true;
- }
- if(Cupordown == 1 || Cupordown == 0)
- {
- _root.grunt3._y += 0;
- }
- if(Cupordown == 2)
- {
- _root.grunt3._y += Cverto;
- }
- if(Cupordown >= 3)
- {
- _root.grunt3._y -= Cverto;
- }
- if(_root.grunt3._y > 320)
- {
- Cupordown = 3;
- }
- if(_root.grunt3._y < 65)
- {
- Cupordown = 2;
- }
- }
- }
- if(_root.grunt3._x < -100 && _root.viza._currentframe <= 50)
- {
- Cstarter = false;
- Confield = false;
- _root.grunt3._x = 720;
- _root.grunt3._y = 180;
- CgrunTime = 0;
- Cvelo = int(Math.random() * 5);
- Cverto = int(Math.random() * 8);
- Cupordown = int(Math.random() * 3);
- _root.grunt3.gotoAndPlay(1);
- _root.grunt3._visible = false;
- Caimfire == false;
- _root.gruntbolt3.reload = int(Math.random() * 5);
- _root.gruntCount = _root.gruntCount + 1;
- }
- CgrunTime++;
- }
- function deployGrunt4()
- {
- if(DgrunTime > 55)
- {
- if(Math.random() < 0.08 && Donfield == false)
- {
- Dstarter = true;
- Donfield = true;
- }
- if((Dstarter = true) && (Donfield = true))
- {
- _root.grunt4._visible = true;
- _root.grunt4._x -= 6 + Dvelo;
- DgruntTime = 0;
- if(_root.grunt4._x >= 0 && _root.grunt4._x <= 655)
- {
- Daimfire = true;
- }
- if(Dupordown == 1 || Dupordown == 0)
- {
- _root.grunt4._y += 0;
- }
- if(Dupordown == 2)
- {
- _root.grunt4._y += Dverto;
- }
- if(Dupordown >= 3)
- {
- _root.grunt4._y -= Dverto;
- }
- if(_root.grunt4._y > 320)
- {
- Dupordown = 3;
- }
- if(_root.grunt4._y < 65)
- {
- Dupordown = 2;
- }
- }
- }
- if(_root.grunt4._x < -100 && _root.viza._currentframe <= 50)
- {
- Dstarter = false;
- Donfield = false;
- _root.grunt4._x = 720;
- _root.grunt4._y = 120;
- DgrunTime = 0;
- Dvelo = int(Math.random() * 5);
- Dverto = int(Math.random() * 8);
- Dupordown = int(Math.random() * 3);
- Dredeploy = false;
- _root.grunt4.gotoAndPlay(1);
- _root.grunt4._visible = false;
- Daimfire == false;
- _root.gruntbolt4.reload = int(Math.random() * 5);
- _root.gruntCount = _root.gruntCount + 1;
- }
- DgrunTime++;
- }
- function deployGrunt5()
- {
- if(EgrunTime > 30)
- {
- if(Math.random() < 0.08 && Eonfield == false)
- {
- Estarter = true;
- Eonfield = true;
- }
- if((Estarter = true) && (Eonfield = true))
- {
- _root.grunt5._visible = true;
- _root.grunt5._x -= 6 + Evelo;
- EgruntTime = 0;
- if(_root.grunt5._x >= 0 && _root.grunt5._x <= 655)
- {
- Eaimfire = true;
- }
- if(Eupordown == 1 || Eupordown == 0)
- {
- _root.grunt5._y += 0;
- }
- if(Eupordown == 2)
- {
- _root.grunt5._y += Everto;
- }
- if(Eupordown >= 3)
- {
- _root.grunt5._y -= Everto;
- }
- if(_root.grunt5._y > 320)
- {
- Eupordown = 3;
- }
- if(_root.grunt5._y < 65)
- {
- Eupordown = 2;
- }
- }
- }
- if(_root.grunt5._x < -100 && _root.viza._currentframe <= 50)
- {
- Estarter = false;
- Eonfield = false;
- _root.grunt5._x = 720;
- _root.grunt5._y = 80;
- EgrunTime = 0;
- Evelo = int(Math.random() * 5);
- Everto = int(Math.random() * 8);
- Eupordown = int(Math.random() * 3);
- _root.grunt5.gotoAndPlay(1);
- _root.grunt5._visible = false;
- Eaimfire == false;
- _root.gruntbolt5.reload = int(Math.random() * 5);
- _root.gruntCount = _root.gruntCount + 1;
- }
- EgrunTime++;
- }
- function fivegrfire()
- {
- if(Eammoloaded == true && gruntbolt5._visible == false)
- {
- gruntbolt5._x = _root.grunt5._x - 60;
- gruntbolt5._y = _root.grunt5._y - 8;
- }
- else
- {
- gruntbolt5._visible == true && Eammoloaded == false;
- }
- gruntbolt5._x -= 30;
- if(gruntbolt5._x <= -55)
- {
- Eammoloaded = true;
- gruntbolt5._visible = false;
- }
- if(Efirenow >= 30 && _root.grunt5._x >= 80 && _root.grunt5._x <= 650 && _root.grunt5._currentframe < 4 && gruntbolt5._visible == false)
- {
- gruntbolt5._x = _root.grunt5._x - 60;
- gruntbolt5._y = _root.grunt5._y - 8;
- Eammoloaded = false;
- gruntbolt5._visible = true;
- gruntbolt5.gotoAndPlay(1);
- if(Ereload <= 2)
- {
- Efirenow = 0;
- }
- if(Ereload == 3)
- {
- Efirenow = int(Math.random() * 15) * -1;
- }
- if(Ereload >= 4)
- {
- Efirenow = int(Math.random() * 20);
- }
- }
- Efirenow++;
- }
-