Multiplayer, server shoots correctly, but the client calls authority not remote?

I think that’s what I’m supposed to call there at the remote since the client needs to tell the server that it wants to shoot. If I just call start fire my game crashes with an infinite loop detected and that’s when my client actually decides to fire, sometimes it just says client: server firing, and executes authority.

You mean in the start fire function? The thing is that sometimes I get this:

202157-clientfiring.png

and now for some reason its like this, firing from client:

I disconnected it to test it like this:

The blue print string just doesn’t go through. I’m also creating a session could that be it? Sigh I just don’t get it.

Sure, is there a way I can privately message you? I’d rather not post it here.

Yeah, It appears I can’t PM you here, anyway I’ll have to wait for it to zip and then upload to dropbox also I really appreciate the help :slight_smile:

Hey, I came to the same conclusion, you can post this as the answer.

Glad to help

Hi, I’ve been trying to get this to work for quite a while and I can’t seem to get it to work. When the server fires everything works correctly but when the client fires it seems that the remote is not called and instead authority is called again, when the server fires I can see 1 explosion and hear a sound, but when the client fires I can see two explosions and hear two sounds and this is IF the remote decides to fire. Sometimes on the client i can see in blue client: client firing and sometimes its client: server firing. Also when the server fires the client can see the explosion spawn at the hit location, but when the client fires, the server can’t see anything.

Here is what is going on:

Server:

202156-capture.png

Client:

202157-clientfiring.png

I think that the second explosion I see from the client when firing is actually coming from the server. Most of the time the blue string is not even there but it says “Client: Server is firing”.

Here is my setup for this:

^This is in the event graph of a weapon blueprint. The “SpawnEmitterAtLocation” is plugged at the end of a LineTraceByChannel’s break hit result location.

Start and Stop Fire are called from the character blueprint.

Nobody has an idea? :frowning:

Why are you calling “Server Start Fire” in the “Start fire” function?

The first time your “server start fire” is being called is through the client. When it reaches the remote it gets called again, this time through authority which I believe is why it is getting called a second time but through the server

Can you upload your project so I can take a look? I’ve tried to duplicate your issue through the first person shooter template with server and client and its working for me

Here is what you can do:

  • copy the blueprints after the print strings in your “start fire” function. Disconnect the nodes (similar to the last image you posted).

  • Create an identical spawnEmitter node except make it run on server. Run the server node to the nodes you previously had in the multicast.

  • Create a new custom event in the event graph that has no replication. You’re going to do the line trace in here so paste the code you copied before. Also, probably want to replicate the “wants to fire?” boolean.

  • Now, instead of the multicast spawnEmitters you had, use the server spawnEmitters we just made.You were previously calling the spawns twice. Once locally and once from the server. Now we are doing the line trace locally, sending the information to the server and all connected clients, and spawning the emitters to all clients.

p.s. I also tested with 3 players and it worked as well.

Hey, don’t forget to mark as resolved!