0 Favourites

Problem with animation

  • First, sorry if I'm posting in a wrong place and if already exists a topic about this. I'm new in the community. And about my english, I'm brazilian, and don't speaks english very well.

    My problem is with animation stuff. I'm doing this sequence of events:

    <img src="http://img841.imageshack.us/img841/3871/myproblem.jpg" border="0" />

    I'm having problem with the Attack animation. When I press and release Z on stand, nothing happens. But when I'm running this works. And when I use the press and hold event, the animation stops in the last frame.

    How do I do to the animation plays just once when I press Z (press and release / press and hold) ?

  • The reason why this isn't working is because of event #3. Currently that event happens every tick that the hero isn't moving regardless of other animations that might be trying to play. So you start the attack animation but it's immediately overridden with the standing animation one tick later (too fast for you to see).

    To fix this all you have to do is add another condition to #3 saying "Hero is playing 'Atacando'" and make it the inverse. That way if the attack animation is playing the standing animation won't override it.

    Now, in order to change the attack animation back when it finishes make another event, specifically "Hero - animations - On Finished" and use that to change the animation back to the standing one.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Thank you very much. I did that and worked! Thanks!

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,305
FlyingRam's avatar
FlyingRam
Unread hot topic
98 7,598
norum82's avatar
norum82
Unread hot topic
87 5,376
facecjf's avatar
facecjf