• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Solved] Any easy method order integers?

Level 17
Joined
Jun 2, 2009
Messages
1,143
Let's say you have 6 or more integers. And you have to order them every minute.
How would you do this?

You have a 6 units with 15 23 41 32 14 26 values.
You have to order them BY THEIR VALUES.

How can you tell the game "hey number 41 hello. 14, 15, 23 and 26 greater than you. I will kill you after 14, 15 and 23.

--- Extra details if you need ---

Hero 1: 10 Strength
Hero 2: 20 Strength
Hero 3: 30 Strength
Hero 4: 40 Strength
Hero 5: 50 Strength
Hero 6: 60 Strength

I will pick all of these units and i will tell the game "hey warcraft, can you kill all of them BUT according to their strength attribute.
First kill Hero 6 because it has 60. Then kill the 50, then 40, then 30, then 20 and 10.

---------------
 
Last edited:
Level 20
Joined
Feb 27, 2019
Messages
593
What do you mean? An integer cant be ordered. An integer is a whole number, f.e. 1, 50, or 3. Do you mean how to sort the integers in some kind of order?
 
Top