How to get the local (my player) player

So I have the third person example and I wanted to debug print a text to the screen when the game starts (beginplay) - I figured I could use the Is Locally Controller or Is Local XXX and then branch… and if so print.

However I get prints for all connected players and not just mine. why is this? and how can I avoid this - my usage would be checking for the ‘players’ player and wanting to attach something or perform an action on it.

Hey @xxsemb
Are you seeing this in editor? Is normal in editor see the prints of each client.

You may want to see a build.
Is the game based on a dedicated server or is a listener server?

Print string will print on all clients. Normal behavior. You need to go through the UI to print for a specific connection.

If I’m not mistaken you can just use the get player controller with index 0. It should return your local player’s controller since the client doesn’t know about other player controllers.

Couldn’t quite get your usage. Can you clarify on that and give a little more detail?

Note: The index on the GetPlayerController node is for Local Multiplayer Games. There are different functions for checking how many player controllers are created.

As others have stated the print string runs on all clients because all client’s trigger Event Begin Play. I believe you would see it all gets their own player controller by randomizing the print string Text.

I hope this helps. I might be rusty on blueprints since I have been developing a custom editor tool plugin for a while now.

more specifically BeginPlay runs on everyone.

there is no ‘mine’ even the server is a player. but if you mean the server you can use SwitchHasAuthority or IsServer

This is generally used for Single Player and COOP (split screen). There’s no way to guarantee the connection order. For example On initial game load the host is typically 0. While all other connections are indexed by On PostLogin order.

During server travel (map change) the index order can change. A connected player can be set to 0 while the host is 1.


Print strings are loaded to each screen regardless of what client called the print.
Player 1 will display Client 1: text to display
Player 2 will display Client 2: text to display
Server will display Server: text to display

A simple example is to set up an input that prints to string the Location vector of the client pressing the input.

This will print Client 1: x nnn.nn, y nnn.nn, z nnn.nn on every clients screen.

Regardless of using any level of flow control… switch has authority, is locally controlled, get local/network role, is server etc.

PrintString prints to ALL Screens.