• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Any easy method order integers?

Status
Not open for further replies.
Level 18
Joined
Jun 2, 2009
Messages
1,233
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:
Status
Not open for further replies.
Top