home *** CD-ROM | disk | FTP | other *** search
- function Do_Fighter_Shoot()
- {
- _root.Arrow = _root.Objs.create("ArrowClass",56,0,this.Obj_X,this.Obj_Y - 1114112,null);
- _root.Arrow.Obj_Flip = this.Obj_Flip;
- _root.snd.attachSound("LV_135");
- _root.snd.start();
- }
- function Fighter_Walk()
- {
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- if(this.Obj_DX > 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX += -32768;
- if(this.Obj_DX < -393216)
- {
- this.Obj_DX = -393216;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- if(this.Obj_DX < 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX += 32768;
- if(this.Obj_DX > 393216)
- {
- this.Obj_DX = 393216;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.Obj_DX = 0;
- gotoAndPlay(49);
- }
- if(this.CX_Ladder("Fighter_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Fighter_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- if(this.CX_Collide_Flag & 3)
- {
- this.gotoAndPlay("Fighter_Push");
- }
- }
- function Fighter_Idle()
- {
- this.Obj_DX = 0;
- if(0 && this.Keys_pressed[2] & _root.Bits_on[1])
- {
- this.gotoAndPlay("Fighter_Cheat");
- }
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX = -1;
- gotoAndPlay(16);
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX = 1;
- gotoAndPlay(16);
- }
- else if(this.Keys_state[8] & _root.Bits_on[1])
- {
- if(_root.MOT_random(0,99) > 50)
- {
- _root.snd.attachSound("LV_201");
- _root.snd.start();
- gotoAndPlay(136);
- }
- else
- {
- _root.snd.attachSound("LV_201");
- _root.snd.start();
- gotoAndPlay(159);
- }
- }
- else if(this.Keys_state[10] & _root.Bits_on[3])
- {
- if(!_root.Arrow)
- {
- this.gotoAndPlay("Fighter_Shoot");
- }
- }
- else if(this.Keys_pressed[4] & _root.Bits_on[6])
- {
- if(_root.teleportCheck(this))
- {
- this.gotoAndPlay("Fighter_Teleport");
- }
- _root.helpCheck(this);
- }
- if(this.CX_Ladder("Fighter_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Fighter_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- }
- function Fighter_IdleA()
- {
- this.Obj_DX = 0;
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- gotoAndPlay(16);
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- gotoAndPlay(16);
- }
- if(this.CX_Ladder("Fighter_Climb0"))
- {
- return undefined;
- }
- if(this.CX_LadderX("Fighter_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- }
- function Fighter_SwordA()
- {
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- }
- function Fighter_SwordB()
- {
- this.CX(0,32768,524288);
- if(this.CX_Fall_Flag)
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- }
- function Fighter_Climb_Frame()
- {
- this.Obj_AnimFrame += 80;
- switch(this.Obj_AnimFrame >> 8 & 3)
- {
- case 0:
- this.gotoAndStop("Fighter_Climb1");
- break;
- case 1:
- this.gotoAndStop("Fighter_Climb2");
- break;
- case 2:
- this.gotoAndStop("Fighter_Climb3");
- break;
- case 3:
- this.gotoAndStop("Fighter_Climb4");
- }
- }
- function Fighter_Climb0()
- {
- this.Obj_Flags |= 1;
- if(this.Obj_Timer < 0)
- {
- this.Obj_Timer += 4;
- this.Obj_X -= 262144;
- if(this.Obj_X <= this.Obj_Target)
- {
- this.Obj_X = this.Obj_Target;
- }
- }
- else if(this.Obj_Timer > 0)
- {
- this.Obj_Timer += 4;
- this.Obj_X += 262144;
- if(this.Obj_X >= this.Obj_Target)
- {
- this.Obj_X = this.Obj_Target;
- }
- }
- if(this.Obj_X == this.Obj_Target)
- {
- if(this.Obj_Climb == 0)
- {
- this.gotoAndPlay("Fighter_Climb");
- }
- if(this.Obj_Climb == 1)
- {
- this.gotoAndPlay("Fighter_Climb_Out");
- }
- }
- }
- function Fighter_Climb()
- {
- this.Obj_Flags |= 1;
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_DY = -163840;
- this.Fighter_Climb_Frame();
- }
- else if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_DY = 163840;
- this.Fighter_Climb_Frame();
- }
- else if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Fighter_Fall");
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Fighter_Fall");
- }
- this.CX(0,0,1073741824);
- if(!this.CX_Ladder0())
- {
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Fighter_Climb_Out");
- }
- if(this.CX_Collide_Flag & 8)
- {
- this.Obj_Flags &= 65534;
- this.gotoAndPlay("Fighter_Idle");
- }
- }
- function Fighter_Climb_Out()
- {
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_DY = -65536;
- }
- else if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_DY = 65536;
- }
- if((this.Obj_Y >> 16 & 7) < 4)
- {
- this.gotoAndStop("Fighter_Climb_Out1");
- }
- else
- {
- this.gotoAndStop("Fighter_Climb_Out2");
- }
- this.Obj_X += this.Obj_DX;
- this.Obj_Y += this.Obj_DY;
- if(!this.CX_LadderX0())
- {
- this.gotoAndPlay("Fighter_Idle");
- if(this.CX_Ladder0())
- {
- this.gotoAndPlay("Fighter_Climb");
- }
- else
- {
- this.Obj_DX = 0;
- this.Obj_DY = 0;
- this.Obj_Y &= 4294443008;
- this.Obj_Y += 458752;
- this.gotoAndPlay("Fighter_Idle");
- }
- }
- }
- function Fighter_Fall()
- {
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_DX += -32768;
- if(this.Obj_DX < -393216)
- {
- this.Obj_DX = -393216;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_DX += 32768;
- if(this.Obj_DX > 393216)
- {
- this.Obj_DX = 393216;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.Obj_DX = 0;
- }
- if(this.CX_Ladder("Fighter_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.Obj_Y - this.Obj_Target >> 16 > 96)
- {
- this.gotoAndPlay("Fighter_FreeFall");
- }
- if(this.CX_Collide_Flag & 4)
- {
- this.Obj_DY = 0;
- }
- if(this.CX_Collide_Flag & 8)
- {
- _root.snd.attachSOund("LV_196");
- _root.snd.start();
- this.gotoAndPlay("Fighter_Idle");
- }
- }
- function Fighter_FreeFall()
- {
- this.Obj_DX = 0;
- if(this.CX_Ladder("Fighter_Climb0"))
- {
- return undefined;
- }
- this.CX(0,32768,524288);
- if(this.Obj_Y - this.Obj_Target >> 16 > 96)
- {
- this.gotoAndPlay("Fighter_FreeFall");
- }
- if(this.CX_Collide_Flag & 4)
- {
- this.Obj_DY = 0;
- }
- if(this.CX_Collide_Flag & 8)
- {
- _root.ImpactY_Flag = 9;
- _root.snd.attachSound("LV_185");
- _root.snd.start();
- this.gotoAndPlay("Fighter_Crash");
- }
- }
- function Fighter_Push()
- {
- this.Obj_DX = 0;
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- if(this.Obj_DX > 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX = -65536;
- if(this.Obj_DX < -393216)
- {
- this.Obj_DX = -393216;
- }
- this.Obj_Flip = -1;
- }
- else if(this.Keys_state[4] & _root.Bits_on[7])
- {
- if(this.Obj_DX < 0)
- {
- this.Obj_DX = 0;
- }
- this.Obj_DX = 65536;
- if(this.Obj_DX > 393216)
- {
- this.Obj_DX = 393216;
- }
- this.Obj_Flip = 1;
- }
- else
- {
- this.gotoAndPlay("Fighter_Idle");
- }
- this.CX(0,32768,524288);
- if(!(this.CX_Collide_Flag & 3))
- {
- this.gotoAndPlay("Fighter_Idle");
- }
- }
- function Fighter_Crash()
- {
- this.CX(0,0,1073741824);
- }
- function Fighter_Shocked()
- {
- }
- function Fighter_Shoot()
- {
- this.CX(0,32768,524288);
- }
- function Fighter_Cheat()
- {
- if(this.Keys_pressed[2] & _root.Bits_on[1])
- {
- this.gotoAndPlay("Fighter_Fall");
- }
- if(this.Keys_state[4] & _root.Bits_on[6])
- {
- this.Obj_Y -= 524288;
- }
- if(this.Keys_state[5] & _root.Bits_on[0])
- {
- this.Obj_Y += 524288;
- }
- if(this.Keys_state[4] & _root.Bits_on[5])
- {
- this.Obj_Flip = -1;
- this.Obj_X -= 524288;
- }
- if(this.Keys_state[4] & _root.Bits_on[7])
- {
- this.Obj_Flip = 1;
- this.Obj_X += 524288;
- }
- this.cacheCX();
- trace("x: " + (this.Obj_X >> 16) + ", y: " + (this.Obj_Y >> 16));
- }
- function Fighter_Teleport()
- {
- }
- function Fighter_Splat()
- {
- }
- function Fighter_Hit()
- {
- this.Obj_Flags &= 65534;
- this.Obj_X += this.Obj_DX;
- if(this.Obj_DX < 0)
- {
- while(this.Ck_Collide_LF())
- {
- }
- }
- else if(this.Obj_DX > 0)
- {
- while(this.Ck_Collide_RT())
- {
- }
- }
- }
- function Fighter_Die()
- {
- }
- this.gotoAndPlay("Fighter_Idle");
- _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 = -5;
- this.Obj_X2 = 5;
- this.Obj_Y1 = -31;
- this.Obj_Y2 = 0;
-