[r188] Sine changes value after being enabled/disabled

Bugs will be moved here once resolved.

Post » Sun Nov 16, 2014 1:06 am

Problem Description
Sine behavior changes values each time you enable/disable it via events.

Description of Capx
Two sprites with Sine behavior which can be turned on/off by the player movement.

Steps to Reproduce Bug
  • Step 1: move the player to the central sprite (enables sine)
  • Step 2: get away from the central sprite (disables sine)
  • Step 3: repeat Step 1 & 2

Observed Result
The Sine value (magnitude?) will be changed if you deactivate then activate the behavior.

Expected Result
Sine value should remain the same as set in the object behavior window (or events).

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

Operating System and Service Pack
Windows 7 64bit

Construct 2 Version ID
r188 Beta
You do not have the required permissions to view the files attached to this post.
B
66
S
22
G
4
Posts: 360
Reputation: 6,584

Post » Tue Nov 18, 2014 2:19 am

yes this broke the enemies in my game.. made them jump to random spots. I think what is happening is the sine movement continues to calculate where the sprite would be if the code was still enabled.. When you disable the behavior the movement stops making it seem like the behavior has been disabled... when you turn it back on it seems to jump to the point where it would have been had you not disabled it.

seems like it could be a simple fix.
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Thu Nov 20, 2014 4:13 pm

This was an unintentional breaking change in r188. It's reverted with an alternative solution for the next beta.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest