ID:166169
 
Right im creating a Tag game out of boredom how would i make a proc pick a random person to be the tagger if the old tagger logs out?
var/mob/it//Person who is it.
proc/Pick()
var/l[0]//Define a new list.
for(var/mob/M in world){if(M.client){l+=M}}//Add players to list.
it=pick(l)//Pick from list.


-Exophus
In response to Exophus (#1)
what would i define pick as?
In response to Rickoshay (#2)
Define pick..? It's a built-in proc which PICKs an element from a list. Use F1 to look it up in Dream Maker and it'll show you different ways to utilize it.

-Exophus
In response to Exophus (#3)
i changed pick[l] to pick(l) it seems to work
In response to Rickoshay (#4)
That's because I never even had pick[l]... Look at my post again. I had pick(l).

-Exophus
In response to Exophus (#5)
ahh yes my mistake