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"

Spawn actor local only, attach to each player

So, I'm trying to spawn an actor by class through the player character class on event begin play. The actor spawns as I expected it to, but it's replicated to all other clients. I just want the actor to spawn for the local client only and not replicated through the server.

I've tried using custom events and playing around with all the replication options, and also tried using Has Authority and setting it to remote. Is it just not possible through the Character Class? If not what class can I do this through?

I'm testing this with 2 clients on dedicated server in the editor. Thanks!

Product Version: UE 4.20
more ▼

asked Oct 03 '18 at 06:18 AM in Blueprint Scripting

avatar image

5 1 2

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

1 answer: sort voted first

It's possible through any actor class, being that it's remote and doesn't require replication. If you call Spawn Actor from Switch Has Authority -> Remote, then naturally it will only spawn where there is a remote connection and not an authoritative connection.

It's not replicating, you just don't understand what's happening; Remote could be the local player OR the simulated players. So by using 'remote' you're locally spawning one for every player.

If you want local player only and not simulated players then use IsLocallyControlled; this will do the local player only. Remember, remote is not the same thing as local.

more ▼

answered Oct 03 '18 at 11:58 AM

avatar image

596 28 24 52

avatar image preacher131 Oct 03 '18 at 06:30 PM

Ok, I understand now. Thank you for the explanation and help.

(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