Code running on client after IsDedicatedServer macro

Very frustrated. I’ve got an IsDedicatedServer macro that is not functioning properly. Code after True is still running on the client no matter what I do.

My assumption you have a dedicated server running because your debug settings for the Blueprint are set to watch “Dedicated Server”, but I’ll give a reason as to why this is happening.

Tick is an event that is called by both the server and the client when the Actor that is “ticking” is simulated. This means that IsDedicatedServer will be true for when the version of the Actor on the dedicated server is “ticked”.

It looks like you’re debugging from the Dedicated Server, even though the yellow text shows client simulating.

108540-495140_dedicated.png

Let me know if changing that doesn’t work.

Yes, it’s a dedicated server. I understand that the tick event runs in both places. What’s confusing me is the fact that I put the IsDedicatedServer macro there to stop the rest of the code from running on the client. Yet, it reached the breakpoint for True on the client, as noted by Client - Simulating in the upper right. It shouldn’t be reaching that point on the client. It does the same thing if I used SwitchHasAuthority, or a Run on Server event. No matter what I do, this code that is supposed to run only on the server is running on the client, and I can’t figure out why.

Ok, so it is working correctly and I was just reading it wrong. So is the fact that the yellow text was saying ‘Client - Simulating’ a bug in the editor?

I don’t know. When you changed the drop down from Dedicated Server to Client, was the IsDedicatedServer macro still sending true?

Can you show me what is in your IsDedicated Macro?

Thanks.

When I changed it, it stopped at the breakpoint and the yellow text read ‘Server - Simulating’

Here it is.

Thank you very much.

Thanks.

Yeah, it appears maybe your Blueprint window showed in yellow it was client when you had dedicated server selected.

My original answer stands so in the future when debugging on Blueprints, rely on the drop down and not the yellow text.

Nope, it’s doing it again. As you can see, Client 1 is selected, but it’s still stopping at that breakpoint.

IsServer:

HasAuthority:

Executes on Server Event: