[quote:aautvm8u]X axis indicates 'UID' of objects.
So do you actually store UIDs in the array or do you use UID as an index for X axis?
For example when you do Array Set At(5,0) to 99 - does it mean that UID of the 5th object's is 99, or does it mean that object with UID=5 has HP=99?
If you use UID as X-index and don't actually store it in the array, then you can't sort it!
If you do store UID in the array, you can swap columns 0 and 1 and sort, then swap them back.
Here is a demo:
dropbox.com/s/88wse8qyrr3ys ... .capx?dl=0
For other methods, see this post:
viewtopic.php?f=147&t=67745
Also, why do you need this array anyway? In C2 many things you normally would do with arrays, can be done much easier without them!
You can store all these values (HP, size etc) in instance variables. And then you can sort them any way you like using "System->For each (ordered)" and similar events.
Thank you but I think this is not what i meant.
For example, there is a list like this.
X axis(UID) / Y1(HP), Y2(DISTANCE), Y3(SIZE) ...
125 / 100,421,1024
84 / 125,552,512
62 / 625,126,256
If I sort X axis in this array, it should looks like this.
62 / 625,126,256
84 / 125,552,512
125 / 100,421,1024
And I would like to these kind of array sorting.
(Order by HP)
125 / 100,421,1024
84 / 125,552,512
62 / 625,126,256
(Order by DISTANCE)
62 / 625,126,256
125 / 100,421,1024
84 / 125,552,512
(Order by SIZE)
62 / 625,126,256
84 / 125,552,512
125 / 100,421,1024