Download

Widget hud text overwriting old text

Hi
I have a widget being used as a Hud. The problem is that it is putting ‘default’ text in the block and not clearing it when I write new text to it.
In my player BP I create a reference to the widget in the BeginPlay event…

Hud0.PNG

In the widget I have a text field to which I bind this function…


In my player BP for testing I just write to it with this…

Hud4.PNG

and the result at run time =

image_123588.png

OK I think that this might be a bug. After some testing I found that in the Widget if you use a variable that is not text then the default value cannot be erased and it appears on the screen. So for my test the variable was a NAME type and it defaulted to NONE. When I wrote to it you get the result as above. If I change it to a TEXT type I can delete the default and then the problem goes away.

Does anyone know how to write directly to a text variable without using a function in the widget. If I try write to it from a different Blueprint the text type appears as a text reference object and I have not figured out how to send text to it… any one know how?

With a regular text widget, you can bind the text to a variable from the designer. Check for the Bind button near the box where you would enter default text.

I had not noticed the list of properties there - thanks it works great :slight_smile:

Please i am currently having this problem still i have looked on many pages and i still cannot figure it out! ive tried all of this

Hey, I have the same problem. Everything worked fine and then suddenly it started overwriting old text instead of replacing it. I had hud_text as a string variable as well, but changing it to a text variable did not help.

Any Ideas?