Ping Pong animation bug when setting anim speed

Bugs will be moved here once resolved.

Post » Sun Jan 05, 2014 4:21 am

Link to .capx file (required!):
https://www.mediafire.com/?2towl4ypxmbb7ig

Steps to reproduce:

The capx only has one sprite, called S1, which has 8 frames and has 8direction behavior, setting only to be able to move left and right.

In the event sheet, I simply have:

- Every tick: S1: set animation speed of this sprite to S1.8diection.Speed/30.

S1 has two animations: Default and pingpong. Both are identical, except having Ping Pong feature on or off.

Observed result:
Setting animation speed seems to cause ping pong feature to reset its state to "non-reversal". This will cause the animation sprite to stuck in the last few frames, instead of going back and forth. (run the .capx, try move left and right until you see frame 6-7 and you will see what I mean)

Expected result:
Setting animation speed should not interrupt ping pong feature.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Win7 64 bits

Construct 2 version:
r152 64 bitskeroberos2014-01-05 04:22:05
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun Jan 05, 2014 3:25 pm

The problem is that if you manually set the animation speed, it'll take positive values as a "forward speed" and negative values as a "backward speed". I'm not sure if this is a bug though..
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Sun Jan 05, 2014 3:54 pm

Ahh... so if that's really the true intention of the developer, for the feature to be coded that way, then it won't be a bug.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Sun Jan 05, 2014 3:58 pm

But this means, we will have to keep track of the backward/forward in the events ourselves.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Post » Mon Jan 06, 2014 12:53 pm

Yeah, as it is it's not a bug because positive animation speeds mean to play forwards, so you're always forcing it to play forwards. However I did notice there isn't any way to tell if the animation is playing backwards, since the AnimationSpeed expression is still positive even when it's playing backwards. This is inconsistent with the action so is fixed for the next build (AnimationSpeed can be negative). With that fix, you can work around it by setting a positive speed if the current animation speed is also positive, otherwise a negative speed.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,527


Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests