Walking animation only plays first frame

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'm currently developing a game for an assignment. I'm following almightyzentaco's basic side scrolling platformer tutorial, using a platform movement object. Falling, jumping, and idle animations work fine. I have made it so that when the right or left keys are pressed, the sprite changes direction and plays the walking animation in the respective direction. However, I have 8 frames in the walking animation, and when the key is pressed, it only plays the first frame. The object then moves left and right, however, it's stuck at frame 1.

    Why the HECK doesn't it work?!

  • No way to know for sure until you show a screenshot of your code, but it's likely that you're doing something like this:

    --repeat while LEFT is pressed
    -------change direction("player")
    -------change animation sequence to walking
    ------move player left

    In the example above, the animation is changed every single frame. In other words, it will be constantly reset to the beginning of the animation, and the player will never see the later frames. If you've got something like that going on, then you need to make the animation change only once. For example:


    --repeat while LEFT is pressed
    -------move player left

    --repeat while LEFT is pressed
    --only once when event loops
    -------change direction("player")
    -------change animation sequence to walking

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!