x

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"

Make light only visible to owner

Hi,

I have a character moving in relative dark areas. I added a light to my Player BP to lighten up near things around my charater.

Unfortunately the light is replicated to all clients. How can I stop that?

Product Version: UE 4.19
Tags:
more ▼

asked May 06 '18 at 12:22 PM in Blueprint Scripting

avatar image

mcmatze
82 13 14 17

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

1 answer: sort voted first

I'm not sure you can activate a light only on one client, unless you spawn it locally on that specific client.

more ▼

answered May 06 '18 at 01:30 PM

avatar image

goncasmage
897 12 14 22

avatar image mcmatze May 06 '18 at 03:30 PM

And how do I do that? I tried following: Spawn on BeginPlay in my PlayerBP. Then it gets spawned everywhere regardless of the "OnlyRelevantToOwner" property I set. Then the ControllerBP: it has no "OnPossess" event, so I do not know where I should spawn the light and where to remove when I switch the pawn.

avatar image goncasmage May 06 '18 at 04:28 PM

Try spawning the light in a custom event, call it ClientSpawn and set the event's replication to Run On Owning Client:

alt text

help.png (268.0 kB)
(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