Problem with rep notify?

I am curious to know why this doesn’t work. First i load some info on owning character and then i set it on server. That info is stored in Player Data Structure which is not replicated. After setting it on server and confirming that values are correct then i proceed to set the values that use rep notify but it doesn’t get called on clients at all?

Maybe try running your “CustomEvent_5” as a multicast and create another custom event called perhaps “CustomEvent_5Server” and set it to run on server. Connect your server event to your multicast event and from your input action “3” call the server event…? You may not even need the repnotify? You also have replication conditions you can set on repnotify if that helps at all… I had problems running events exclusively on server in some cases because they were literally only executing on the server and clients never see it unless you were the host…

Have you verified that CustomEvent_5 is indeed being called on the server?

Are you playing with Dedicated Server, or Listen Server?

I need the rep notify because if a new player joins he needs the values. I dont think multicast is going to do the job. I also tried with replication conditions but never got it to work.

Custom event is being called on the server and the values also are set on the server however repnotify never gets called. Its dedicated server. Does repnotify work differently on listen and dedicated servers?

I may be wrong, but I think a lot of join in progress value sending happens in the game mode before or after PostLogin.

By default, RepNotify doesn’t trigger, if updated value that is received from server is the same as the current value on the client. It can be changed to trigger every time when the value is replicated from server, but only for variables defined in C++.

Ok i managed to solve it after a lot of time.

Can you post what was the root of the problem and how you solved it? :slight_smile:

Well it was really weird. I don’t think there was anything wrong with RepNotify, maybe this is some engine bug or something.

So what’s happening is i have a mesh that’s invisible on load and also null (it’s not set). So on RepNotify SelectedCharacter it’s supposed to set the selected mesh and then make it visible to all clients. It was failing to do so, so what i tried is setting the mesh to whatever character, on RepNotify SelectedCharacter it sets it to correct mesh and then makes it visible. For some reason this works.

At first i thought that it was problem with RepNotify but now i think that its just a bug.