Sverkerman
Hosted Project: BoW
- Joined
- Feb 28, 2010
- Messages
- 1,325
Hello and thank you for reading my thread!
I am making a trigger that displays damage dealt by players 1-8 starting with the player that has dealt the highest damage and ending with the player that dealt the lowest damage.
int1[] = Integer variable with array that holds random numbers in array 1-8. The goal is to sort this integer variable into holding the highest number in int1[1] and the lowest number in int1[8]
Then I can do:
For each integer loop 1-8 do actions:
Display int1(integer loop)
My question is:
- How do I sort int1[] into int[1]>int[2]>int[3]>int[4]>int[5]>int[6]>int[7]>int[8] ?
Hints:
- The numbers that the system will sort (that int1[] holds) will range from 0-100 000.
- I am looking for readability>memory usage (I'm not great with code, I don't know Vjass or JASS.)
- I am very greatful for GUI answers.
To summarize:
1) Put random numbers into int[1], int[2], int[3], int[4], int[5], int[6], int[7], int[8] (damage dealt by players.)
2) Run the trigger.
3) Now the trigger has sorted the numbers into int[1]>int[2]>int[3]>int[4]>int[5]>int[6]>int[7]>int[8]
+4 rep to anyone helping me solve this!
Thank you for reading. Here is a picture of a kitten for extra request power!
I am making a trigger that displays damage dealt by players 1-8 starting with the player that has dealt the highest damage and ending with the player that dealt the lowest damage.
int1[] = Integer variable with array that holds random numbers in array 1-8. The goal is to sort this integer variable into holding the highest number in int1[1] and the lowest number in int1[8]
Then I can do:
For each integer loop 1-8 do actions:
Display int1(integer loop)
My question is:
- How do I sort int1[] into int[1]>int[2]>int[3]>int[4]>int[5]>int[6]>int[7]>int[8] ?
Hints:
- The numbers that the system will sort (that int1[] holds) will range from 0-100 000.
- I am looking for readability>memory usage (I'm not great with code, I don't know Vjass or JASS.)
- I am very greatful for GUI answers.
To summarize:
1) Put random numbers into int[1], int[2], int[3], int[4], int[5], int[6], int[7], int[8] (damage dealt by players.)
2) Run the trigger.
3) Now the trigger has sorted the numbers into int[1]>int[2]>int[3]>int[4]>int[5]>int[6]>int[7]>int[8]
+4 rep to anyone helping me solve this!
Thank you for reading. Here is a picture of a kitten for extra request power!
