Moves()
while(src)
if(client)
if(ai!=1) return
var/location=src.loc
var/atk=0
if(!usr) return
sleep(5)
if(!usr) return
if(usr.target)
step_to(usr,usr.target,1)
if(get_dist(usr,usr.target)<=5)
usr.target=null
else
for(var/mob/M in view())
if(M.clan!=src.clan)
step_towards(src,M)
for(var/mob/M in view(1))
sleep(1)
if(M.clan!=src.clan)
atk=1
step_towards(src,M)
AttackB()
if(location==src.loc&&!atk)
step_rand(src)
continue
Problem description:
Edit:step_to(usr,usr.target,1)
for some reason he the usr freezes and doesnt move when i set the target to a mob in the world. Anyone know what I am doing wrong?
since you used