Announcement

Collapse
No announcement yet.

Widget not displaying a health bar correctly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Widget not displaying a health bar correctly

    The slime health bar is supposed to be at 100% but is consistently on 0. i suspect that the widget is not referencing the slime properly any suggestions?

    #2
    Is slime correctly set in the widget? How are you setting it?
    Are the bar colors right?
    Have you tried with different "Slime Current HP" values?
    "I have harnessed the shadows that stride from world to world to sow death and madness."

    Comment


      #3
      The answer to all those questions is yes. I am convinced that no calls to the slime are working bar the it calling itself and through the map blueprints. do you know what could make this happen?

      Comment


        #4
        The most likely causes are:
        - the "Slime" variable in the widget is null
        - either "Current HP" and/or "Max HP" are somehow always 0 (which they are if Slime is null)

        That's why I'm asking: how and where are you setting "Slime".
        "I have harnessed the shadows that stride from world to world to sow death and madness."

        Comment


          #5
          Use Print String to print the "HPs" and the "slime" values in the Widget's Tick function.
          "I have harnessed the shadows that stride from world to world to sow death and madness."

          Comment


            #6
            EvilCleric is on point. Where are you setting the slime var in the widget to the slime actor in the world? add an isValid? node in your get percent. On isValid print string valid and on is not valid print string not valid. You will narrow down the problem.

            Comment


              #7
              will do thanks guys

              Comment


                #8
                Okay i did it and it is not valid, i am calling the Character not the actor in the world.

                Comment


                  #9
                  Problem solved thanks guys

                  Comment

                  Working...
                  X