Godot Version
4.2.2
Question
I’m getting this error
E 0:00:12:0305 Node::get_node: Node not found: “Tavern/1304113874/MultiplayerSynchronizer” (relative to “/root”).
<C++ Error> Method/function failed. Returning: nullptr
<C++ Source> scene\main\node.cpp:1652 @ Node::get_node()
it only ever happens when a player joins late and fixes itself when players shift from the tavern to a quest, it’s really odd and not a huge issue but it’s annoying for the players to be desynced like this in the hub world when someone joins late
and when I say joins late I mean after the host has pressed play and everyone has spawned in
This is my player spawning script:
if Global.is_multiplayer == true:
index = 0
for i in GlobalMissionManager.Players:
if has_node(str(i)):
pass
else:
Players_Total = Players_Total + 1
var currentPlayer = Lost_Soul.instantiate()
currentPlayer.name = str(GlobalMissionManager.Players[i].id)
currentPlayer.Username = GlobalMissionManager.Players[i].name
add_child(currentPlayer)
for spawn in get_tree().get_nodes_in_group("PlayerSpawnPoint"):
if spawn.name == str(index):
currentPlayer.global_position = spawn.global_position
index += 1
Is there any way to fix this or will I have to make a workaround?