Animation is only playing the first frame.

0 favourites
  • 5 posts
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • I'm VERY new to Construct, and game dev in general.

    I'm trying to make a jump animation, but I want the jump to be in several parts. Like holding down the jump button starts the jump (like the character gets in position to jump), and releasing it makes the character actually jump.

    So I set the animation to start when the jump key is down, but it only plays the first frame. And even weird, the animation loops if I hold the jump and the move key.

    This seems like a really simple thing to do, but I've been trying to get it to work for like 3 days now.

    I put the C3 file below, but I'm hoping this is something really obvious that I'm missing.

  • how are your conditions set up?

    if i had to guess, you are having the jump animation begin playing while the jump button is down; like so:

    "[jump key] is down ---> play animation (from beginning)".

    if this is the case, the animation is starting from the top 60 times a second while the jump key is down, & as consequence you are only seeing the first frame; there are many solutions, but here are a couple basic ones:

    1. change "[jump key] is down ---> play animation (from beginning)" to "[jump key] pressed ---> play animation (from beginning)

    2. add a "trigger once while true" condition to "[jump key] is down ---> play animation (from beginning)" condition

    these both accomplish the same task, but option 1 is much better practice.

    hope that helps

  • Thanks for replying. I've tried both of those and neither works. the first one - nothing happens unless the character is moving.

    The second one just plays the first frame for a second.

    I decided to turn EVERYTHING else in the event sheet off, and then it works. So clearly something is interacting badly.

    I guess I just need to do more research on how these events work together.

  • Main problem is event 21, which is pretty much always true and sets the animation to stand which is going to interfere with other animations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Event 21 was it! Thank you!

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