Download

Show widget in actor only for trigger owner

Hello,

I made a BP for my actor, In the actor i have a few Widgets (With item text and interact text). When 1 player triggers the trigger both players see the text above the object. I added a few Has Authority (with trigger->get owner) But now only the server can see the widgets. How can i make it, That everything that is being trigged will only be executed on the client.

13bca45992fd1ec96ee1a4ae193e540b331eafc2.png

Take the False outputs?

If i change it to false, Then none of the players see it, When i set it to true All players see it (Im running 1 Dedicated server and 2 clients)

Are those Widgets 3D_Widgets?
I dont know if this works in multiplayer (only tested on one computer so far),
On Begin Overlapp i cast to my character and get the controller reference and create the Widget and plugin the controller as owner and set the 3D widget.
On End Overlapp i set the 3D widget as empty.

But i have no idea if this is good or bad, or even works on a dedicated server.

Edit: Running a validity check for the controller might actually not be the worst idea…

Its a widget inside the actor. So create widget wont work i think.

Sure it does.
Thats how i show hp bars from buildings when the player is triggers it.

Edit: Ok, same checks in End Overlap, its been a while since i made it >.<
Edit2: Should be fine now…

Your problem is that its triggers everytime a character triggers it, if you check for PlayerController (only exist on server and one on every client) and check if the controller is locallycontrolled it should work.
But do you need it to “be” all the time? Because even if its hidden it does something.

Destroy widget instead of hide