0 Favourites

How do I add my attack animation??

  • Problem:

    So I have the "idle" animation and the "running" animation set. However I want to be able to press "T" and trigger the attacking animation for my character yet when I do that, it starts the animation but quickly stops and goes back to my "idle". I understand that it's being overridden but I can't seem to find a solution to my problem. z

    Questions:

    Does anyone have a solution?

    Concerns:

    In the game, you can disregard the crane as it's used for just simple physics for later developments.

    Thanks:

    Thank you for your time and consideration for this post.

  • virtusal

    Try the attached file. I added in a check for "not T keydown" when setting the Running and Idle animations.

  • virtusal

    Try the attached file. I added in a check for "not T keydown" when setting the Running and Idle animations.

    You're awesome! However, you see how my character jumps up during the animation transition and performance? Is that due to the collision boxes or the origin? Cause I know that some of my animation frames are smaller in height as the animation progresses and I keep thinking that it may change the smoothness of how it plays in he game, causing that "bump" but I'm not sure.

    Edit:

    Also, if you play around with the animation while moving and such, the "bump" goes away if you "attack" while moving but doesn't when you stand still.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • virtusal

    The bump you see has to do with the collision box.

    I played around with your collision box and just made sure they all lined up with the bottom of the feet and the bump is gone.

    I also reworked the animation event a bit so now once you hit T it will play until the end before it changes to another animation.

  • thatserafimkid

    awesome! See I thought that was the problem, really I did! However, after changing all of the collisions at the bottom of the feet to be perfectly in line with each other on every frame... I moved on thinking it was something else. Thank you once again!

  • virtusal

    You're very welcome. At least you were on the right path.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
1,941 263,286
FlyingRam's avatar
FlyingRam
Unread hot topic
99 10,139
karshinkoff's avatar
karshinkoff
Unread hot topic
56 4,734
MPPlantOfficial's avatar
MPPlantOfficial