home *** CD-ROM | disk | FTP | other *** search
- function Laser_Collide0(target)
- {
- if(target.Obj_Flags & 0x40)
- {
- return 0;
- }
- if(target.CX2 < this.CX1 || target.CX1 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- return 1;
- }
- function Laser_Collide1()
- {
- var i;
- var y;
- var x1;
- var x2;
- x1 = (this.Obj_X >> 16) + this.Obj_X1 & 4294967288;
- x2 = (this.Obj_X >> 16) + this.Obj_X2 & 4294967288;
- y = this.Obj_Y >> 16 & 4294967288;
- if(this.Obj_Flip < 0)
- {
- i = y / 8 * 102 + x1 / 8;
- }
- else
- {
- i = y / 8 * 102 + x2 / 8;
- }
- if(_root.CMapArray[i] == 1)
- {
- return 1;
- }
- return 0;
- }
- function Laser_Shoot_Collide()
- {
- if(!(_root.Shield.Obj_Flags & 4))
- {
- if(Laser_Collide0(_root.Shield))
- {
- if(_root.Shield.Obj_Shield_Up || this.Obj_Flip == _root.Shield.Obj_Flip)
- {
- _root.snd.attachSound("LV_226");
- _root.snd.start();
- _root.Shield.Obj_DX = 131072 * this.Obj_Flip;
- _root.Shield.setHndlr(1,0);
- _root.Shield.gotoAndPlay("Shield_Hit");
- }
- return 1;
- }
- }
- if(!(_root.Fighter.Obj_Flags & 4))
- {
- if(Laser_Collide0(_root.Fighter))
- {
- _root.snd.attachSound("LV_226");
- _root.snd.start();
- _root.Fighter.Obj_DX = 131072 * this.Obj_Flip;
- _root.Fighter.setHndlr(1,0);
- _root.Fighter.gotoAndPlay("Fighter_Hit");
- return 1;
- }
- }
- if(!(_root.Runner.Obj_Flags & 4))
- {
- if(Laser_Collide0(_root.Runner))
- {
- _root.snd.attachSound("LV_226");
- _root.snd.start();
- _root.Runner.Obj_DX = 131072 * this.Obj_Flip;
- _root.Runner.setHndlr(1,0);
- _root.Runner.gotoAndPlay("Runner_Hit");
- return 1;
- }
- }
- if(Laser_Collide1())
- {
- return 1;
- }
- return 0;
- }
- function Laser_Loop()
- {
- this.Obj_X += 524288 * this.Obj_Flip;
- this.Obj_Timer--;
- this.cacheCX();
- this.updateCache();
- if(this.Obj_Timer == 0)
- {
- this.kill();
- }
- if(Laser_Shoot_Collide())
- {
- this.kill();
- }
- }
- this.setHndlr(1,this.Laser_Loop);
- this.gotoAndPlay("Laser_Loop");
- _root.KEY_LT = 37;
- _root.KEY_RT = 39;
- _root.KEY_UP = 38;
- _root.KEY_DN = 40;
- _root.KEY_A = 65;
- _root.KEY_B = 83;
- _root.KEY_LB = 81;
- _root.KEY_RB = 87;
- _root.KEY_CHEAT = 17;
- _root.Obj_Flags_ALWAYSRUN = 384;
- _root.Obj_Flags_BACKGROUND = 256;
- _root.Obj_Flags_MICKEY = 128;
- _root.Obj_Flags_DEAD = 64;
- _root.Obj_Flags_SPECIAL = 32;
- _root.Obj_Flags_KILL = 16;
- _root.Obj_Flags_KEYBD = 8;
- _root.Obj_Flags_GONE = 4;
- _root.Obj_Flags_ATTACK = 2;
- _root.Obj_Flags_CLIMBING = 1;
- this.Obj_X1 = -10;
- this.Obj_X2 = 10;
- this.Obj_Y1 = -2;
- this.Obj_Y2 = 2;
- this.Obj_Timer = 32;
-