Set array element: Help!

Hey, this drives me crazy. I guess I am missing something, but what?!
Can somehow tell me what I am doing wrong or different between the two of them ?
I just want to add some stuff in a structure (save system). That’s pretty much it.

Working:

NOT working:

It’s not the first time I am doing this, and I can provide more information if needed.
Thank you!

For this problem specifically, you just need to check the “Size to Fit” box on the SetArrayElem node. You’re trying to set an element that doesn’t exist, and the SetArrayElem node doesn’t create it.

But what you should actually be doing here is using the Add node instead of the SetArrayElem node. That way, you don’t need to care about the index or size of the array- you’re just adding elements to it.
image

1 Like

Omg, you are so right. Now I remember about that bloody “Size to Fit”. The worst thing is it’s a duplicate from a function made by Epic Games themselve in the Cropout project. I am working on this resolution issue from this morning (it’s 6.38 Pm here). And I managed to miss that one was checked, the other was not. Time to take a break.
Thanks again!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.