Overlay Material Replicated

Hi, the question is how to replicate an overlay material so that it changes all characters that are in multiplayer to that overlay material. This is what I got but only works for my character…

Did you try setting the custom event Replication to Multicast?

use a repnotify, multicast can fail if the client isnt loaded yet

I tried using multicast didn’t work. This is how I set it up with repnotify still get the same result. (overlay works on me only)

I should mention that I am testing this with AI that are controlled player pawn actors

did you put the code in the repnotify function?

Yes the code is in the repnotify

Server calls can only be made on a client you own and will not execute any server functions when calling them from one client to another. This is why when you execute a server call, then multicast, all the other clients can see the changes you made to your character, but this does not work when trying to manipulate the server state on other clients. You have to make the server call → multicast call from an authoritative state (server) who has or can get all other server states. An example that would work:

You can do it differently but the server needs to make the calls to the other instances of the clients on the SERVER to modify the clients’ states on the server. Can be done without get all actors if you use gamemode, gamestate, playerstate, etc, or have an array of players saved on the server somewhere, doesn’t matter. Just need server to do it by getting all the server instances of the clients while on the server. This will generally only be needed when doing something that affects all players, something the player state can usually handle well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.