Freeing / Removing Synchronized Entities

Godot Version

4.2.1

Question

I am currently experimenting with Godot 4’s multiplayer nodes, the MultiplayerSpawner and MultiplayerSyncronizer. Currently, I am wondering what is the proper way to remove or free nodes that have been spawned with MultiplayerSyncronizers as children. Right now, my Player scene has two syncronizers, one that the server updates to keep track of position, and then another that clients have authority of to sync their inputs. Now, when I try to remove a player from the tree or free a player on the server, it gives an error. I have ensured that the tree paths are identical on both the server and client sides. The player is removed on the client side as expected, but what is the proper way to avoid this error?

get_node: Node not found
get_cached_object: Failed to get cached path

Is this an error that breaks your game? or “just” a warning, because in the current version of godot there is a bug with the multiplayer deletion and cached references, which is already fixed for godot 4.3. If its not a gamebreaking error, wait for godot 4.3 and see if it still exists

No it’s technically not game breaking, but it does say that it’s an error and not a warning. It’s just one of the errors that doesn’t crash or halt the game. I was just wondering if I was doing something wrong, but if not then that’s good. Thanks!

I have a similar problem currently and found this:

so im hoping this will fix it

Yeah both seem like caching issues. Thank you for this, hopes that it gets addressed in the 4.3!

I ended up making my own custom spawners and synchronizers for the time being as my work around solution. Not perfect, but it works for what I need and I like having the added customizability. Feel free to check it out in case it can be helpful to you: GitHub - Fernanman/CustomMultiplayerNodes: Custom multiplayer nodes for Godot 4.x.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.