How do i check for some one with the greatest variable within a list..?
EX:
var/list/people()
(lets just say everyone in the world is in this var...)
OR! use...
for(var/mob/M in world)
now i wanan check if the number of a variable is the highest and place them in order...
like..
world<<"123's Agility is [M.agiliy]"
world<<"2352's Agility is [M.agiliy]"
world<<"moomoo's Agility is [M.agiliy]"
Counting down from the person with the highest agility to the lowest...
I need this so i can make a turn based tactical game with whomever has the highest agility can move first. Any help how to do this?(Just need the part to find the highest number! :).)
ID:165218
![]() Feb 5 2007, 10:43 am
|
|
![]() Feb 5 2007, 11:38 am
|
|
You are probably looking for bubblesort and max().
|