Find if a mob is standing on a certain turf? in Developer Help
|
|
I can't seem to find a simple way to do this. I do have a method but it seems to be overly wasteful of processing time...
var/Grass = 0 for(var/turf/Grass/T in world) if(T.x==src.x && T.y==src.y && T.z==src.z) Grass = 1
if(Grass) usr << "You are stood on Grass!"
|
There must be a better way than that? I thought using 'src.loc', but my attempts at getting it to work didnt result in much success.
Anyone done something like this for themselves and wouldnt mind throwing in some input. Thanks.
|