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"

My Health Bar Progress Bar is blank?

I am trying to create a health bar. My health bar starts out gray instead of green as it should to indicate the health of the character—that the character has not died. My variables are both set to 100.0. How do I correct this issue? This is a link to a YouTube video that I used: https://www.youtube.com/watch?time_continue=340&v=qzcqmVcV9IQ

Product Version: UE 4.20
Tags:
more ▼

asked Apr 18 '19 at 10:03 PM in Using UE4

avatar image

Ace-Hand-7333
1 1 2

avatar image Nebula Games Inc Apr 18 '19 at 10:30 PM

Is that a binding or a function? Is there any place where you change max and current health? Did you default your progress bar to be filled from the start (if you did in the widget it should be filled green)?

avatar image Ace-Hand-7333 Apr 18 '19 at 10:34 PM

This is a binding. No I did not change max or current health. And how do you default you progress bar to be filled from the start?

avatar image Nebula Games Inc Apr 18 '19 at 10:37 PM

In the widget designer if you click on the progress bar and look for the "percent" value in the details panel you can increase or decrease it to values between 0 and 1. If your bar is colored in the widget designer then you are fine. Also, less likely this is your issue if it is a binding as I would imagine the binding would correct the value on the first frame regardless. But you can check and see.

avatar image Ace-Hand-7333 Apr 18 '19 at 10:47 PM

Ok I change the percent value from 0 to 1 but it still is gray when a click play.

avatar image Nebula Games Inc Apr 18 '19 at 10:49 PM

Sounds like either a bad reference or you are changing the value of current health somewhere and it isn't 100. Check the cast node on the binding see if it is failing or not. Print a string from the cast node "fail" pin and see if it prints or it succeeds.

avatar image Ace-Hand-7333 Apr 18 '19 at 10:54 PM

The string print when the player dies.

avatar image Nebula Games Inc Apr 18 '19 at 10:56 PM

So your cast works. Try hard coding a value in for the return value of the binding. Like just break the float going to it from health/max health and type in 0.5 into the binding see if it changes the progress bar. If that doesn't work there is something wrong with your binding, or you have a binding to the wrong progress bar or something like that.

avatar image Ace-Hand-7333 Apr 18 '19 at 11:02 PM

Tried hard coding it no change.

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

1 answer: sort voted first

Your binding is broken then. Try deleting it and recreating. See if you can hard code something in

more ▼

answered Apr 18 '19 at 11:48 PM

avatar image

Nebula Games Inc
5.4k 28 9 15

avatar image Ace-Hand-7333 Apr 19 '19 at 12:02 AM

Fix it. Thank you very much.

avatar image Nebula Games Inc Apr 19 '19 at 12:25 AM

Glad we fixed it. Stupid blueprints haha

(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