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"

Network issues regarding replication

Hi, I am currently doing multiplayer object spawn with the widget. There has a problem the server cannot see the object spawn from the client.

In Picture 1, I do on the player controller because widget blueprint doesn't have 'switch has authority'.

SpawnItemOnServer I did tick the Run On Server and Reliable.

SpawnItemOnClient I did tick the MultiCast and Reliable.

alt text Picture 2, I do on the widget. If the player releases the button and spawns an object.

alt text

Product Version: UE 4.20
Tags:
1.png (130.3 kB)
2.png (82.3 kB)
more ▼

asked Mar 24 '19 at 08:03 PM in Using UE4

avatar image

Hatr3ds
1 1

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

2 answers: sort voted first

Hi Hatr3ds.

This is the correct behaviour. The server cannot see widgets as they only persist only on clients.

Could you provide some more information on what you're trying to achieve and we can work out a solution?

Thanks

more ▼

answered Mar 24 '19 at 09:00 PM

avatar image

Alekann01
441 4 5 6

avatar image Hatr3ds Mar 24 '19 at 09:46 PM

I trying to make a multiplayer world/level editor. Example: player 1 clicked on the button and spawn the object in the level. I don't know why the server cannot see the object spawn from the client.

avatar image Hatr3ds Mar 24 '19 at 09:47 PM

![alt text][1]

This picture is the spawn item system [1]: /storage/temp/272235-spanwiem.png

spanwiem.png (76.7 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Spawn item is being called through the interface widget. If the host, or other clients, don't have that widget open, the command won't run. The controller should always be there, so it'd be better to put that action on it or on a character.

ID isn't hooked up. If ID is just meant to find the first widget, it's always going to be 0 since only one widget should be present per machine.

If you're spawning an actor, that actor can be set to replicate and once it spawns on the server, it will also spawn on the clients automatically. When it's destroyed, it'll automatically be removed. Sending an RPC to the clients and spawning items manually should work too, it just ends up being more work than it needs to be unless you have some kind of special prediction in mind.

more ▼

answered Mar 24 '19 at 09:23 PM

avatar image

Ray_Unreal
23 1 5

avatar image Hatr3ds Mar 24 '19 at 10:16 PM

Thanks for the reply. I am trying to make a simple level/world editor, just like the player can click the button and spawn the object.
This picture is my item spawn system. I have tried another way to spawn the object with the widget and it works well on multiplayer, but only this spawn system did not work on multiplayer. alt text

spanwiem.png (76.7 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