Maybe I don’t understand the OnRep functions, but are they not supposed to fire on everybodies game when somebody possesses another object?
When my Pawn bumps into something else, I call a function on the server to possess the new object. The possession itself works, but OnRep only seems to fire on the Server, not on the corresponding client?
This was caused by calling Possess() on the client, which should only be done on the server. Check the thread here, and the AnswerHub post here for more info.
To answer your question more generally about OnRep_ functions, they are called when a replicated version of a variable comes in over the network and changes from the current value. In the cases of PlayerController, since they only exist on the server and single owning client of that PlayerController (not other clients), it would not occur for everyone.
Already replied there but I guess this thread is more on-topic. Could it be that you are calling Possess client-side? That could explain why OnRep_Pawn is not called, because the Pawn doesn’t change server-side. Possess should only be called server-side in a multiplayer game.
I am having a problem with OnRep_Pawn. It triggers immediately when the game starts, but when I change a client’s pawn later by calling possess on the server, OnRep_Pawn doesn’t get called anymore. I checked the Pawn-variable of the client’s controller on both server and the client itself: it changes to the new pawn correctly. And there is no call to OnRep_Pawn…
AcknowledgePossession seems to work fine. It only gets triggered on the “owning” machine, not the server (per se), but that’s okay. If there is something server-sided I need to do, I can still put it under Possess. Thanks again.