How do I get a debug message to show on only one screen in a multiplayer game?

I am making a multiplayer game running off a dedicated server and everytime I use: “GEngine->AddOnScreenDebugMessage(-1, 300.f, FColor::Blue, TEXT(“Message”));”, it shows up on every player’s screen on the server. How can I get it to only show up on one Player screen?

For example, I would like to have each player to get a debug message saying which team they are on and only that screen can see it.

Also I’m only using 4.4.3



If you do this in your character class:

   //print your debug message

It will only show on the local owning player of the character in which you call this function



This didn’t work for me. All the messages showed up on all of the players still. I did use this right:
if (IsLocallyControlled()){
GEngine->AddOnScreenDebugMessage(-1, 300.f, FColor::Blue, TEXT(“Blue”));

The engine itself doesn’t have an option for local or owner based debug messages; looking through the API there is a variable called: “bEnableOnScreenDebugMessagesDisplay” which may help.

What I would do is create a HUD element specifically for your own debug messages, then send them to whichever player you want, with whatever font you want. It may be a little less simple than that though as I haven’t touched HUD yet.

1 Like