ID:267695
 
Well, Crispy suggested I use get_step() for my NPC problems, and I'm pretty sure that's what I need.. But I don't understand how to use it.. When I used the help thingy when you press F1 in DM, it didn't.. Really help me.. I dunno what I'm supposed to fill in the (). The direction? The target? It said it should be something like this get_step(ref,dir).. I'm guessing dir means the direction you're facing when you wanna talk to them.. But what if I want it so as long as I'm looking in their direction 1 step away from then I talk to them.. And I'm clueless as to what the ref means.. Thanks for any help.

I thought I'd post the code I'm trying to do, if it might help:

mob/npc/DungeonGirl
icon = 'DungeonGirl.dmi'
icon_state = "DungeonGirl"
verb/Talk()
set src in get_step(mob/npc/north) ?!?!?!?!?
set hidden = 1
usr << "Be careful. There're monsters down there. Make sure you're equipped."
If you don't know how to use a procedure or anything like that, refer to the Reference when you press F1. Look up get_step(). I'm bored right now so I'm just going to give you an example.


var/obj/projectile/A = new(get_step(src,src.dir))
// this creates a projectile in front of you
walk(A,A.dir,1) // walks it at its top speed


verb/Talk()
set src in get_step(mob/npc/north) ?!?!?!?!?

Using "set src in get_step(anything)" isn't acceptable because set src has specific limitations for what you can do. In the DM reference under verb/set/src it says this:

http://www.byond.com/docs/ref/info.html#/verb/set/src

Mentioning that the List in "set src in List" or "set src = List" must be one of the following:
view(), oview(), world, world.contents, usr, usr.contents, or usr.loc

Its one of the limitations of using verbs, which is why I try to avoid them in favor of other methods.