How to create a matrix of floating text?

I have a square grid on the map and I need to make a (unique) floating value above each square.
I build my texts matrix in construction script using AddTextRenderComponent - that works fine.

The problem is that I am not able to change the text to a number of my choice. I tried the following code, but I got access none to SetText.

Any idea how to make this work?

This bit looks dodgy. You already have an array full of text render components. Seems like all you need is to set their text.

Thank you for the answer.
I tried this at first but I got an refference error:

Note the green arrow in my pic.

Aaa, sorry I misunderstood you - I tried it with the connected pin now, but the error is still there:

Thank a lot for all the answers - It was in deed in the array lengths - one was zero and second 189… :smiley: I will now have to figure out why…

We can’t see the end of the error message here. But my guess is that you do not have enough elements in the Temperature array.

Print the length of TempText and the length of Temperature arrays and see what they read. They should be equal.

Double check the math on adding the elements to Temperature - very likely to be the culprit.

How many elements are then when the loop Completes?

When you click the error message, it will take you to the offending bit of script. Hard to tell what’s going on as we can’t see it all.

Btw, next time you need to deal with a 2 or 3 dimensional array / matrix - have a look at this node:

Another example:

It can simplify logic and returns useful data.