Download

Collection of arrays? Array of arrays/2D arrays?

I’ll skip right to it: I have a player-created array that I need to compare with a collection of arrays (which can become pretty big) to see which one of them it matches. My idea was to loop through all arrays looping through each element (and comparing) for each one. However this doesn’t seem possible currently, so it kinda halts my plan. So short of manually having it loop through each array (of what could be 10, 50, or 500 arrays) and making a massive tangle of wires, is there another way? What I basically need is just a collection of collections that I can go through to find a match for my player-input collection.

Is there currently a way to do something like this, or should I rethink the whole way I’m handling it?

I think its exactly where you should go for C++ with possible custom node exposed to BP.
If all you need is simple comparison if 2 arrays are exactly same, then make one single array that keeps checksums of all big array fields.
Generate that checksum each time you change something in array. But for doing that (calculating checksum) again C++ is best.

Try making macro that compares your elements. This can make your BP network less messy.

Ps. While blueprints are great for rapid prototyping this shows major drawback, we cannot easily share our blueprints.