ID:155477
 
Hi all, im trying to only allow a verb if the usr is facing it and one block away. this is what I have so far and I cant get it to work:

        verb/Pick_Up_Axe()
for (src in get_step(src,usr.dir))
object_check()
Replace for with if.

If you are trying to make it so the verb appears when the person is directly in front of the item, as far as I can recall, that is not possible. But you can do this:
set src in oview(1)   //  oview() excludes the center while view() does not
In response to GhostAnime
I know of that way. but im pretty sure there must be a way to use a verb only if that object is in front of you. I don't mind the verb being permanent. I just don't want to be able to activate it while my back is facing the object.
In response to Saladon
Saladon wrote:
I know of that way. but im pretty sure there must be a way to use a verb only if that object is in front of you. I don't mind the verb being permanent. I just don't want to be able to activate it while my back is facing the object.


mob/verb/blah()
var/D = get_dir(usr,src)
if(usr.dir == D)
..() // Insert the rest of your verb here.


That will only allow the verb to run if get_dir = usr.dir(the usr of the verb being you, src is the mob the verb belongs to). Like ghost said, this will still show up, but it won't work unless your facing it. Hope that helps.
In response to Jotdaniel
Thanks alot. that helps alot