#I am having some difficulties with multiplayer and rpcs.

1 messages · Page 1 of 1 (latest)

hard lily
#

When the client joins, everything is dandy, but the host cannot see the client. I think the add_child is only running on the client’s side.

I found a reddit post talking about it (https://www.reddit.com/r/godot/comments/17k0c02/peer_2_peer_multiplayer_in_godot/), and although they got close, they never solved it. The username data is being passed from client to host.

I will atach screenshots of the problem and script, as I don't have nitro so theres a text limit

hard lily
#

ik theres a lot of extra stuff i dont need, ive been trying lots of differenthtings

raw inlet
#

To better debug this kind of stuff I usually rename the game window with get_window().title = "Host" or "Client"
Then i can do print(get_window().title + " added player with id "+ str(id))

#

After looking closely. sendUsername does not have add_player().rpc()
So it is only ever calling that locally.

Unless they changed how RPC works recently

hard lily
#

I think I may have fixed it, but I accidentally deleted my player scipt 😢

#

nvm didn't fix

#

found my player controller tho