home *** CD-ROM | disk | FTP | other *** search
- function checkhit(bullet)
- {
- xloc = eval(bullet)._x;
- yloc = eval(bullet)._y;
- e = 0;
- e;
- while(e < enlist.length)
- {
- thisen = enlist[e];
- if(eval(thisen).hittest(xloc,yloc,false))
- {
- if(eval(thisen)._currentframe < 6)
- {
- _root.hitSound.start();
- eval(bullet).exp = "true";
- eval(bullet).gotoAndPlay("explode");
- eval(thisen).gotoAndPlay("red");
- eval(thisen).power.gotoAndPlay(2);
- if(weapon == "bullet")
- {
- eval(thisen).hits -= 1;
- }
- else if(weapon == "laser")
- {
- eval(thisen).hits -= 2;
- }
- else if(weapon == "phaser")
- {
- eval(thisen).hits -= 3;
- }
- else if(weapon == "tazer")
- {
- eval(thisen).hits -= 4;
- }
- }
- }
- e++;
- }
- }
- function checkhit2(Ebullet)
- {
- xloc = eval(Ebullet)._x;
- yloc = eval(Ebullet)._y;
- thisen = "chopper";
- if(eval(thisen).hittest(xloc,yloc,false))
- {
- _root.chopper.hits -= 1;
- chopper.chopper.field.gotoAndPlay(2);
- eval(Ebullet).exp = "true";
- eval(Ebullet).gotoAndPlay("explode");
- }
- }
- _root.survived = 0;
- lives = 3;
- _root.score = 0;
- _root.shiptocnt = 0;
- _root.fightertocnt = 0;
- _root.bombertocnt = 0;
- stagew = 600;
- stageh = 350;
- guageson = "false";
- trucksmove = 0.5;
- debug = true;
- _root.intermission = false;
- _root.weapon = "bullet";
- _root.engineSound = new Sound();
- _root.engineSound.attachSound("engine");
- _root.hitSound = new Sound();
- _root.hitSound.attachSound("hit");
- _root.collectSound = new Sound();
- _root.collectSound.attachSound("collect");
- _root.field1.gotoAndPlay(1);
-