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"

How to change a material and watch the change in dedicated server?

I just did a dedicated server, but when I open a clien window, and change the material of a mesh, I can't see the change in other multiplayer windows.

It seems to be that I just can see the player moving around the scene, from different windows, but can't interact with the enviroment.

Am I missing something?

Product Version: UE 4.15
Tags:
more ▼

asked Apr 19 '17 at 10:55 PM in C++ Programming

avatar image

mngpssn
382 21 15 23

avatar image ItsaMeTuni Apr 19 '17 at 11:04 PM

Does the player have authority over the actor that has the mesh you are trying to change the material? Do you replicate that mesh? How do you change the material on the mesh? C++, BP?

avatar image mngpssn Apr 19 '17 at 11:26 PM

Set the authority into a player? I don't know how to do that. Please if you have a link or documentation I will appreciate it very much

These are my images, they are very single:

alt text

alt text

I'm using blueprints.

Thank you in advance!!

avatar image mngpssn Apr 19 '17 at 11:37 PM

Ok, I did some research, is like I would need to set the authority in some place, but I can't find how to set this grant into the level or player...

avatar image ItsaMeTuni Apr 20 '17 at 12:28 AM

In multiplayer the server has authority over all replicated actors except for Player pawns. Each player has authority over its own pawn. When you create an actor from code running on the client that object will be local, that means that other players wont see it, not even the server. If you want an actor to be seen by all players you need to spawn it server-side (and it needs to be a replicated actor). If you want to change the material, call a Client->Server RPC (client to server function) from the client that will run on the server. When you change the material from the mesh running code on the server other players will see it, otherwise they wont. Networking is very complex, I'm still struggling to make an inventory system work in multiplayer in C++. Btw, sorry if I made grammar mistakes, my main language is not english and I don't have the english dictionary installed on this browser :p.

avatar image mngpssn Apr 20 '17 at 02:40 PM

Thank you ItsaMeTuni, I'll start doing some research about what you said, so I want to mark your answer as correct but I think you post just comment, please post an answer for mark it.

Thanks again!!

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

1 answer: sort voted first

In multiplayer the server has authority over all replicated actors except for Player pawns. Each player has authority over its own pawn. When you create an actor from code running on the client that object will be local, that means that other players wont see it, not even the server. If you want an actor to be seen by all players you need to spawn it server-side (and it needs to be a replicated actor). If you want to change the material, call a Client->Server RPC (client to server function) from the client that will run on the server. When you change the material from the mesh running code on the server other players will see it, otherwise they wont. Networking is very complex, I'm still struggling to make an inventory system work in multiplayer in C++. Btw, sorry if I made grammar mistakes, my main language is not english and I don't have the english dictionary installed on this browser :p.

more ▼

answered Apr 20 '17 at 02:46 PM

avatar image

ItsaMeTuni
239 19 14 20

avatar image mngpssn Apr 20 '17 at 09:04 PM

Hi ItsaMeTuni, it's me again :P

By following your instructions I could do the following images, I mean, I can run from server and change the material I wanted to. But this is only in editor mode, if I package the project, and run my server shorcut with -log command, the window server obviously doesn't run and I'm not able to press Z key from client window and change the material.

Do you know what am I missing?

The BP I post is in my levelBluePrint

alt text

alt text

(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