ID:1092347
 
(See the best response by Jemai1.)
Code:


Problem description:

I'm trying to get a NPC to walk to a certain coordinates with the Move() proc can someone give me an example? if it's possible.

I mean as in walking towards the location not actually teleporting there.
Best response
You can use walk_to or a step_to loop. For getting the turf through coordinates, use locate.
nevermind i figured it out
npc_travel(mob/A, B, Q, Lag)
{
while(A.Flying_Target)
{
Lag = (7 - A.flyspeed.cur)
if(A.x == B && A.y == Q)
{
mb_msgout("You have arrived to your destination!", A)
mb_msgout("[A.name] has arrived!", oview(0, A))
walk(A,0)
A.Flying_Target = 0
A.Moving = 0
parser.Parse("fly", A)
break
}
A.Move(get_step(A,a_get_dir(A,locate(B,Q,A.z))), a_get_dir(A,locate(B,Q,A.z)))
sleep(Lag)
}
}