Replication via second blueprint works only from server. Simple picture inside.

I set simple replication example (spawn actor from server, and from client).
It works. It CALLs from BP_ThirdPersonCharacter and EXECUTES in BP_ThirdPersonCharacter

But i need CALL spawning in BP_ThirdPersonCharacter but all logic EXECUTE in BP_Handler (via function “Spawn“).
(i don’t wan’t overload BP_ThirdPersonCharacter with too many functions.).
So following setup works only from server, and not work from client.
(I suggest some situation with Characters|Owners, but can’t figure it by myself).

How to force working it from both sides?

you cant, the problem is the client doesnt ‘Own’ the BP_Handler so it has no authority to call RPCs

you need the server call on your pawn/controller, or spawn multiple handlers/components for each player to separate the logic.

Thanks for the reply. However, few questions.

“Client doesnt Own BP_Handler“.

BP_Handler located on the level (some kind of settings \ functions blueprint), so Character Get this BP into variable, and then use it’s functions (as i said, for dividing “character functions“ and “other functions“. )

Why it doesnt own, if client get it into variable from level? Owner is still server?

“You need spawn multiply BP_handlers“. You mean every player must SpawnObjectFromClass BP_Handler, place it in variable, and after that client will be the owner of BP_Handler?

Hmmm, BP_Handler, as i said before placed on every level, and have some “editable variables“ for changing it directly on editor (level settings for each level), so probably i must separate BP_Handler to BP_LevelSettings and BP_Functions.

generally speaking the server owns everything except the player pawn/controller. you can override that but only 1 player can own any object so you cant use it for all players

yes every player must own anything it wants to call rpcs on, but rather than an actor you can just use an ActorComponent on the pawn/controller. even if you keep a global handler you can use ActorComponents to call RPCs on it so you dont

1 Like