Question about initialization of saved objects after scene switching and loading

AGM updated to version 2.0.1 today and I ran some tests. I found the following issues.

In Scene 1, I set up many saveable objects, most of which are important items that disappear permanently once picked up.
When I tested saving and loading within the same scene, these objects that are supposed to disappear indeed did not respawn.

However, if the player moves from Scene 1 to Scene 2, saves and loads, and then returns to Scene 1, all these objects that should theoretically have disappeared permanently reset to their initial state.

Does this mean that the current save data only covers the save states of objects within a single scene? I wonder if this is a bug?

===============================================================
Additionally, I noticed that AGM allows you to set an initial spawn point during scene transitions, which seems like a great feature.

I tried learning how to use it by creating a StartPoint node in the scene.


Inside, there is a target player, and I had already configured the player object in the project settings.

After switching scenes, the character successfully appeared at the StartPoint node, but it was a clone.
There was still a default player in the scene tree, resulting in two players being controlled simultaneously :rofl:

Could you please advise if this excellent scene transition spawn point feature could also ensure that the player instance is unique?
For example, similar to using a portal to move from Scene 1 to Scene 2, could it automatically clean up the default player object in the scene tree?

I would appreciate your guidance! Thank you.

I investigated the first issue.

Cases where objects restore to their original state when returning to Scene 1

  • The item’s restoration condition is set to “Restore on scene change.”
  • The “Acquired” state is represented not by a disappearance action, but by a switch, disabling, or hiding. This state exists only in Scene 1’s object_data_list, so it is lost when saving in Scene 2.
  • It relies on “Inheriting state at the end of the scene.”

On the other hand, if you use a disappearance action + restoration condition “None”, the key should be stored under not_revive_object, saved and restored, and then deleted when entering Scene 1.

Could you please check and let me know what settings the relevant objects have?

Thanks for the timely reply. In the test, the object in Scene 1 disappears via the VS action [Self-Disappearance]. There are no respawn conditions set in BaseSettings. The option to save is available.

With these settings:
If the player leaves Scene 1 and saves in Scene 2 without loading, or returns to Scene 1 without saving, the object will not respawn.
However, if the player saves and loads in Scene 2, then returns to Scene 1, the object is fully reinitialized.

I also tried checking [Maintain State After Scene Ends], but whenever I load and switch scenes, the object still reinitializes.

1 Like

Thank you for your report!

We haven’t identified the root cause yet, but we’ve confirmed the bug itself and will investigate.

Also, when there is a starting point and existing objects are present, we plan to move and reuse them instead of copying them.

1 Like

Thank you very much! Looking forward to the fix in the next version!

It makes much more sense for the scene start point to prioritize object generation. Really looking forward to it!

We have released version 2.0.2 to address these issues.

2 Likes

The efficiency is absolutely incredible!!!
All testing issues were fixed in the very first update. Thank you to the development team for your incredibly fast response and fixes!!

===========================================

I conducted further tests on the feature for setting the starting point object when switching scenes.
I discovered that newly generated players cannot inherit all the stat changes from the previous player.

For example, I gave the player an item that increases the maximum HP.
Before using the scene start point, the character’s HP variable increased as the game progressed.

However, it seems the scene start point object does not inherit these variables but instead creates a new initial object.
I would like to ask if there is a way to make the object generated at the start point inherit the previous character’s variables and switches?

1 Like