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.
ID:167778
![]() Jan 30 2006, 5:34 am (Edited on Jan 30 2006, 7:41 am)
|
|
I just used the good ol' no error in-guide way.
Login() I think thats it. |
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[] 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. |
pick(list) will pick a random value in the list