Hello everyone. Currently I am developing a tetris program and I am currently working on creating a grid of some sorts that will be able to detect complete rows of blocks. To do this I wanted to create a 2D array that acn represent the X and Y Coordinates of the grid but I don’t exactly know how. I looked around online and at the documentation but the methods I’ve tried out don’s really seem to work. Does anyone know the general structure to creating 2D arrays within UE 4.8?
If it doesn’t need to be dynamic you can just use a base C++ array, which I think would be good enough for tetris:
int MyArray[WidthX][WidthY];
or look here for dynamic arrays: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums.
Lower down on the page you have an example using an array of struct to do multi-dimensional arrays.
Ah I see. I thought using the regular syntax for multidimensional arrays was not applicable to UE4 but I guess I may have done something wrong. I think I may have put int instead of int32. Thanks for the help!