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