How do I repair my code to use animation? [Solved]

  • Hello friends,

    I have a problem with my code.

    I am trying to make my player, while moving, change his animation. But I can't find the best place in the code to put the action. Could you help me fix the code?

    https://drive.google.com/open?id=1UcitK2yfRiV5JusJzZmPy6QEHmnWiHk1

  • There are many ways but using your previous code..

    Also, increase the animation speed..

    Try it :)

    You are brazilian, right? Me too.

  • First of all, thanks for replying klabundee.

    So I had already tried that. However, the player, when executing the command by the keyboard, finishes the grid movement, continues to execute the animation, and if I make it stop when it reaches "tempoMov = 0", the player does not perform all animations.

    Did you undersand? haha. My English is not so good.

    Should I create another code or family just to set up the animations?

    Thanks again!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, thanks for replying klabundee.

    So I had already tried that. However, the player, when executing the command by the keyboard, finishes the grid movement, continues to execute the animation, and if I make it stop when it reaches "tempoMov = 0", the player does not perform all animations.

    Did you undersand? haha. My English is not so good.

    Should I create another code or family just to set up the animations?

    Thanks again!

    I saw that happening but it was because the movement animation was too slow.

    For example, your grid movement needs 0.4 seconds to complete and your animation is set to 4 sprites per second, and you have 4 sprites on your animation, so, it will take a whole second to show the animation. If you increase the animation speed to 8, it will show the whole animation in 0.5 second.

    In this example im using 16:

  • I'm sorry klabundee. It is true. I ended up tweaking and testing here and solved the problem. Thank you!

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