ID:268796
 
How can you make someone randomly be located on the map when they log in?
mob
Login()
var/A = rand(1,maxx)
var/B = rand(1,maxy)
var/C = rand(1,maxz)
src.loc = locate(A,B,C)
..()



That is untested, but should work.
In response to N1ghtW1ng
N1ghtW1ng wrote:
> mob
> Login()
> var/A = rand(1,maxx)
> var/B = rand(1,maxy)
> var/C = rand(1,maxz)
> src.loc = locate(A,B,C)
> ..()

That is untested, but should work.

With the addition of "world." to the max variables, since they belong to world!


/Gazoot
In response to N1ghtW1ng
N1ghtW1ng wrote:
> mob
> Login()
> var/A = rand(1,maxx)
> var/B = rand(1,maxy)
> var/C = rand(1,maxz)
> src.loc = locate(A,B,C)
> ..()

That is untested, but should work.

I suggest making it shorter.
mob
Login()
src.loc=locate(rand(1,world.maxx),rand(1,world.maxy),z)//Change z to what ever map you want to appear on