mob
var
NeedKey = ""
mob/verb/Follow2(mob/M in oview(7))
set name = "Follow"
set category = "Commands"
if(!M.key)
usr << "You can't follow an NPC!"
return 0
else
if(M.NeedKey == usr.key)
usr.nomove = 1
usr << "He's following you!"
else
usr.NeedKey = M.key
usr:Follow()
mob/verb/Stop_Follow()
set category = "Commands"
usr.NeedKey = ""
usr.nomove = 0
usr:Follow()
proc
Follow()
for(var/mob/M in oview(7))
if(usr.NeedKey == M.key)
step_to(usr.loc, M.loc)
else
..()
It gives me a runtime error that says:
runtime error: undefined proc or verb /turf/floor/Move().
proc name: Follow (/mob/proc/Follow)
source file: Life.dm,278
usr: Thief jack (/mob/PC/Guy)
src: Thief jack (/mob/PC/Guy)
call stack:
Thief jack (/mob/PC/Guy): Follow()
Thief jack (/mob/PC/Guy): Follow(Guest10101 (/mob/PC/Guy))
how can I fix this?
You're telling the user's location (the turf under him) to step to M's location. If you want to move the user to M, you want this: