Destroying replicated Components

What I have:

Spawning a new copoment and have it appear on all clients works fine, no problem.

What I want to do:

33141-destroycomponent.png

When I try to destroy component, it disappears on server, but not on clients.

I tried using events, that take component as parameter and multicast it, but it only gets called on server side… actor which holds component replicates fine as well.

Apparently other function calls don’t get replicated as well. Setting components visibility didn’t work.

This is not a single case.

I just made a small test project and made a Blueprint which adds a Component in consutruction script and removes it after 15 seconds ingame. On client side, component is not destroyed.

I just moved this question to bug reports, since I have a minimal failing example and nobody had an idea what I could’ve missed when doing this.

Hi Deventico,

I have not been able to reproduce behavior you’ve described in 4.7.2. To test, I created a new Actor BP. I created a function, “AddChairComponent”, called Add Static Mesh Component (SM_Chair), Set Is Replicated to True, and set a NewVar. Then on Event Begin Play, I added a delay of 2 seconds, called AddChairComponent, another Delay, then Destroy Component (NewVar). After dropping it in level, I hit PIE with clients set to 2. Both client and server saw chair component appear after 2 seconds and then disappear after another 2 seconds.

Are you setting this up differently? Are you using a different engine version? Some screenshots of your BP setup might be helpful. Thanks!

ok, so it’s not a bug, I found mistake:

blueprint I’m working on has “replicated” set to true. This is not necessarily correct way to do it at moment (4.7.2).

blueprint is parent of other blueprints. Now when I set replicated to true in parent blueprint, child blueprints get replicated set to false as soon as I restart editor. This is because of a bug.

Therefore, I needed to set parent blueprint to not replicate in order to be able to have child blueprints replicate.

fact that it changes replication when restarting edtior led to much confusion when I tried to debug issue. Especially since the editor crashes often when testing multiplayer stuff.

Thanks for investigating!. Found issue, see answer.