mob
verb
direction()
set src in view()
var/a = get_dir(src,/turf/water)
usr << "[a]"
Problem description:
the code is my attempt to try to understand the get_dir statement. from my understanding of get_dir is that it tells me the direction of the first loc to the second loc. so here i have src in the first loc and water turf in the second loc. what i am trying to do is get some output when mob is walking towards the water. however, all that is outputted is "0"
verb
direction()
set src in view()
var/a = get_dist(src,/turf/water)
usr << "[a]"
the get_dist statement is returning a value of 127 even though the mob is standing next to the water tile
One way is:
Though this isn't good if you have more than one /turf/water.