I wonder how to make a Billboard Component visible for a certain part of the players connected to the same session?

Hi everyone,

I’ve been thinking for 2 to 3 months now on how could I make a Billboard Component (included in my main character’s BP) visible for a specific part of all the players in the session.

Here’s the context: my game is based with two teams, and both of these teams have five available character classes, such as a medic who’s gonna heal the team, the engineer who is gonna be working to complete team’s objectives, ect… and for the medic class for exemple, I would like to make a billboard component visible above the low-hp players to indicate to the medics that these players needs to be healed, but to keep a good overall visibility, I don’t want this billboard to be visible for any other player of this team (as long as they are not medics), and of course, not visible either for the players of the enemy team.

I can’t figure out how to do it right, so if any of you have an idea to give me a starting point, I would really appreciate it.

Have a good day, and good luck for your own projects :wink:

1 Like

Send info about all players to server. Like class and HP etc, you need to do it anyway for tracking any damage done.

Then from local side attach actor with just billboard component to each non local player (in your team). And display information.

You do not replicate those billboard actors, you replicate only information required.

Furthermore I wouldn’t use the billboard but UMG Widgets instead.
With these you could also show health bars or something more complex than only a simple icon.

I’m gonna be using a UMG to display more precise informations, so I would still keep a fast way to indicate the teamates’s requests.

Could you please explain more precisely how would you proceed ?

Your explanation looks pretty similar to what I was thinking, but I still can’t imagine properly how to do it.

Short version:

  • watch some tutorials about creating UMG widgets
  • when ready make your own widget (just widget not whole HUD)
  • now you have choice: make widget inside hud (screenspace) or attach it to player character (worldspace)
  • make dispatcher in some multiplayer friendly blueprint like game state/ player state. Fire it up with info you want send to widgets
  • in widget hook to dispatcher, read info and update whatever you use to display it inside
  • then make sure info is replicated/sent to game blueprint.

PS.
You need be careful with who can see those widgets in multiplayer game, because floating widgets will reveal location of other players. And having multiple dispatchers (one per player) is not optimal, then having one for all of them can be hacked clientside. I do not know how to solve such thingy.

Thanks, I think I understood the main ideas behind your message, gonna work around that and try my best to make this work properly.

This system would be easily hackable but using a RPC to check from server if each player should be able to make it visible before wouldn’t, on paper, make it safe ?

Nothing clientside is unhackable.

Thinking of it:

  • replicate to client array of players that are visible to client, and only that.
  • make client get that array and show widgets in corresponding spots to visible players.

I think this should work. And no dispatcher needed, its enough if client reads that array just like in singleplayer game.

I managed to get this, which seems to be working, and which looks pretty safe (in my opinion).

If you’re interested, here’s what I did:


One more time, much thanks for your help, and have a good day.