x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Make other team health Bar a different color

I'm trying to make a simple Multiplayer Team death match game and I want the one team to have a green color overhead health bar and the opposing team to have a red health bar.

I select my team alignment at the star of the game and spawn my players. But for client 1 (Red team) he sees a red health bar on the 2nd player who is on the green team, and client 2 (Green team) doesn't see any health bar on the 1st player.

I want the red team to have a red health bar and the green team to have a green health bar.

Game Game

alt text Event to change the players color.

alt text Call change color on widget depending on team selected

Product Version: UE 4.21
Tags:
ue4-help-18.png (1.4 MB)
ue4-help-19.png (367.6 kB)
ue4-help-20.png (400.8 kB)
more ▼

asked Mar 26 '19 at 09:07 PM in Using UE4

avatar image

JustNatBros
5 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Generally you should not involve server so authority over UI stuff because it's just waste of bandwidth, server should only replicate game state and events that is needed and client should formulate UI locally based on that data. So you should inform client on which team they are and then client should set the color based on that.

State is most impotent thing security wise, as potential hacker will hack UI regardless and they can determent team state by reading data from UI, so it's pointless to do any server authoritative actions over UI.

more ▼

answered Mar 26 '19 at 09:26 PM

avatar image

Shadowriver
35.7k 925 168 1104

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question