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"

HUD Progress Bar Change Colour as it progresses

I would like it to start off red and as it progresses to slowly change colour so that it is green at the end. This is done in blueprints.

Product Version: UE 4.8
Tags:
more ▼

asked Jul 21 '15 at 10:58 AM in Using UE4

avatar image

mstevenskeane
26 5 7 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi!

You can bind a color blending to Fill Color and Opacity of progress bar element

alt text

alt text

And when you set a progress bar percent (0.0 - 1.0), you get a color change.

alt text

colorprog01.png (24.5 kB)
colorprog02.png (139.7 kB)
colorprog03.png (70.8 kB)
more ▼

answered Jul 21 '15 at 11:39 AM

avatar image

svv3dUDN
8.4k 254 42 399

avatar image mstevenskeane Jul 21 '15 at 11:43 AM

Would there be any way to have a third colour, eg it goes Red at 0%, Green at 50% and 100% is blue

avatar image MrGrr Jul 21 '15 at 11:48 AM

Sure, just use a compare float and setup another fade. compare float Percent with 50, if less than 50, fade between red and green, if equal or greater than 50 fade to blue instead. is just two sets of the above pretty much with a few tweaks.

avatar image BluAstronaut Mar 10 '19 at 06:55 AM

Hey guys how do i get that ‘percent’ variable

It would really help

avatar image Nebula Games Inc Mar 10 '19 at 10:06 PM

Your progress bar has the percent built in. Drag out a reference to the progress bar and search for "percent" it should come right up.

avatar image mstevenskeane Jul 21 '15 at 11:53 AM

Why doesnt this work alt text

test.png (88.2 kB)
avatar image mstevenskeane Jul 21 '15 at 11:59 AM

never mind i fixed it, could you show me an example of the 3 colour

avatar image MrGrr Jul 21 '15 at 12:18 PM

Roughly this. tweak to suit. alt text

avatar image iMario.Official Jun 20 '18 at 03:24 AM

Hey I'm wondering why you did the X2 for the upper Lerp? Someone pls explain! Thanks

avatar image BluAstronaut Mar 10 '19 at 06:55 AM

Hey guys how do i get that ‘percent’ variable

avatar image edsantana Oct 20 '15 at 03:17 PM

What did you do to make it work pal ?

avatar image svv3dUDN Jul 21 '15 at 12:16 PM

alt text

colorprog04.png (167.6 kB)
avatar image mstevenskeane Jul 21 '15 at 12:19 PM

Thanks again

avatar image MrHonsel Jan 15 '17 at 10:29 PM

Thank you sir!

avatar image samnater Oct 16 '16 at 01:08 PM

Thank you so much! This is exactly what I was looking for

avatar image Knight9871 Mar 16 '17 at 03:32 PM

hey guys this no longer works, it just crashs the game and makes my headphones make weird sounds

avatar image ShadowTheAssassin Apr 25 '17 at 04:08 PM

Uhhh how do I get the "(Target percentage)" Node?

Knight: That is probably a personal issue with your computer, not the engine/code.

avatar image MoragtheWizard Jun 29 '17 at 05:25 PM

Get your Health percentage variable, then drag off it and select "Get percent" as a float. You have to uncheck context sensitive.

avatar image Dani0464 Jul 21 '17 at 08:51 AM

It works ! Thank you !

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

for some reason it wont bind the function to it so nothing works. maybe on a new verson idk??

more ▼

answered Jul 12 '18 at 03:52 AM

avatar image

Just Mason
1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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