"Only the owner can moveX"

Hello,

I'm trying to learn Bolt, and doing a game, pretty close to the advanced tutorial.
Actually, my charactere is moving, replication is okay, but i got this error in while :

https://gyazo.com/35ece8f5b01b68bd6440dca20674a306

for every state i try to define.
I Got this error :
"Only the owner can modify moveX"
"Only the owner can modify jump"
state.MoveX = cmd.Input.Forward ^ cmd.Input.Backward;
if (_motor.jumpStartedThisFrame) {state.Jump();}
You should know this project is going for a Server and a client, no player server.
So the code is a bit different, and i probably miss something.

Can provide all you need, thanks for the help !

Comments

  • So after some try, figurate and it was logic that state.moveX, and state.Jump should be marked as "everything except controller" as replication mode.

    Ast the code is executed by the server and every body else. My only ask is :smile:
    - Why transform should be marked as everyone ? is for the resetstate ?
    - Why in the advanced tutorial they place mecanism state as "everyone" and don't got the error when they affect state variable on a player client ? (seem logical the error will not pop on the serverplayer
  • Transform, animation, and weapon related state should be "everyone except controller"
    Properties like health that only the server runs logic on should be "everyone"