Layer Background Color Change: Save - Load bug

Bugs will be moved here once resolved.

Post » Wed Sep 17, 2014 2:46 pm

Problem Description
When you save game, the background layer color is blue (for example). That's OK. But then, you change layer background color to yellow (for example), open this game, it is loaded, it is the newest version, but the background color is still the old one - blue in this example.

Attach a Capx
Attached.

Description of Capx
This is an example of the problem.


Steps to Reproduce Bug
  • Step 1: Open this .capx.
  • Step 2: Run the project.
  • Step 3: Click (or tap) on Purple sprite.
  • Step 4: The game is now saved.
  • Step 5: Change Layer 0 background color in project.
  • Step 6: Change projectversion (to see, if the newest version of project is loaded).
  • Step 7: Run the project again.
  • Step 8: The game is now loaded and it's the newest version, but background color is still the old background color.

Observed Result
Background color is wrong - it's the old one.

Expected Result
Background color must change into the corect - new color.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)
  • Safari (iOS 7.1.2): (YES)


Operating System and Service Pack
Windows 8 64-bit;
Windows XP SP3


Construct 2 Version ID
r173,
r178,
r180 (beta)
You do not have the required permissions to view the files attached to this post.
B
32
S
7
G
4
Posts: 400
Reputation: 4,595

Post » Thu Sep 18, 2014 6:11 am

This is not a bug.

The layer background is blue when you save the game using savestate.

You can change the background color in the project but once you load the it up again, the game loads the previous state you had saved on start.of.layout

The save state had a blue color background, so what you see is correct.

You will have to either override the saved state on the start of the layout, or change the background color in game with set.layer.backgroundcolor and then save it.
B
10
S
2
G
1
Posts: 92
Reputation: 926

Post » Mon Sep 22, 2014 1:12 pm

Closing as not a bug. It's working correctly, and restoring the background color at the time of the save. Savegames are the full game state and include everything, including layer properties.
Scirra Founder
B
402
S
238
G
89
Posts: 24,629
Reputation: 196,025


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests