Actor Array are Randomized - how do I permanently fix the order

Hello again, I’m running into weird issue lately;
I currently have 8 spheres of same class - right now, they are just sphere - will be replaced with proper mesh eventually.

It used to work for many days, but in the midst of this week - I ran into the weird order issue

This is the one that should be the first in the array

And today, one that highlighted is now marked as first in the array. Two days ago, it was different one.

For the rest of week, order was correct. So it seems that order of this array are randomized for some reason.
Is there possible way to fix a number permanently?

Thanks.

https://streamable.com/6fwjo

By the way, here’s a video of a day that order actually worked.

if you want them to be in a specific order then you need to explicitly set them that way. basically you need to populate the array by hand. using something like the get all of class wont always get the actors in the same order. now if you just want them to be in the same order each time you access the array but they dont need to be in a specific order from the start then you could just promote the array to a variable after the get all of class. i know thats not explained well in that last sentence but the situation im trying to convey there is if you need the spheres to just be in a set order like 3 5 2 1 4 each time you get the array so they wont be jumping around each time versus the situation of 1 2 3 4 5.

It’s a classic GetAllOfSomething example ordering issue. :expressionless:

On top of what ThompsonN13 has mentioned about making an array by hand and plugging objects in 1 by 1, you also have the option to spawn the objects dynamically and add them to an array. This is not always desirable and depends on your workflow, of course. But it will guarantee the order.

You could also use numerical tags and sort it like that but it’s a bit fiddly.

And how well do you think this is going to work once you’ve packaged? How will this work with dynamically spawned actors?

It won’t. Cut corners where you can but indexing is not the place to do it. For the original example you can simply MakeArray and there’s your guaranteed order.

if you rename your actors 111 in the world outliner then alt click duplicate each actor you can get away with at least 99 instances that fill the array in order. if you need to do it with a different actor as well name that actor 222 and repeat. when playing in PIE the order should follow accurately. if you do not name them this way but just proceed to copy and paste instances it should still populate an array accurately in SIMULATION but not PIE.