Hi, I am trying to get multiple objects with the same tag and a I want to get it in a specific order. I am trying to order this objects in the editor, ordering it with names and ordering it in the herarchy of the editor, but it get them in an order that i dont want. Does anybody knows how “GetCreativeObjectsWithTag”, get the order of all the tagged objects and how to get it in the order i want?
I am not sure there is anything like this: not sure the running game even knows about the original order of objects in the editor.
In our maps we used an @editable
array
instead of tags for the situations where order was important.
yes i know, I usually do this, but it isnt scalable at the moment the number of elements i want to get are huge. I mean i want to get an array of arround 50 elements, so i thing making an editable array of 50 elements isnt the way to work. Furthermore the objects i am getting arent the same device. the have the same parent(vehicle_spawner_device), so i cast it in the parent (if i got it with @editable i had to get a single editable for each device that isnt factible neither). So i have it working with tags but the order is not the correct.
Getting all the objects and putting them in an array is the easy part
Putting them in order is the tricky part.
you need some way to order them by,
for example by distance to a point Then sort your array