IsLocallyControlled()/GetLocalRole() == ROLE_AUTORITY and Play In Editor issues

So I’ve followed the Unreal Multiplayer quickstart tutorial (here: Multiplayer Programming Quick Start for Unreal Engine | Unreal Engine 5.1 Documentation) and I’ve got a small problem when running the final completed project using Play In Editor; when I shoot and hit one of the other players, I see both the client and the server messages across both Play in Editor windows. (This happens in both Listen Server and Client mode.)
If I run it in Standalone mode then it works correctly, however and I only see the messages I should. Is this a bug with the Play in Editor functionality or is this intentional?
(if it’s intentional, how should I adjust the code to correct for this?)

You need to uncheck run under once process in your project settings

You can then just play as client in PIE

2 Likes

Ah, I see. I didn’t notice that. Thanks!

Hi,

When I tried this I experience a lot of lag.

I wondered if it was because I was launching the game from Visual Studio, so, as a test, I ran it separately Unreal Engine.

If the player on the server runs around/fires, the client sees this normally, and the behaviour on the server player is also ok.

However, if I then take control in the client window, and run around/fire, its really laggy in the display on the server window.

This issue did resolve the GEngine messages problem, but has now, for me at least, created another.

Any thoughts/help would be welcomed.