Error when loading save across scenes using official menu

I’m encountering an error in my project when using the official menu to load a save from a different scene:

Steps: Open the load menu, load a cross-scene save (the save records another map).

Error: Node::get_path_to: No path can be resolved between the nodes XXX (not inside tree) and …PauseMenuManager as they share no common ancestor.

This issue is reproducible in both the official samples “SimpleTopViewActionSample” and “Menu Sample Bazelot Quest”.

I’ve tried many things, but haven’t been able to find the cause.

I tried to replicate this on 2.0.5 and couldn’t get the get_path_to error. I installed the Save, Pause & Options Menu in Bazelot Quest Sample and in a side view project, saved on one map, and then loaded that save from another map through the pause menu. I tried it in both directions and with a few different slots, and no red errors came up.

Could you send your project folder in a zip to pgmmv-support@gotchagotcha.jp so we can see what’s different in your setup?

A few things would also help. How do you open the pause menu, which object runs “Open Menu”, and did you change any of its options? Which slot do you save and load with? In your screenshot the Save00 load is set to slot 0, so I’m wondering if you changed that or anything else in the official menu. Also, does anything else go wrong after loading, or is it only the red text?

I’ve zipped up the example scenario that reproduces the issue and sent it to the email address you provided. There’s also a video demonstration of the process; I hope this helps! Thanks~!

Thanks for sending the project and the video!

Here is what happens in your project.

Your player has a state called 状态001. This state opens the pause menu. But no link leaves 状态001, so the player stays in 状态001 until you press Back in the menu.

When you save from the menu, the player is still in 状态001. The save file stores that. When you load the save, the player goes back into 状态001, and 状态001 opens the pause menu again. I think this is what caused the red get_path_to error on 2.0.5. I tested on 2.1.0. On 2.1.0 the red error did not appear, but the menu still opened again after loading.

1. Let the player leave 状态001

  1. Open objects/Player.tscn and open the Player’s Visual Script.
  2. Add a new link from 状态001 to wait. Make it the same way you made the link from wait to 状态001.
  3. Click the new link. Set “Conditions for Switching Actions” to “Unconditional”.

Now the player opens the menu and then goes back to wait immediately.

2. Remove the ChangeAction from the menu

  1. Open ui/OfficialMenuSystem/pause_menu.tscn.
  2. Click PauseMenuManager and open its Visual Script.
  3. Click the state named Back.
  4. Delete the ChangeAction. Keep “Enable Layer” and “Close Menu”.

You don’t need the ChangeAction anymore. The menu already stops the player while the menu is open.

3. Make a new save

Your old saves still have the player in 状态001. Play the game and save again before you test loading.

When I did this, I loaded a save from the other scene. The menu stayed closed, and I could move immediately.

Thank you so much, Baz!

I followed your method and added a new link from state 001 to wait, which indeed solved my problem. The red error messages are gone now. This issue had been bothering me for a long time! Thanks again!

1 Like