Save/Load doesn't activate deactivated Groups

Bugs will be moved here once resolved.

Post » Tue May 19, 2015 7:52 am

Problem Description
Using the "load" system action does not properly load (or save) a group's activated or deactivated status.

(I'm unsure whether this is part of the feature or not as it was not mentioned in the manual or your tutorial for Savegames, but it feels like a bug to me since it's not fully loading the game as it was — which means a lot of things can be broken after loading.)

Attach a Capx ... download=1

Description of Capx
2 layouts:
  • "Start". Has a button to take you to the next layout. It also has a "load" button.
  • "Game". Has a square object and a mouse object.

Steps to Reproduce Bug
  • Preview the game (it should begin with the "start" layout)
  • Click the "start" button
  • Hold down the mouse button and create lots of pink squares.
  • Before they all expire: Click on the "save" button
  • You have now been taken back to the starting layout
  • Click on the "load" button

Observed Result
The pink objects are not spinning or being destroyed anymore. The Group must be Deactivated!

Expected Result
The pink objects should continue to spin and be destroyed. The Group should be Activated.

Affected Browsers
  • Chrome: YES

Operating System and Service Pack
Windows 7, everything upto date

Construct 2 Version ID

Thanks Image
Posts: 1,806
Reputation: 24,556

Post » Tue May 19, 2015 3:02 pm

The problem is in the events. 'Save game' does not actually complete immediately: it saves at the end of the tick, where it then fires 'On save complete'. So in your example, you guarantee that the save game has the group disabled, because you disable it immediately after the save action (which will not be done until later). If you move the disable group and change layout actions to a "On save complete" trigger, it works correctly.
Scirra Founder
Posts: 24,893
Reputation: 198,594

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests