Pass Client Variable to Server?


I’ve posted this same question on the help site but it hasn’t been getting any views so I figured here is a better spot to ask.

All I’m trying to do is get the client to update the rendertext for all other clients.
So far only the server can do it.

This is the question:

I have a 3D widget that I type stuff into.

The stuff I type triggers this event here on another BP and sets a render text to show what I typed via the server for all clients to see.

what happens is the text does not get updated even though the event fires.
The owner is set to the player using it properly, that works fine.

Hey Jimonions! “Multicast” event type is what you would be after. Currently its setting this ON the server, which may be a listen (client - Only server will see this visual update) or a dedicated (no client - no visual updates). But changing this from “On Server” to “Multicast” should easily fix this.

Hey there

When I set it to multicast the text still only changes for the client modifying it.
Server still changes for everyone.

This seems like such a simple thing why cant unreal handle it?

Oh and I forgot to mention but all relevant components are set to replicate as well including the render to text.

I might be overcomplicating it, but this is how I did it for my server based chat.

  1. The UI calls an even on the pawn, the event is not replicated.
  2. The event that’s not replicated on the pawn calls another event, this event is replicated to “Run on Server”.
  3. The “Run on server” event has a “Switch has Authority” and calls another event, this event is replicated to “Multicast”.
  4. The “Multicast” event has a “Switch has Authority” and calls another event that is replicated to “Run on Owning Client”.
  5. The “Run on Owning Client” calls to the chat UI to add the message.

Ok I tried to set it up the way you said but still no dice

If my understanding is correct, Isn’t switch authority just for checking if its client or server execution, How does it affect a situation like this? And isn’t run on client just for certain single clients rather than everyone?

also it seems to fail at the Request_Server_UpdateRenderText event for clients

In which class are you on?
If you are in a pawn, simply make “SetSpawnName” to “RunOnServer” and let the Server do a Multicast. It should work this way.

This is on a base actor class placed in the world.

Bump still need help on this

Could you add a print string function behind all the calls to the events to see how far everything goes?

In my setup (first picture) the server_updaterendertext event does not get fired.

I’ve just noticed this ties into some other problems I’ve had. I am using an interface call to trigger these events. Whenever the player “uses” something it trigger this interface event on that item.
What I have noticed is any server side events that need to happen just don’t get get through at all.
In my test object I have the same kinda setup but to this time destroy the actor:

whichever chain I go through nothing happens.
The server_destroy event never gets fired.

Here is in my player controller where im using a linetrace to trigger the call.

I’ve fixed this.

I just made it so that fires from the server in my player controller.
The weird thing was I had this setup way before but removed it and still had it work…
So something must have changed or I did it differently this time. Who knows, I sure dont.

Just basically the interface event had to be callled from the server otherwise any server related functions like destroy actor would not be fired even if they were on a seperate server custom event like my earlier screenshots.

Hey Jimonions, I am running into this exact same issue. Did you get any clarity over the years on how this resolved itself?