Animations stop playing at frame 0 while speed is negative

Report Construct 2 bugs here.

Post » Fri Aug 14, 2015 5:22 pm

Problem Description

When setting a sprite animation speed to a negative number to play backwards, the animation stops at frame 0 even if "loop" is set to YES for the animation.


Attach a Capx
https://dl.dropboxusercontent.com/u/403350/ReverseAnimationBug.capx


Description of Capx

Tap to make animation play backwards.

Steps to Reproduce Bug
  • Step 1
    Tap to make animation play backwards.

Observed Result

Animation stops playing at frame 0

Expected Result
Animation to keep playing in reverse

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer Edge: (YES)

Operating System and Service Pack
Windows 10 64bit

Construct 2 Version ID
R211
B
87
S
44
G
16
Posts: 1,002
Reputation: 17,932

Post » Sat Aug 15, 2015 4:12 pm

The way the animation speed works is the animation speed declares how many frames you view a second. If the speed is 5, you would then view 5 frames a second. Zero is zero frames per second. You cannot have a negative frames per second.
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Sat Aug 15, 2015 8:32 pm

I'm not sure that Scirra programmed the usage of a negative animation speed, this is why the frame stop at 0 and not going to the last one.

A little workaround to make it work:
Image
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Mon Aug 17, 2015 1:39 pm

It is actually working correctly given the way it's currently designed: when the animation loops it goes back to the "Repeat to" frame, which is frame 0. This restarts the animation when playing forwards, but sticks it at the end when playing backwards.

We're due a stable release soon and this is not a regression, so I won't fix this for the next build. However I'll leave the report open and figure out something for the next beta cycle (I guess a "set repeat-to frame" action would do it).
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests