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

Get help using Construct 2

Post » Tue Mar 25, 2014 2:00 pm

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?
B
6
Posts: 2
Reputation: 268

Post » Tue Mar 25, 2014 5:36 pm

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
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Tue Mar 25, 2014 8:16 pm

7Soul wrote: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!
B
6
Posts: 2
Reputation: 268


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], NumberOne and 5 guests