Following UMG tutorial, encountering errors

I followed the UMG tutorial about scripting and displaying player conditions and I encountered an error where the UI meters wouldn’t change their size. Here are the screenshots:

The HUD BP:

&stc=1


The Graph function:

&stc=1


The mycharacter blueprint:

&stc=1

Hello,
You may have not set your variable “mycharacter”. Try to do a “get player character” / “cast to (name of your character blueprint)” and use this output instead of your reference.

I already have the “myCharacter” blueprint setup, but it doesn’t work?

&stc=1

Do you have the stamina bar appearing when you set precent to 1 instead of 0.0 ?

Edit : And are your stamina values ok in character ?

percent was set to 0, 0.5, and 1.0 and the bar still appears full and completely disappears when currentStamina reaches 0.

I haven’t played around with UMG too much but I remember from Tesla’s stream that the value has to be in percent (from 0 to 1) and your stamina is probably from 0 to 100? Just divide it by 100 before returning it in the Graph Function and it should work.

If your stamina goes down but not up back, Have you check that your “is sprinting” goes back to false after a run ? Maybe it stays “true” and you can’t regen.

Edit : If you add print string before both “set current stamina” with different text, you’ll see it.

Converting it to a percentage by dividing by 100 did the trick. Thanks!