[105] Animations not playing

Bugs will be moved here once resolved.

Post » Thu Oct 04, 2012 4:04 am

[QUOTE=Helladen] [QUOTE=Joannesalfa]Let's compare my .capx which is a bug cannot play animation while press down arrow.[/QUOTE]
Mine works perfectly fine. I have full-blown animations for each arrow key that is pressed. I am using the latest beta version, too.

[QUOTE=NotionGames] Could someone show an example on how to properly set animations?[/QUOTE]
You need to change play from beginning in the set animation to play from current frame. I said that above. If you don't like the result of that, you need to put in checks to prevent it from continuously changing the animation, because it will never get the chance to play the animation.[/QUOTE]

Ok it's working just fine now. Thanks for the tip
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Thu Oct 04, 2012 5:31 am

[QUOTE=Helladen] [QUOTE=Joannesalfa]Let's compare my .capx which is a bug cannot play animation while press down arrow.
Mine works perfectly fine. I have full-blown animations for each arrow key that is pressed. I am using the latest beta version, too.

[/QUOTE]

3 questions...

Did you change "From Beginning" to "From Current Frame" ?

C2 32 or 64 bits?

Does animate when goes to up, left and right? it shouldn't animate except the down way
Joannesalfa2012-10-04 05:36:46
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Thu Oct 04, 2012 5:38 am

I just changed everything 'from beginning' to 'current frame'

I thought from beginning meant that whenever you do play the run animation (or whatever animation) that you want it to start from the first frame. I guess technically I'm still a bit confused on the difference between the two now that i'm thinking about it again but it works so... *Shrug*NotionGames2012-10-04 05:38:42
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Thu Oct 04, 2012 5:41 am

From beginning will restart the animation frame to 0 every time it is called. If you have it call every tick, it means that it will never get past the first frame. Before this, it did nothing, and behaved the same as the other one. So, basically you have to be more careful how you change animations now. You should check if that is the current animation already if you still want to use the old way.
Image
B
20
S
4
Posts: 105
Reputation: 2,315

Post » Thu Oct 04, 2012 5:45 am

^oh ok I see. thanks for the explanation. makes more sense now.
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Thu Oct 04, 2012 5:59 am

Basically 'set animation' is working how it seemed it was originally designed to, cool. I think it was just the description (or lack of) in the changelog that had me confused initially.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Thu Oct 04, 2012 2:58 pm

I think I've figured out what's going on here and fixed it for the next build.

Setting an animation every tick like in @Joannesalfa's example is quite common. Usually if you set an animation that is already playing, Construct 2 ignores the action, so the animation plays as expected. r105 fixed a problem where 'Set animation' in an 'On animation finished' event didn't work, but this accidentally changed what happens when you set an already playing animation: now it acts like "rewind to beginning" every tick, which makes the animation get stuck on the first frame. We can't leave it like this because it will break too many existing projects, so I've figured out a way to fix this so both things work. That will go in to r106, but in the mean time you'll have to use a workaround I'm afraid - just add 'trigger once' to your events that set animations, so they don't set the animation every tick. After the next build it shouldn't be necessary any more to do that. Sorry for the trouble!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Thu Oct 04, 2012 8:35 pm

Nice, i can wait for r106 before to continue my projects.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Thu Oct 04, 2012 8:36 pm

Oops, I guess I won't be updating for now then :P
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest