Animation freezes while 2 keys pressed

0 favourites
  • 4 posts
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hola,

    I'm currently working on 2 games and seem to have a problem with the running animation while pressing 2 keys at once for diagonal movement. I've tried various movements plug ins, but they all react the same. As soon you press 2 keys at once, the animation freezes. Doesn't matter if you stick the animation to the player-box or move the animation directly. In both instances the animation freezes, the m0tion works. It's just the animation.

    Anybody got an idea about this?

  • Looks like you've got conflicting events..

    When the conditions of an event are true - the actions will be executed

    when the conditions of more than one event are true - all the actions of those events are executed

    so if you have

    on up key pressed - set animation up

    on left key pressed - set animation left

    on up key pressed and on left key pressed - set animation upleft

    All three of these events will run when up and left key are pressed at the same time..

    so every tick the animation is first set to up, then to left and then to upleft

    in effect it will look like the animation freezes..

    Adding more conditions will prevent the conditions of all three events to be true at the same time..

    One solution (albeit not the best) would be:

    If up key is pressed and left key is not pressed - play animation up

    etcetera

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks LittleStain, will have a try with this option.

  • LittleStain Thankx man, had another sort of conflict with my game and with you suggestion I solved it. So, I am positive this should also work for the animation [hopefully ]

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