mob
enemy
proc
Wander() // This is going to be the proc where it walks around, or looks for the enemy.
while(src) // While we still exist
sleep(5) // Change this depending on how fast you want the enemy to move
for(var/mob/Player/M in oview(10)) // If there is a player around 10 spaces...
src.Target = M // It sets it to its target
break
if(src.Target) // If we have a target..
// var/mob/Player/
if(src.HP<Target.HP) // If our HP is less then the Players HP...
var/Rand = rand(1,10) // Picks a number from 1 to 10
if(Rand>=8) // It has a 80% chance to run away
step_away(src,Target) // Runs away from the Player..
sleep(1)
step_away(src,Target)
sleep(1)
step_away(src,Target)
else
step_towards(src,Target)
else // If not though...
step_towards(src,Target)
else // If there isnt a Target....
step_rand(src) // We step randomly...
Problem description:I tried on of my own, lots of demos, this one seems to be the best, the problem is that it doesnt accepts Target, i tried whit M but doesnt work... so im asking for a very simple chasing proc...