ID:167778
 
I know this is easy stuff but I'm pretty stuck with a game that comes virtally Unplayable when the player dies and he has killed around 10 NPCs. They gang around you and kill you, then you start at the same point.

EDIT: I forgot - if you escape the ring, your already dead.

I didn't place 38 odd start points for no reason.
How did you made the relocation points? Did you placed objs on the map & when the games load, the locs are in a list? If so, use the pick() proc

pick(list) will pick a random value in the list
In response to GhostAnime
I just used the good ol' no error in-guide way.

Login()
usr.loc = locate(/turf/start)

mob
Login()
loc = locate(/turf/start)
..()

if(M.hp <= 0)
M.loc = locate(/turf/start)

I think thats it.
In response to RedlineM203
Gonna bump, this is unbearable. 2 Projects down because of one damn question.
In response to RedlineM203
loc = locate(/turf/start)

locate(o) finds the first instance of 'o', not a random 'o'. This generally means that locate(o) will return the 'o' which is the most Southwest on the map. You could make a list of all /turf/starts, and the use pick() to get a random one. Either compile the list in world.New(), or every time a player dies.

var/list/starting_turfs[]
world/New()
.=..()
starting_turfs = new /list()
for(var/turf/start/ST in world)
starting_turfs.Add(ST)
mob/Login()
.=..()
var/turf/start/random_start = pick(starting_turfs)
loc = random_start


Though this looks like it should work, there is one other problem. If a mob logs in at startup (ie, you run the program from Dream Seeker, or reboot with players in the world) Login() may try to access the list of starting_turfs before world/New() has a chance to populate it. In Login(), you could check if starting_turfs is null, and do random_start=locate(/turf/start) instead.
In response to IainPeregrine
Nice... that works alright. I'll look into the last bit too, although there is no problem yet.