#Server and Client ENetMultiplayerPeer on the same scene?

7 messages · Page 1 of 1 (latest)

silk ravine
#

I always seem to find the solution right after posting on here 😅 set_root_path(path) is just root_path = path now. This solution still works!

silk ravine
#

Actually, I may have gotten a little too excited there. RPCs don't seem to work with this solution?

silk ravine
#

Okay, some progress. I found you can have different multiplayerAPIs set to different nodes in the scene tree using this inside the node you want to have its own multiplayerAPI of:

func _enter_tree() -> void:
get_tree().set_multiplayer(_game_multiplayer, get_path())

#

So far I'm getting authority issues with RPC calls still though...

silk ravine
#

This could be my growing pangs with learning this network stuff in Godot for the first time, but calling rpc_id(client_id, "function", arg) strangely executes 'function' only on the server, and it only works if the @rpc("any_peer") is set (rather than the default of "authority"). The remote peer id is 0 inside 'function', and is_multiplayer_authority() returns true. This is super weird... anyone know what I am doing wrong?

torpid pendant
silk ravine
#

I think I hadn't. 🫡