Download

How to read two Arrays at the same time?

Hey, everyone. I am trying to find a way to work with two arrays at the same time if it is possible. The top blueprint in the image is what I am trying to achieve but with arrays.

Thank you in advance for any and all insight!

Try the Get node and use the Array Index of the For Each Loop.

1 Like

It’s not clear what you’re doing here, because in the first picture you apparently have a structure containing a mole rat and timer. Whereas in the second pic, you have a structure containing two arrays?

It might make more sense to have a structure that is [ mole rat, timer ], and then make an array of them.

In any event, something like this:

image

1 Like

First. :eyes:

1 Like

More detail :clown_face:

okay-smile-faded

Ok, so the more detailed version is that I have a grid of 3 x 3 Rats.

The upper line of blueprints in my picture is the player affecting one Rat and its associated Timer Handle at a time. But if I wanted to affect the Top Horizontal Line of the grid at once then I could need to affect the Arrays that correspond with the said Rats.

Anyway, since my Arrays are created with the References/Structs queued in the same way(Mole Rat 1 Reference Array Index = Mole Rat 1 Timehandle Array Index) then your example should work.

I will get back to you with the results!

1 Like

So, it worked like a charm! Again, thank you, and best of luck!

1 Like