Hello, basically i want to input different strings/values into my text box and have it remove any empty strings so that there are no spaces/gaps between the text. I tried to find different ways to go about the text but i feel like the format text should work I’m just not sure if its possible to remove the empty strings.
Btw its going to be using the different values from a data table i have so all the pins are going to be connected. i know how to do a check to see if its empty/null i just need to know how or if i can remove it from the format text node if it is empty or if i need to go about it another way.
Even though this is not on topic, do note you’re doing it all 60 per second, every frame, non-stop. Wouldn’t it be better to have 1 widget per line of text, neatly stacked in a vertical box and update it only once? You could collapse / style widgets at a whim, too… Rather than faffing around with strings, you could simply opt out out of showing specific widgets.
Just so i understand, i would basically have 1 text widget for each stat in a vertical box and then collapse the widget if its empty? That makes sense, i wasn’t sure about creating multiple widgets because i didn’t know how to remove the empty widgets and reorganize the widgets that were left.
But how do i update it once? i thought with my setup already it would get called once when its created. or am i supposed to do it when it in the event construct?
You’re using Get Text - I am assuming it’s widget property / function binding which executes once per frame:
I’d make 1 user widget per stat line. This way widgets can collapse themselves when they receive null text. Update it once (or whenever you desire) with a custom event call: