Accessing Float From Blueprint and adding it to widget text
I want to have a percentage next to the pitcher to show the percentage of the thirst I have set up the floats in my character and make the widget and added the bind on the text and in blueprint converted float to text but it doesnt seem to work. im trying to achieve a image with the percent next to it and get that percent from the my character.
asked Dec 26 '15 at 11:01 AM in Blueprint Scripting
The variable "MyCharacter" in your widget is private - do you set this variable anywhere? Because if not, than you'd always be reading the thirst level of a non-existing character, which will result in 0.
Also I would recommend you use a float value of 0 .. 1 instead of 0 .. 100. This is easier to do math with, and there is a built-in function "AsPercent", which you can use to convert a float percentage value to a number (e.g. 0.35 -> 35%).
answered Dec 26 '15 at 12:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here