Overlap Events are called on all Clients (and Server)

Hi there,
i just started with the basics of multiplayer, but i´ve got a problem, which has propably an easy solution, but i can´t figure out how to do this correctly! I have Supplies which can be opened and I want to show a Widget to all Players within the collision box. But an overlap event always fires on all Clients, altough I only entered the area with one player!

When i close the game i get an error message telling me, that the Event was called on other players too (that´s the problem).

I took out the casting stuff before I made the screenshots to make it simpler.

alt text

For some reason it doesn´t show all 4 images, pls klick on the links to view them.

nowidget.png was taken before i entered the area with any character

widgetcalledonboth.png was taken after i entered the area with the character in the left window, but the widget shows on both clients.

Btw, this problem only appears when i use event (custom events, overlap events, etc.) but not if i call it by a key-press.

Hello

I have a solution for you, see photo:

Explaining:

Add an input to your custom events, the input is a variable of type “actor reference”. Set the event to run in owning client.
What will happen is that the server will send back the information, only for the specifi client that is triggering the actor (the cube “lalalala” in my case)

So, you need to create the input inside your custom event, so you can cast to your box, to specify that which client is touching the box, this way the server know that it is a specific one, and not all

Good luck

1 Like

Nice, it worked! But could you please explain how the Switch Has Authority works, i always thought it would determine wether the Server (Authority) or the Client (Remote) execute the action?

It is confusing, indeed!

The way I understand is that the server (authority) calls the event and order it to run only in the owning clients, which client? the one you specified, i.e, the player that triggers the box, the others clients will no run it.

So, if you don´t specify the client, the server will call the event and order it to run in the owning clients (all them, as it is not specified which client has to run)

Hope you got it, and don´t worry, it really makes the head hurts sometimes, lol