2 Replies Latest reply on Mar 17, 2011 12:16 PM by Rothrock

    Flash CS5 AS2 troubles multiple issuse

    Reeece

      Hey I was just hoping for some quick replies/ solution i have been looking everywhere trying to find solutions to my problems, basically im making a flash game for college and its almost finished more or less and its got to be done by tomorrow so i was hoping for some help - basically my game is an overhead zombie survival/shooter game i am almost finished, i just need the last major problems and its good to go- i hope...

       

      I currently have the current problesms which are at the top of my list to fix:

      1.I need to make my characters feet (movement animation) move whilst he is walking I have labeled frame sections and correctly linked movement etc, it just doesnt do the animation whilst moving, only when it isnt moving and just stood on a spot, and I i have WASD movement keys and each key i press determines which movement animation is played, and this doesnt work too well as i have my character facing the mouse at all times so this makes it hard for the character's feet to be moving the right way, its my biggest worry/problem but it would be a lot better if fixed.

       

      2.I need my enemies/zombies to face my character, they already chase him correctly, they just need to face the way they are chaing so it actually looks as if they are, and not just sliding sideways towards them, i have feet animation on this character just going forward because it is only going to be following/chasing the main character.

       

      3.I also have a problem with the score and the dying animation of my enemies, basically i have the enemy fading out when clicked/shot i tried making it 3shot kill but it proved to be too much hassle for the amount of time i have, basically it works fine if only clicked once, but if you keep clicking it the kill count/score keeps going p and he just keeps fading out until left alone and then it disappears off the screen correctly.

       

      these are my main problems i need fixing so if you can help just a little bit on any i would be very grateful.

      this is the code i am using for parts of my game

       

       

      incase you needed to know this is my characters movement : - it is coded on the actions layer in my main timeline

       

      var speed = 5;

      this.onEnterFrame = function(){

      if (Key.isDown(87)){
      Character._y -= speed;
      Character.gotoAndPlay('MoveForwards');
      }
      if (Key.isDown(83)){
      Character._y += speed;
      Character.gotoAndPlay('MoveBackwards');
      }
      if (Key.isDown(65)){
      Character._x -=speed;
      Character.gotoAndPlay('StepLeft');
      }
      if (Key.isDown(68)){
      Character._x += speed;
      Character.gotoAndPlay('StepRight');
      }
      };

      the labels of the frame section/footanimation is below hte movement keys and this code is how the character follows the mouse:

       

      onClipEvent(enterFrame){
      angle = (Math.atan2(_root._ymouse-_y, _root._xmouse-_x)*180/Math.PI)-90;
      this._rotation = angle;
      }

       

      - this code is on my zombie and basically codes the zombies movement and death animation as well as score contribution and my/my friends attempt to fix it, so im not really sure how to fix the score problem or how to make hte zombie face my character

       

      onClipEvent (enterFrame) {

       

      if(this._currentframe < 50){
      if(_root.Zombie._x > _root.Character._x){
      _root.Zombie._x -= 1;
      }
      if(_root.Zombie._x < _root.Character._x){
      _root.Zombie._x += 1;
      }
      if(_root.Zombie._y > _root.Character._y){
      _root.Zombie._y -= 1;
      }
      if(_root.Zombie._y < _root.Character._y){
      _root.Zombie._y += 1;
      }}}

       

      it


      on(release)
      {
      var ZombieDead:Boolean;
          ZombieDead = false;
      if(ZombieDead == false){
      this.gotoAndPlay('ZombieDead');
      _root.SCORE+=1;
      break;

       

      }
      else{}
      }

       

       

      any help at all and i would be very happy, thanks in advance : )

       

       

      EDIT: any help or hints towards fixing the problems would be brilliant please, just need to fix my character movement animation, make the enemies face my main character and fix the score/death glitch, thats basically it and thats my major problems over and done with, thanks alot.

       

      Message was edited by: Reeece

       

      Message was edited by: Reeece

        • 1. Re: Flash CS5 AS2 troubles multiple issuse
          Reeece Level 1

          ok well since I havnt had any replies i have basically given up hope, looks like im not gonna fix my major problems and ill never know how to because theres no tutorials or solutions on youtube or google and even adobe forums cant help me, so thats for looking anyway but it looks like all my work has bee a waste of time : /

          • 2. Re: Flash CS5 AS2 troubles multiple issuse
            Rothrock Level 5

            Just a hint. Break it down into individual problems.

             

            I came here and started to read, and kept reading and kept reading and it was too much for me to figure out where to begin.

             

            Just do one post for each issue. Make it clear what the problem is and what the goal is.

            1 person found this helpful