0 votes

I know that I can create a method for rpc something like this:

void Rifle::_register_methods()
    register_method("_shoot", &Rifle::_shoot, GODOT_METHOD_RPC_MODE_SYNC);

And call it: rpc("name")

–°an i create a variable that i can modify remotely?

asked Jan 9 in Engine by Roket (48 points)

1 Answer

0 votes
Best answer
register_property<PlayerControl, Vector2>("puppet_position", &PlayerControl::puppet_position, Vector2(0, 0), GODOT_METHOD_RPC_MODE_SLAVE);
answered Jan 10 by Roket (48 points)
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 How to use this Q&A? before posting your first questions.