[Networking] Doubt about Event Replication

I’m not able to reproduce this, can you show me screenshots of the blueprints that are calling ExampleA and ExampleB?

Are you experiencing this while testing in mulitplayer mode (multiple clients and/or with a dedicated server)?

The only difference between the two is that TestB can be called on the client and it will execute on the client, but not replicate up to the server. TestB can be called on the server and it will execute on the server, but not replicate down to the client.

However, TestA can be called on the server and it will execute on the server and if it’s called on the client it replicates to the server and then executed on the server and not the client.

Here’s my personal design preference.

If I expect TestB to be ONLY run on the server, but I know it’s being called by a Run On Server event already I use Switch Has Authority and branch of the Remote pin.

If I expect TestB to be ONLY run on the server, but I know it can be called from a client machine that’s not the server I set it as a Run On Server event.

Hey guys what’s up?

I have a doubt I think it’s an easy one, but I’ve been searching for this and haven’t found anything about it yet. I created an example to make it easy to understand:

On the left side of the image, I have an “Example A” event that Executes on Server, that then it calls an event called “Test A” which also Executes on Server. And on the right side of the image, it’s the same thing except that the “Test B” event doesn’t replicates.

My question is, if (on the left side) I’m already calling an event that executes only on the server, what is the need of doing the same to the next event? Is there any problem doing just like the right side of the image? And if there’s no difference, what are the best practices here? Thank you all!

Are you experiencing this while testing in mulitplayer mode (multiple clients and/or with a dedicated server)?

Sure! It runs just like yours! The image from above I created hypothetically, but if it helps, imagine the events (both Example A and Example B) being called from the PlayerState (which exists both on client and server), would there be any difference between both events that I showed above?

Thanks for your response =D

I developed the habit to add a Switch Has Authority in front of code that is meant for Authority only. Regardless if it’s a RPC set to Run On Server. It’s not a bad habit to get into.

Hey thanks that answers my question! Just one more thing, is there any need to add a Switch Has Authority node just after a replicated event that is Run On Server, for security reasons maybe?