NetMulticast excluding owning client?

Can I make the server call a multicast function that triggers on all clients except the owner of an actor (or a selection of clients)?

I know I could write code that cancels the function on the client after the package arrived, but it would be cleaner and more efficient if it wouldn’t get sent in the first place.

Did you ever find an answer to this? I’m also quite interested.
I feel it must be possible, because during a mouse-look FPS game, the client actually has the authoritative direction that the player is looking. There would be no reason for the server to tell the owning client where their pawn is looking.

No, sorry.

In fact, I’ve changed my plans from multi- to singleplayer some months ago.

I’m quite happy with this decision, because I guess otherwise I would have spent 50% of my time dealing with lag compensation problems without ever getting satisfying results.

1 Like

You can exclude the client from the event/action if it is not locally controlled. You can use the multicast value to check if the locally applied event/value etc is valid.

Not sending that data to the client will require some additional stuff but I don’t see why that would be necessary, you’ll only save a marginal amount and prevent extra checking of the values.

im not sure about BP’s but if you have access to the pawn, the way i solved this for me was using

if (MyPawn && !MyPawn->IsLocallyControlled())
{
   //stuff inside of the multicast_implementation that will not run on owning client
}

I am amazed that this actually works (or that it would, I can’t actually get this to work on my end, but that might be due to using UE5 instead of UE4), since multicast should be server → client. Meaning that everyone on the other end of the multicast would be the local client, since it is usually initiated from the server.