I am using 4.10.1. First of all, I’ve seen several tutorial for replication and I get how most of it works and have done a few tutorials. I am very confused as to why this isn’t working. I know it is something I am doing wrong, but I do not know what. This is probably really simple but I’ve been trying to figure this out almost all day.
I have a UMG widget with some text boxes and lines. The lines are populated by a string array in the controller of the client. It all works perfectly except I cannot for the life of me get the function to call on both clients at the same time. Also for some strange reason if I use a custom event that replicates via multicast then I can no longer move the camera (I’m using a spectator pawn instead of a normal character) and it snaps to the exact position it does when it spawns.
Bluntly, I am trying to call the function with the string on both the client and the server so they get the same lines of text.
I want the lines to be the same.
My attempt to call the function on both client and server at the same time. The stuff on the right leads to the function that takes the new string and adds it to the string array variable, which is not replicated. This is being done in a PlayerController if that matters.
Continuation of the above.
Function that adds the new string.
------Followed vanlacke’s advice------
I moved everything into a character called NewCharacter instead of the playercontroller.
Error I get and the replication for NewCharacter, for some reason the Event Begin Play calls twice on the server.
The current result. Print string DOES get called on both the client and the server, but for some reason Move String and Add String do not add anything if it was called from the other, but the print strong node DOES fire on both client/server and the client.
Add String, now in NewCharacter
Start Up, a function called by EventBeginPlay when the NewCharacter is made.
Move string, now in NewCharacter
The Event Graph in NewCharacter my character. The only thing in the player controller is something enabling the mouse cursor.