I want to make a net working chess game, but the piece has many own propertys,
like attack point,health,move range,move direction .etc
Currently, I have a problem for move pawn.
I use listen server , only two player, client and server.
I want to set the pawn location in client, and server can see it change.
The value of location can be change by player.
I’ve seen the networking totorial, but the problem does not solve.
Now i can do this in server and client can see work.
In turn, not work.
Is there any way to solve this problem?like variable intercommunicate, or when client call server func then server get client’s variable.
I’m Taiwanese, my english is ugly, Please forgive me.
If you have a part that you do not understand,tell me, i will try to explain.
With a client server setup two things are very important.
Make sure all variables and actors of yours which are important to both players are properly replicated. Variables have an option in the details panel where you can set them to “Replicated” and actors also have options in the “Class Defaults” to “Replicate”, “Replicate Movement”, etc.
Make sure everything is done on the server. When you create a custom event you can select in the details panel “Run on Server”. Make sure you always call a custom event with this property when you spawn or move an actor or change anything because only if the server does this it can be replicated to the clients. The clients won’t by default send everything to the server.
If this short explanation doesn’t help could you show us how your current BPs look like?
Thanks for your Reply. Your Answer is correct.
I forget to remove this post after the question solved.
I’ve probably understood how does the network event work after i read related documents.
The actor blueprint in level can not trigger network event when the event is implement in this.
I does not setting the “default pawn”, but i use the playercontroller to implement network event.