Recently I’ve started tinkering with Multiplayer and Replication in Blueprints and ran into a small problem where the event I’m trying to execute runs on the clientside twice, I’m trying to make it so that it only fires once on both the server and client, the event runs just fine and once on the server but I can’t figure out how to tell the server to not run the event on the client who first executed it. Here’s how I’m currently doing it:
Code looks good for a dedicated server setup, but will fail in standalone mode, and in listen server mode for the host.
Which mode are you testing in? And which modes do you want to support? This is important to make sure you understand and answer those questions before doing replication.
Wait I just had brain fart. This code should actually work in all scenarios.
The only weirdness I can spot is your passing the “Originating Pawn” parameter around, which is Self, so it is useless. But even then, it shouldn’t cause this problem.
Try removing that parameter, and simply use Self in IsLocallyControlled.
If that doesn’t work the problem must lie elsewhere. I’d like to see what comes before FireClient in the screenshot (ie. how the whole thing is triggered).
This looks Client Authoritative, as you are not explicitly having the server fire its own Auth shot. Relying on the Multicast to execute Fire Client…cause servers run multicast events too.
Fire Event should have Switch has Authority (remote) → weapon fire logic etc. Otherwise the server will run the exact same logic. You need to block the server from executing the Fire Client logic. It should have its own firing logic.