How to play animations ?

This forum is currently in read-only mode.
0 favourites
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • I have a sprite character on screen, it has a platform behavior set and I have tagged animation for stopped, walking and jumping. Now I have added animation for shooting but no matter what I try the animation doesn't play except for the first frame. If I press the Fire action it only displays the first frame and when I ler go it goes back to stopped animation.

    please help me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a lot of possible causes for this. One of the most common is using two conditions one right after the other for switching. If that's the case here, then this post may help you.

    Also, check for a correct animation frame speed.

    If both tips don't help, setting up a demo cap showing the problem helps a lot helping you

  • what do you do to advance the animation every frame ?

    and how to make it loop ?

    the guys who made construct thought about everything but a simple frame advance function. wtf, I think I'm gonna give up on construct altogether, there is almost no documentation, the probgram is awesome but some the simplest things are a hell to make them work. i have trying to solve this problem for days and NOTHING works, so I just give up, I'll buy a GameMaker or something else.

  • I agree that documentation is an issue, of course pretty much all game creation programs are light on documentation. That said, I've personally found Construct much easier to get into than GameMaker or any other game creation software I've tried.

    The issue you're having sounds like a simple fix and it probably has to do with naming your animation groups and then controlling them based on those names in events. However, as Tulamide offered up, this is likely somethng where posting your .cap would make it easiest for you to get help.

  • Don't get me wrong, I think construct is freaking AMAZING.

    here is the file:

    http://www.mediafire.com/?79ili97z57fmj7w

    z - key jumps

    x - should shoot

    also, I always change things to get it working so this is not the only way i tried to do it.

  • From the beginning I could see that the player's running animation didn't work. Everything else seems to be playing fine though.

    What I did was remove a number of your events, because they seemed to be preventing the running animation from working. This is what the current events look like with removals:

    <img src="http://farm4.static.flickr.com/3217/5776673913_270f6b6b86.jpg">

    With that, all of the players run animation frames cycle now.

    EDIT: Also, your shooting animation is only two frames, and the first one is pretty much the same as your stopped animation, so while it may look like only one frame is playing, both frames are definitely playing.

  • the run and jump animations work because they are tagged as running and jumping so there is no need to set them, the reason they didn't work in that file I posted is because I was trying to make the standShoot animation to work.

    You can remove everything and running and jumping will still work.

  • I see. Nevertheless, with the removals all the animations including the standshoot animation play now.

  • the standShoot doesn't work

  • Hmmmm. That's strange. When I'm standing still and I press 'x' it plays for me.

  • for me it just displays one of the frames, when i release the x key then it goes back to stopped animation.

  • The "stopped" frame and the second frame of "standShoot" are identical to each other though, so when you press 'x' the only frame that will look different is the first frame of "standShoot" because that one is drawn differently than the other 2.

    When you release 'x', it's supposed to go back to "stopped" (which it does) since you aren't shooting anymore after release, but because the "stopped" frame and the second frame of "standShoot" are identical the only frame that can be distinguised between the 3 is the first frame of "standShoot".

  • doesn't the function playAnimation should play animation if I call it in the Always event ?

    The "stopped" frame and the second frame of "standShoot" are identical to each other though, so when you press 'x' the only frame that will look different is the first frame of "standShoot" because that one is drawn differently than the other 2.

    I still should get that shaking animation, thats the whole point of standing and shooting (without moving).

    as a reference look at this video, in my project it might not look the same but should be similar.

    Subscribe to Construct videos now
  • I actually get that movement when I press 'x' rapidly. The only difference between the .cap and the video you linked, is that in the .cap the player's feet move when firing (which is just a product of one of the frames having a different foot placement than the other 2).

    So my question is, are you trying to get something where by holding down 'x' you get continuous non-stop rapid fire instead of having to press 'x' rapidly?

  • Yes.

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