Blueprint "Set input mode" in network game

Hi, I am trying to change the inputmode in a network game, but I only want it to happen for the client that overlaps a collision box inside a blueprint actor. What I have tried is this:

I have a blueprint actor (set to replicate) in the level with a collision box and a BeginOverlap event that calls an event on the playercontroller. The event (set to “Run on client only”) on the playercontroller then sets the inputmode to Game and UI, but the inputmode is also set for the other clients.

I have also tried to put a replicated event after the “Begin overlap” event and have it run only on the owning client, and also have it only run on the server, but I can’t seem to find the right combination to make this work. I have packaged the game and run it on two machines to see if the wonkiness of running a multiplayergame in the editor was the cause.

Here are my blueprints:

So I got this working, and wanted to share my blueprint:

I have an actor with a collision box, and when the player enters the collission box the variable “Can Use Widget” is set to true on the playercontroller.

http://i.imgur.com/9b7iEeO.png

Then on the PlayerController the player can press the “Use Action” button (add an input in Project settings), and the blueprint will check if the player can use widget and then call the custom event “WidgetInteractionON” which is only run on the owning client, which changes the inputmode to “Game and UI” and shows the cursor (so that you can interact with UMGWidget3D for example). The reason for the “Do Once” is so that the player can’t change the inputmode again (this might be redundant).

http://i.imgur.com/lLAQeLQ.png

When the player leaves the collision box we set “Can Use Widget” on the playercontroller to false, and tries to cast the actor to one of the player characters and then call “ASP_RequestServerWidgetOFF”(which is set to run only on server) which in turn calls “RequestWidgetInteractionOFF” (which is set to run only on owning client) on the player character.

http://i.imgur.com/9b7iEeO.png

The “RequestWidgetInteractionOFF” calls the “WidgetInteractionOFF” (which is set to run only on owning client) on the playercontroller.

http://i.imgur.com/FRMNr4D.png

This is quite a roundabout way of doing it, but the reason is that ownership of the objects in your level affects how you set up replication, see the this link [RPCs][5] for more info. Maybe there is an easier way of doing it, then please tell in the comments.