ID:168934
 
I don't know how to get a RANDOM variable from a list of variables. I just want it to select any variable in the list at random. How?
pick(list)
In response to Artekia
Wow. That simple? Thanks.

[edit] And(I'm not very good with lists >_>) how do I add a "type" to the list IN the coding, not in game?
In response to Hiddeknight
What exactly do you mean by "type".
In response to Artekia
Type path of a mob. As in /mob/thing.
In response to Hiddeknight
If it will help, i'm trying to make a turf with a list of enemies it can spawn. I'm having a few difficulties-when I go to make the type spawn, it doesn't recognize it as a type of object...
In response to Hiddeknight
You could try something like this:
var/list/Enemies=list("/mob/thing1","/mob/thing2","mob/thing3")
var/Enemy=pick(Enemies)
var/En=text2path(Enemy)
var/mob/E=new En

Untested
In response to Artekia
Seems to be OK. How do you get the very outside block on a screen? =/ I tried a for loop, selecting everything in view(14), then a check if it was in view(13), and skipping them if it was, but it didn't work.
In response to Hiddeknight
Something like this? Untested-
var/turf/T=locate(mob.x+X/*put however much you need to get past the mob's view*/,mob.y+X,mob.z)

Although that location could be null, and it only gives 1 turf, but you could get all the turfs with some more programming. Could be a more efficient way, but I'm not sure.
In response to Artekia
Alright, it's working, thanks for your help.