0 Replies Latest reply on Feb 9, 2007 2:21 AM by rummmi

    player doesnt got hurt

    rummmi
      I am working on fighting game and i have one little problem. when my char got hurt he has two options:
      1. fall to the ground if the danage > 9
      2. just got a bit hurt if the damage <10
      Here is what i tried to do:

      if(_root.punch.hitTest(_root.char)){
      _root.damage = random(20)+1;
      if(_root.damage>0){
      _root.hp -= _root.damage;
      if(_root.damage < 18){
      _root.char.gotoAndStop(2) / the frame that show that he got hurt
      }else{
      _root.char.gotoAndStop(3) / the frame where he fall to the ground
      }
      _root.damage = 0;
      }

      its doesnt works like i want it to works...please soneone has any suggestion or can solve my problem?