gt
for(var/mob/M in List)
M.battler = src
M.cut = 1
M.overlays += M.weaponicon
icon_state = M.weaponstate
M.icon_state = "Stance"
var/first=M.stats["Spd"]
for(var/mob/O in List)
var/second=O.stats["Spd"]
if(first >= second)
times++
if(times == L.len)
List -=M
src.People.Remove(M)
src.People.Add(M)
times = 0
for(var/mob/M in List)
goto gt//YA DANG RIGHT I USED GOTO
Problem description:
Alright, so I'm trying to arrange the list People by Spd, and I had no clue how to do it, so I slapped this together. And it completely randomly arranges the people...lawlz I can't exactly figure out why...since I don't really have any clue of what kind of operators and equations would work here. Oh btw, I'm moving them from one list to another.
L = list being moved from
People = list being moved to in arranged by speed.
Does that all make sense? If not, just ask about it and I will explain whatever you don't get. (BTW factor is a variable all mobs in my game have.)