How to display array values in a get text widget

It would make sense to use a list view for that, seeing as it is a list.

Here’s a vid about that, because saying it’s not obvious is an understatement:

So I have a highscore widget ,this widget gets created when the timer reaches 0,I have an array of High Scores i would like to display those high scores neatly one after the other in the Text Block above,I dont know how to achieve this as its an array and not a single valued variable.

Thanks will give it a look

In case you get lost in the intricacies of the List View (not an easy thing to wrap one’s mind around), do tell. Perhaps a simple vertical box would be easier to work with.

a simple vertical box

As in, it could be as simple as:

  • have a widget with vertical box
  • when you want to update the list, loop through the array
  • create a widget (with a text block) for each entry, feed it data and add it to the vertical box

Which results in this:

335979-screenshot-1.png


The widget that represents the entry in the high score vertical box has a Text Block with a bound string variable - the var is flagged as Instance Editable and Exposed on Spawn - that’s why it can be seen on the Create Widget node.

2 Likes