Galedon95
(Galedon95)
March 23, 2021, 5:30pm
1
Hello,
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?
Thanks
Everynone
(Everynone)
March 23, 2021, 5:41pm
2
This bit looks dodgy. You already have an array full of text render components. Seems like all you need is to set their text.
Galedon95
(Galedon95)
March 23, 2021, 5:46pm
3
Thank you for the answer.
I tried this at first but I got an refference error:
Everynone
(Everynone)
March 23, 2021, 5:47pm
4
Note the green arrow in my pic.
Galedon95
(Galedon95)
March 23, 2021, 5:57pm
5
Aaa, sorry I misunderstood you - I tried it with the connected pin now, but the error is still there:
Galedon95
(Galedon95)
March 23, 2021, 7:12pm
6
Thank a lot for all the answers - It was in deed in the array lengths - one was zero and second 189… I will now have to figure out why…
Everynone
(Everynone)
March 23, 2021, 6:05pm
7
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.
Everynone
(Everynone)
March 23, 2021, 6:08pm
8
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?
Everynone
(Everynone)
March 23, 2021, 6:09pm
9
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.
Everynone
(Everynone)
March 23, 2021, 10:34pm
10