Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to set visibility of a BP's component in a multiplayer?


Here's the problem : I have a BP Actor class. I have a box collision and a particle system (visibility unchecked) components in there. When player overlaps the box it lets him press a button which makes the particle visible. However, when I try a multiplayer, it only shows particle to the player who pressed the button and not to anybody else.

Here's my BP set up : alt text

I have also replication checked for this BP, still doesn't work for everybody.

Product Version: UE 4.13
chu.png (119.1 kB)
more ▼

asked Oct 07 '16 at 12:01 PM in Blueprint Scripting

avatar image

19 7 6 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Components don't always replicate, you might have to set the replication up on the individual component. So at BeginPlay you could do the following-

alt text

I think that will solve your issue.

You can find further information here - https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Actors/Components/


more ▼

answered Oct 07 '16 at 04:23 PM

avatar image

251 7 3 11

avatar image Discozy Oct 07 '16 at 04:56 PM

Thanks! That works. That toggles visibility when you play as a server and both server and client can see that, however, when you try to toggle visibility as client it only works for a client, not for a server. Any ideas how to make it work for both when client toggles visibility?

avatar image Razer313 Oct 07 '16 at 05:11 PM

You should make it run on server by using a custom event. So create a custom event and then in the top right click Run On Server, you don't need to make it reliable as its not gameplay essential.

alt text

There is more detailed info on Remote Procedure Calls here -


avatar image Discozy Oct 07 '16 at 05:28 PM

Well, now client can't even press a button to toggle visibility, however, Client still can. I've tried to change Custom Event to Multicast or Run On Owning Client, yet only Client sees particle system visible when Client press the button. One more thing I've mentioned : in your custom event node you have First Person Character as a target, however, I have the Blueprint I work in as a target. How did you do that?

avatar image Razer313 Oct 07 '16 at 05:37 PM

So the way it should be set up, the button you press should execute a custom event. The 'Target' part is just set up automatically and I did that in the First Person Character, so its fine having its target to the name of your own blueprint!

You should be able to press a button still, as that will take the input from a client and then the RPC will execute it on the server.

As the component replicates, just telling it to execute that function on the server will mean the changes made will be reflected on clients.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question