I’m getting strange behaviour of running RPCs and variable replication on ActorComponent based class. Owning actor and the component are marked as replicated btw.
I’m trying to call the function below on the server (commented line)
If I understand RPCs correctly when I call the function from the server both logs should be printed, right?
And If I call it from the server only the server log should be printed.
If you call BeginRevive from the client, then ServerBeginRevive should be called unless there is an issue with IsInlastStand() or IsRevivingInProgress() and it returns early or perhaps you have not setup the function properly with adding ServerBeginRevive_Validate function?
If you call BeginRevive from the server then it should not call ServerBeginRevive because it’s local role is not < ROLE_Authority (ROLE_Authority = 3).
Thank you for your reply. There is no problem with IsInlastStand() or IsRevivingInProgress() I checked that multiple times. Validate function returning directly true.
I called BeginRevive() function on client-side so it should be called.
I tried to call RPC in blueprint and this appeared:
LogNet: Warning: UNetDriver::ProcessRemoteFunction: No owning connection for actor BP_CharacterV2_C_1. Function ServerSetCameraRotation will not be processed.
If I try to replicate the variable (server → clients) OnRep is not called at all.
Also, I read here that it has to do something with pawn possession. I didn’t modify default spawning/possessing of pawns.
Hmm unfortunately im out of ideas, you sure your playercontroler has possesion of the pawn?
Perrhaps the issue is in your controller or character setup somewhere.
May I suggest that you make an empty barebones project with just a simple RPC so I can try and perhaps pinpoint where the issue is? dunno how else I might help, I would just be guessing.