How do I perform series of sorting ?

0 Favourites
• 3 posts
• How can one impllement the idea of scoring in simple words?

Lets say that each player has:

Bob - 5 points in 10 seconds

Mike - 10 points in 5 seconds

John - 15 points in 15 seconds

how they can be arranged according to score numbers? And then adressed by name - for further sortings ?

First I thought of putting them into array, sorting and retrivieng back by iid .

Manual says:

[quote:80hspk9q]Sorts the order of elements on an axis in ascending order. Note that in multidimensional arrays this sorts based on the first element on the axis. For example sorting the X axis in a 2D array will sort the order of the columns based on the elements at Y co-ordinate 0, while preserving the contents of each column.

Does it mean that after first sorting they do not preserve corresponding times ?

thanks for help

p.s

I have seen the tut called "Asteroid clone in less than 100 events" that includes scoring, but sorry, no capx to strip what I wanted out of it.

• It sounds like the rows get sorted by the first element, so the y=0 element. I don't think sorting will mess up scores etc, as long as each player is on their own x, and y=0 is score, y=1 is the name, y=2 is always the time, y=3 is whatever else. As long as you sort by X axis, Score will be in order, and each score will still be in the same row as the player name and time.

• Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Funny enough, clicking on "reverse x, y, z" button produces unexpected results for me, and finally gets zeroes.

Width - 3, height - 4, depth - 4.

capx file

dropbox.com/s/swcpnsi8n13dw59/array2.capx?dl=0

initial table

dropbox.com/s/uoj8au7vl08u5h0/Screenshot%20-%2003.04.2015%20%2C%2021_39_38.png?dl=0