mob
verb
Create_Planet(map as text)
if(src.planet==0)
var/obj/M=new(map,_x=50,_y=50,_z=1)
var/obj/Z=new/obj/planetr(src.loc)
Z.claimer=src.ckey
Z.inside=M
src.planet=1
else
src<<"You have already made a planet!"</
Code for using the inside variable:
obj
planetr
icon='ICONS.dmi'
icon_state="Planet_Red"
name="Planet"
density=1
verb/Visit()
set src in range(1)
if(src.claimer==usr.ckey)
usr.owner=1
usr.inplanet=1
usr.loc=locate(src.inside)
else
if(src.locked==0)
usr.loc=locate(src.inside)
usr.inplanet=1
else
usr<<"That planet has been locked by its owner."
Problem description: Whenever I try to visit the planet, I just go to an expanse of blank space, and my character is no where in sight. You're supposed to be on a whole new layer, and since every player makes their own planet, it can't be a set layer. So I'm trying to make it make a new one, and it won't let me go to it.
Notice how none of the forms of locate() take an object as an argument.