I just want to create a simple 2d array of integer, but I found that it is very difficult in blueprint.
I have heard we can make a struct contains a array of integer, and then I can make a array of that struct so that I can have a “2d array”.
However, I also found that there is a bug that we cannot set element of array in struct.
Does anybody give me advice on how to make 2d array in blueprint? Or I can only use 1d array to implement the 2d array?
And why the bug haven’t fixed?
I came across this old post, looking for a solution, and couldn’t get this calculation working, but it seems to work if you use:
index = (y position * number of rows in Y) + x position. So if we have a 4x4 grid, and we want to find the position at x=2, y=1, the index we want to look at is (1*4)+2.