Conflict between walk and attack animation

0 favourites
  • 8 posts
From the Asset Store
Character Sprite Pack: Walk 4 Directions made in illustrator
  • Basically I am making a side scroller, kinda like hack'n slash. When my player is walking, walk animation is playing (duh ) and then when i left click he is supposed to stop, play animation attack1, start ignoring platform user input and on attack1 finished stop ignoring user platform input.

    That sounds simple enough but when i walk and click he stops and then I have to click again in order for him to start his attack animation. It's really annoying, and I have no idea how to fix it. I searched quite a bit but didn't find anything so any help would be useful.

    Thanks in advance.

  • Post screenshot or capx, need to see the event's.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Here, just to explain kraljhitBox is basically for my movement and collisions.

  • But i think i should remake the way it works,it just seems to clumsy.

  • You should make an animation manager. They all have to be in a sort of switch case format to work properly for each sprite.

    For instance;

    If X, play this animation,
    else if x, play this animation
    else, default to this animation.
    Every single animation for a family or sprite should be in here, otherwise you can have animation glitches on your sprites. Using the "Else" event condition will assure that only one can happen at a time.
  • Perhaps with boolean instance variables. One for isWalking which at the beginning of the layout you set to true and once you press left mousse button goes to false.

  • What happen if you delete / Start ignoring platform user input.

  • Yeah that actually works, I used system>set group active instead of ignoring user input . Thanks guys for the help.

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