This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+4 votes

Hello.
Is it possible to allow RPC from the server on clients even if they are network master locally?
I'm trying to call this function on the client:

remote func set_pos(new_pos : Vector2):
    position = new_pos
    rset('slave_position', new_pos)

from server:

func _on_player_connected(id):
    print('Player with id ' + str(id) + ' connected')
    rpc_id(id, 'set_pos', $'/root/Node2D/Spawns/Spawn1'.position)

(this function is connected to network_peer_connected)
but I'm getting this error on client:

RPC 'set_pos' is not allowed from: 1. Mode is 0, master is 1.

If this is not possible, what is the best way to allow the server to control clients?

in Engine by (16 points)

Did you ever figure this out?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.