Download

Replicate a Pickup properly

Currently trying to create a pickup using a collisioncomponent and a StaticMeshComponent.

The pickup works but I cant get it to replicate for lack of a better term dying when picked up. After use the collision and mesh both stay actively visible and also remain as separate from client to server.

In usage on client you pickup the item the mesh remains and collision cube but you can no longer pickup the object a second time which works fine but on the server side the object is still available both visually and pickup available.

any help with this greatly appreciated as I have been able to make it disappear but by setting it to hidden but that is not replicating to server either from client actions.

Just call the destroy actor function within the blueprint, that should work.

Thanks I will look into that.

But I really would like to know how to destroy it properly in code if possible so I understand replication for this type of action.

Ok tried destroy in the blueprint but it only works server side. In the respect that when you use the object it vanishes on both server and client. But using the object client side does not.

https://www.unrealengine.com/marketplace/en-US/slug/mpus-multiplayer-pickup-system This Should help you out !