Array not working

Hi
Can anyone tell me why my array is empty? I get only one fail message on screen. The array should have 20 objects in it. :frowning:

I connected the completed to the return node… doh! So the array fills up now. But all the objects are invalid.

Test1Ref is an invalid class, or you are nullifying the elements outside of those screenshots.

Thanks for the reply! Is there something i need to check withing the Test1Ref class itself? Its a child of a actor class that contains a bunch of variables using a struct. When i created the reference i choose it from the list. So the class exists. The function is getting called from the Widget. theres no other thing happening to it inbetween. Can it be im calling a game instance from a Widget? Can that cause problems?

Ah ah :stuck_out_tongue:

I found out.

You’re leaving your function at each loop!

Just make it so the Game Instance function returns the temporary array after the loop has “Completed” and not at each loop.

EDIT: I was starring at both images and was like “I know there is something wrong here, I just need to find out what”. And all of a sudden, yeah \o/

Thank you! :slight_smile: