How do I get my animation to stop when not moving.

Just started using Construct 2? Post your questions here

Post » Sun Dec 27, 2015 2:14 pm

When using the ladder the animations play all weird. When moving down and not moving the animation does play but when moving up it doesn't play.
I need it to not play when not moving and play when I'm moving up and down.

Image

Also bonus problem; Even thought I have every tick change player angle to platform angle, why does this happen?

.capx for my file
Code: Select all
https://drive.google.com/file/d/0Bw7sth_-pQTXSGtUdGZiT0d2MGM/view?usp=sharing

edit: i changed the link
B
10
S
2
G
1
Posts: 51
Reputation: 848

Post » Mon Dec 28, 2015 10:28 am

Why is the animation not working when pushing up-arrow?
- Because pushing the up arrow makes the player jump and when jumping you want the jump animation to play, so the program is told to play two animations at the same time, which is impossible..

Why is the animation playing when not moving?
- Because your event states to play the animation while overlapping and that condition is true..

First thing you should probably do is remove the default controls from you behaviour and add your own in events..

Also you seem to not understand the difference between triggered events and normal events..
Adding a "system every tick" condition to a triggered event is useless..
Your event 23 only changes the angle "on collision" so when no collision is registered the player angle will not change to platform angle..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Dec 29, 2015 2:34 pm

LittleStain wrote:Why is the animation not working when pushing up-arrow?
- Because pushing the up arrow makes the player jump and when jumping you want the jump animation to play, so the program is told to play two animations at the same time, which is impossible..

Why is the animation playing when not moving?
- Because your event states to play the animation while overlapping and that condition is true..

First thing you should probably do is remove the default controls from you behaviour and add your own in events..

Also you seem to not understand the difference between triggered events and normal events..
Adding a "system every tick" condition to a triggered event is useless..
Your event 23 only changes the angle "on collision" so when no collision is registered the player angle will not change to platform angle..




So I changed my code in the following way;
- I added to my other animations to activate when I'm not using the ladder so now the animations don't overlap.
- I changed the angle detection to "every tick" and "is overlapping solid at offset (0,5)"

I will keep the default controls for now but if I run into problems I will re do them. Thank you so much for this reply. I learned a lot!
B
10
S
2
G
1
Posts: 51
Reputation: 848


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests