How do I fix this animation problem.

0 favourites
  • 3 posts
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • hey it's me again.. sorry about that!

    I have the movement figured out, but then i tried to add a "dash" button, I used a Boolean variable to do it, but when I press the button assigned for the dash, it doesn't execute the whole "Dash" animation, just the first frame, I believe that maybe is in conflict with the "walk" animation, which is executed when pressing down the direction button, ( WASD in this case). I need that direction pressed to direct the dash. so I'm kind of out of ideas here...

    once again i'm anything but a programmer, so any help will be appreciated.

    here is the sheet as it is at the moment.

    https://imgur.com/HOTgA3Z

  • Have you tried adding a condition for the walk animation to play?

    Making it so that Dash being true prevents it, for example?

    You could just replace your "set animation to walking" actions by a function that, when called, checks if the value is false before playing the walking animation.

    Seriously, in case you don't already know, I highly recommend looking into how functions work, they're your best friends to avoid repeating code all over the place, for the sake of performance... and also avoiding headaches later on Better to have only one thing to change, than four for instance.

    They're very flexible with parameters and whatnot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • please post your capx as others will be able to help you more easily

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