0 Favourites

How do I stop an animation from overriding other user input?

  • Hey there guys and girls,

    I am having trouble with something. Whenever my bear (player) in my upcoming platform sidescroller game tries to jump, or kick, or use any other animation, it seems that the first frame of that new animation is overwritten by the continuous walking animation. The "Jumping" or "Kicking" animation plays the first frame but then it reverts back to walking. I'm sure I've done something wrong with the "Platform" behavior. It's set to whenever the player touches a platform the Walking animation will occur. I can't get the player to do anything else and then they die when the first needed jump occurs.

    How can I fix this so that the walking animation:

    Is continuous when not jumping or kicking?

    Doesn't cancel the Jumping or Kicking animation?

    I'm not specifically asking for you guys to fix this FOR me, (that's only if you wanted to) but I'm asking HOW to fix it and what I need to do. Any explanation for things you fixed or I need to fix would be greatly appreciated!

    Thanks for your help in advance! I'm really new to Construct 2. I am thankful this forum is out here for people to help!

    Here is the .capx:

    https://drive.google.com/file/d/0B3OzOSY-kUR0YlNhbWRnQ2NIWFk/edit?usp=sharing

    Also, I lag extremely bad when testing the game in Firefox browser, but when I use Chrome browser it runs the game very fast. Any ideas on that?

  • For my project I created a "priority" variable for animations. I made it so animations like walking only play if the priority is 0, stuff like "kicking" play if its 1.

    So when the player presses the button to kick, set the priority to 1.

    Add a condition to the walking animation: "priority = 0" and an action to when the kicking animation ends: "set priority to 0"

    This way, the walking animation will never play if the kicking animation is playing

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • For my project I created a "priority" variable for animations. I made it so animations like walking only play if the priority is 0, stuff like "kicking" play if its 1.

    So when the player presses the button to kick, set the priority to 1.

    Add a condition to the walking animation: "priority = 0" and an action to when the kicking animation ends: "set priority to 0"

    This way, the walking animation will never play if the kicking animation is playing

    Thank you VERY much! This solved my frustration! And now I can use that trick! Woohoo!

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