How do I Disables player movement?

0 favourites
  • 7 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hey friends!

    I have a problem that I just can not overcome no matter how hard I try - I would greatly appreciate your help in this matter!

    My character as soon as she hits the enemy snatches a blow down her life she has a cute animation of a hit and then (if she has life left) returns to activity. - I really want to make sure that once he takes a hit - the player can not move the character at all until all the animation of the character runs out. For this I created the following events:

    Basically when he is injured he cancels the Group where I put all the player's moves (MOVE) And also the Group of firing.(SHOT):

    The problem starts here - for some reason he loses the ability to shoot until the animation runs out - but he is still able to move - he does not do the animations (of running for example), but he "slides" in the last frame of the animated hit - causing me bugs and even a situation where Even if he has zero life he can still continue to play.

    I have been trying for a long time to fix this and it causes me a lot of frustration. I would really appreciate if you could help me with that. Thank you very much

  • Have you disabled the "Default Controls" in the Behavior?

  • If I do that, it makes my character get stuck in place, and she can just jump up and down.

    Correction: I noticed it does move - but so little I think only one pixel

  • That is because you are using a triggered event (with the green arrow). Try to use 'Key is down' instead.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • it worked!!! Thank you very much!!! I appreciate it so much

    It only made one single problem for me - I would really be happy if you could help me with that as well

    This new situation meant that my character could no longer shoot while he is moving.

    When he stands he shoots graet. But when he moves he does not do it.

    This is the event I use for this - when the shot's animation ends And if its speed is equal to or higher than 1 (to make it while is moving) it fires.

    For some reason this does not happen. Does it collide with the "Key is down"?

  • My guess, the moving animation is now triggered the whole time you press a moving key (left,right). So the the animation for firing will never be played completely and the the end of animation event will never be triggered.

    It also looks like the running animation is only the first frame, because it starts over and over again.

    You could differentiate between only running and running and fire together.

    It's hard to say what is the best without seeing the wohle game code.

  • Thank you very much! Thanks to your help I was able to solve all the problems I had with the game I am building! I really appreciate it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)