Can you show the graph?
I edited the post, tell me if you need anything else and il post in the reply
Funny thig is happening.
I just called an event on Client 1 from the OnMouseButtonDown function in the widget, the event is set to run on Server and calls another event set to run on Owning Client and it prints Client 1: Hello, but in the OnMouseButtonDown function if I don’t call the run on server event and call the Owning Client instead it prints Client 2: Hello
Hi everyone
I can’t find the solution for this, let me explain what with an example.
We have 2 clients, Client 1 and Client 2
If i create a widget on each client’s Player Controller and display a message ‘Hello World’ on that widget’s event Construct, the log looks like this
Client 1 : Hello World
Client 2: : Hello World
now my problem is when i override a function on the widget lets say ‘OnMouseButtonDown’ and display a message ‘OnMouseButtonDown’ in each client, this happens
While Pressing in Client 1 : Client 2 MouseButtonDown
While Pressing in Client 2 : Client 2 Mouse Button Down
If anyone knows why this happens I would apreciate an answer
**Edit 1: **
Only happens on dedicated server
Edit 2:
Tried in UE4 v.4.21.2 and ‘OnMouseButtonDown’ is called returns ‘Client -2: Mouse Button Down’ on both clients if ‘DedicatedServer’ checkbox is checked
Edit 3:
After 3 days debugging i now discovered that if i call a function to the controller of Client 1 from his widget, althought the message prints Client 2:“blablabla” , the action of that function runs in Client 1 for example, hiding the widget.
Also, a timer inside the Client 1 widget printing a message every second always says Client 1: “blablabla” if in Client 1 or Client 2: “blablabla” if in Client 2, it’s only when printing a message in a overrided function that it prints always from the last Client
If this is the normal behaviour is kinda strange
Edit 4:
This is the function in the Player Controller that is called to show the Inventory
The widget
OnDrop function
OnDragDetected function
Again, when i call to show the widget its all fine, but as soon as I print something in OnDrop or OnDragDetected or OnMouseButtonDown he always calls from last client, but if I get a timer on Construct ticking, it calls from the right client
Where do you got that print out?
In each print screen i showed you, i had a Print String “Hello World” on each of them
Well i need prints out as i don’t have idea what executes what. all i can tell you is fact that Player Controller only exists in there repective clinet (client 1 wont have client 2 player controller) while server will have all of them. This might be related to the issue
I have this post i did on Reddit aswell, its a blank project so its easier to spot the problem and has output messages, it also has the steps to reproduce if you wan’t to create the project and test it for yourself



