mob
Enemy
proc
triggerAI()
if(src.client)
return
else
while(1)
sleep(10)
if(behavior == "passive")
var/mob/player/A
while(A==null)
sleep(10)
for(var/mob/player/target in oview(6,src))
A = target
break
src.dir = pick(NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH, SOUTHWEST, WEST, NORTHWEST)
step_rand(src)
Problem description:
I am making an AI code where the mobs only move when a player enters their range, to save cpu.
The problem is that the movement of the npcs is not smooth or natural. The movement_state of icon isn't even showing up. The mob is "jumping" from one location to another as if it were just teleporting. I tried to change step_size values in step_rand (), but without success.
How to make mobs walk using his movement_state?
Thanks for help!