Download

Changing Progress Bar percent

Screenshot_1.png

The Progress Bar’s percent is suppose to represent the value of the player’s current stamina, but when I play it’s just empty (0%).

a5e188e7540b02bb3bd57b94b2bc9f4ac3351884.png

The PlayerRef is referencing BP_Player which contains the variable stamina (ranges from 0 to 100).

And the value of Stamina is being set to something other than 0?

Starts at 100, decreases if the player is running or jumping and regenerates over time.

Are you setting PlayerRef to the specific instance of your player in your beginplay event? Otherwise your variable will be coming back null.

Have you tried debugging it with a Print String node?
Try printing the stamina value in addition to setting the percentage to that value.
If it’s correct, test both references in the same fashion.

there is great node for you: “map in range clamped”

Forgot to cast to BP_Player :rolleyes:

bde0358727f6df1b6481ac0a041e216b48bb6d1d.png

It works now, thanks for the comments :slight_smile: