ID:156367
 
area
grasslands
var
Location = "grasslands"



wondering how you would put the Location info into your stats as
stat("Location: [Location]")


or if you cant do that then giving an obj a location var?
turf
grass
grass1
icon = 'grass.dmi'
icon_state = "grass1"
Location = "grasslands"
var
Location = ""
Check the player's area or turf that they're on and display it's location var by setting a var for that player to their location's location var
In response to Yurokei
o.O that confused me XD sorry >.< can you show me an example? or my code with what your talking about
In response to Kakashi153
The location of an atom (a type which encompasses areas, turfs, objs, and mobs) is stored in the loc variable.

You can use the . operator to access members of an object instance. For example, X.loc accesses the loc of X.

The location of a mob is generally a turf. The location of a turf is the area it belongs to.
In response to Garthor
Use areas to swap peoples locations.

area

Locations

Entered()
usr.location=src.name

Mainland
Desert
Frozen_Tundra


In response to Evi of au
Don't use usr in procs. The proper way to do what you are trying to do is:

Entered(var/mob/M)
if(ismob(M))
M.location = src.name
In response to Garthor
Damnit I know this too...
In response to Evi of au
mob/var/Location="None"

area
grasslands
Enter(A)
if(usr.client)
usr.Location = "grasslands"

stat("Location: [Location]")


Or as you also listed...
mob/var/Location="None"

turf
grass
grass1
icon = 'grass.dmi'
icon_state = "grass1"
Enter(A)
if(usr.client)
usr.Location = "grasslands"


Oh, and btw. Did this on my iPod 4G. I think I deserve a BIG thanks?

And if it has errors tell me. I'll compile it myself and fix it up.
In response to Kingmasherr
Don't use usr in procs. Especially movement procs such as Enter(). You should be using the procedure's argument (which, of course, you wrote in and then never used).

You also shouldn't be using Enter() here at all, but Entered() instead.

You also just plain don't need to do this at all, because you can just look at loc.loc whenever you feel like it. Like so:

mob
Stat()
var/area/A = loc.loc
if(istype(A))
stat("Location: [A.name]")