Hi guys, it’s me again
I got this beautiful level:
and I want to move the cone around. I set up a working network solution with the help of the session nodes. I made a variable (vector) storing the cone’s position. I set this variable on RepNotify. To move the cone, I did this:
Pretty simple: I take the old position and change the x/y- value. The Input’s are wasd, and if an input is detected it will fire the custom events right below. This events got the following propertys: “Run on Server” and “Reliable”. After the position is changed it will go into the (automaticly created) function “OnRep_ConePosition”:
As you can see, I stored the refference for the ConeActor in my GameInstance.
So - if I understood everything the right way, the following should happen: The owning client recieves an input and gives the information TO THE SERVER (Run on server), so THE SERVER can change the cone position and every client will update this position.
If I run this with multiple windows (I packaged the project and execute it, also tried on different PC’s in the same network, no problem so it’s no network problem for sure) the following happens:
If I press WASD on the server, everything is fine. In every window (including the server’s window) the cone moves around as it shall be. BUT: If I press WASD on a client, every client will act like it shall be, moving the cone around. But the server is like: “I won’t move anything”. The funny thing is:
The server (on the right) will display the shadows on the cone as suggested, but without moving it. How can I convince the server to move the cone, too? Might it be an engine bug? I tried every replication option, but nothing solved the problem. I also tried something like: If on the client (Switch on Has Authority - node), than I store the vector in my GameInstance and if I on the server I take this variable from the GameInstance and set the conePosition, but that damaged the project more than it was helping (Client was not able to move the cone after this try).
Thanks in advance