ID:179175
 
i cant figure out how to get the "dir var" thing to work. the one that returns the direction that the src is facing. i am trying to make it create something in front of the usr, so if anyone could explain to me how to use the "dir var" correctly it would help.thx
Loduwijk wrote:
i cant figure out how to get the "dir var" thing to work. the one that returns the direction that the src is facing. i am trying to make it create something in front of the usr, so if anyone could explain to me how to use the "dir var" correctly it would help.thx

To find the turf in front of the usr you'd do this:
var/turf/T=get_step(usr,usr.dir)

There is a slight problem here, however: T may be null, or it may be dense (like a wall), or there could be other problems with putting something there. So once you get that turf, you need to start handling all those special cases.

Other than that, that's about all you need to worry about.

Lummox JR