Godot 4.6.1
Hey everyone ![]()
I just realized that the MultiplayerSpawner only seems to be creating new objects with default values ββon the remote clients. Neither settings from the SpawnManager before add_child() nor settings from the MultiplayerSpawner via _on_spawned(node) seem to be reaching the client.
Do replicated nodes have to get their settings themself, or am I missing something crucial here? ![]()
SpawnManager
# 3. Spawn players
func spawn_players():
if is_multiplayer_authority():
for key in ManStageSetup.players.keys():
var shiptype : String = ManStageSetup.players[key]["shiptype"]
var ship : Ship = load(ManLink.get("SHIP_" + shiptype.to_upper())).instantiate()
ship.set_multiplayer_authority(ManStageSetup.players[key]["sender_id"])
ship.name = str(key)
ship.global_transform = %Spawnpointlist.get_spawnpoint().global_transform # <- does not reach the child
ManStageSetup.container_players.add_child(ship, true)
MultiplayerSpawner
func _on_spawned(node: Node) -> void:
node.position = ManStageSetup.players[node.name]["spawnpoint"]