Can you really only sort arrays in ascending order? Or is there other ways people get around this?
I have a 2D array with 7 rows:
and I want to sort so the highest score is at the top.. then I can print to the screen
For each Element
Append Text = Array(CurX,1) & Array(CurX,0)
*this will print TeamName and their score but in ascending order - meaning the lowest score will be at the top! And while this might be good for a golf game, it's not what I need.
I know I can do a For Loop and set it to loop backwards.. and that's how I got it to work.. but I can think of situations where I'd need this array sorted in descending order. Do I have to breakout my bubble or btree sort and convert it into C2?
Can't you use Sort and Reverse together?
https://www.dropbox.com/s/59hs3a7n8e030 ... .capx?dl=0
Develop games in your browser. Powerful, performant & highly capable.
TiAm That was what I was missing! thank you..
it's not that intuitive since it doesn't even mention a Sort order in the dialogue box.. and checking the manual it mentions ascending only.. strange to have it be a whole different Action.
A little bit cludgey.. but it'll work!
My guess would be that it (the for each element) has been designed to be used to to change values inside the array not based on the values of other cells, still a valid request IMO.
Aphrodite yeah, I'd like to see a Ascending/Descending dropdown added to the Action dialogue box...