Problem with character animation

0 favourites
  • 11 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • When I press the left arrow button my character looks left and my animation starts but just the first frame. Also if I press the right arrow my character walks right and the walking animation starts but just the first frame and then the animation stopps. What could it be? Yes, its a looped animation with animationspeed 7.

    In the code its like: If right arrow button is pressed = character animation to "walking". That works fine, but then he just switch the animation to the first frame from the animation and then it stopps, but I have 4 frames in a loop. Thanks!

  • Could it be there is another event setting animation with conditions that are also true?

    Maybe an every tick set animation to "idle", or Player is on floor set animation, or something similar?

  • If right arrow button is pressed = character animation to "walking".

    If right arrow button is pressed - animation "walking" starts over and over from the beginning(frame 0)

    try: On Key pressed..

  • Okey thank you I will check it again

  • So heres a picture. The problem should be somewhere there. I have a normal raptor sprite. If the player walks into it, destroy the raptor and set the player animation to "playeronraptor". He rides the raptor now if you now what I mean. Thats works fine. But then if I wonna walk with it, the animation "raptorrunning" starts but just the first frame. Then it stopps. I have 4 frames in "raptorrunning" and it should loop. Maybe you guys can help me ^^ Its a bit complicated.

    http://www.file-upload.net/download-110 ... l.png.html

  • korbaach, I already had it with on key pressed but then the animation "raptorrunning" doesnt event start.

  • Construct reads events from top to bottom,

    so every tick playeronraptor=1first the animation default will be started from frame1, than if left is down animation running will be started from frame1..

    This will lead to the animation staying at frame 1..

    Like I said, both events are true, so both set the animation..

  • Okey, I'm not sure how to fix it now but I will try it ^^ Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Easiest way would probably be to put an else event under event 281 and put the actions of event 279 in that..

  • The animation would work but then my character always rides the raptor, not just then when he collides with it.

  • The animation would work but then my character always rides the raptor, not just then when he collides with it.

    I'm guessing you put the else in the wrong place..

    The else should ofcourse also be a subevent of the playeronraptor = 1

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