Blueprint networking - having interactive objects replicate

Hi there I am having a problem with my first attempts at networking via blueprints. I’ve worked through all of the tutorials I found then came unstuck when I branched off on my own to try the following (this is using the 3rd person blueprint sample project):

I want to have an object in the world which is owned by the server but can be modified by any of the clients. Right now this is a cylinder that should grow when a player clicks close enough to it, using an interface to communicate the interaction. The object is set to replicate.

I spawn the object like so to make sure it is managed by the server:

In the Third person Character the interaction logic looks like this:

In the Intractable object I have a heightRepNotify value which is set as follows:

with the OnRep_heightRepNotify function doing the modifying the object:

The end result is that the server version updates fine on server & client and the client version does nothing. I tried making the Interactble object not just owned by the server and this resulted in the server version being updated on both but the client one updating just on the client.

What am I doing wrong? Am I going about this in the wrong way entirely? Ideally I want to have interactive objects where the interaction is managed by the server in order to avoid cheating/keep everything safe.

Thanks for reading.

I managed to solve this problem after reading this doc that I would recommend to anyone trying to do networking through blueprints:

http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen_BW.pdf

The solution, in case anyone has the same problem was as follows:

I moved the Interaction into the player controller, and on a valid interaction call the server from there with the object that the interaction wants to be carried out on:

Then simplified my Interactive object to just the following (keeping the OnRep_heightRepNotify function the same as previously):

Now everything works as desired - all players can increase the height of the object :slight_smile:

Your answer to your own question has helped me, thanks.

Thank you for sharing this great asset.