how do i make my monster call this proc in order for the ai to start working?
mob
monsters
skeleton
icon = 'bettershitskele.dmi'
HP = 50
Max_HP = 50
strength = 7
defence = 3
exp_give = 50
Level = 1
attacked = 0
mob
monsters/proc
ai_walk_to(var/mob/M)
if(M.client)
return 0
else
for(src.client in oview(5,M))
if(src.client)
if(get_dist(M,src) <= 5)//within 5 tiles
walk_to(M,src,1,5)//walk to the player
ai_check_dist(M,src)//checks distance
break//stops the loop
else
continue
else
continue
ID:147400
Jun 12 2004, 6:31 am
|
|
In response to Rifthaven
|
|
thank you so much rifthaven i owe you big time
|
mob
monsters
skeleton
icon = 'bettershitskele.dmi'
HP = 50
Max_HP = 50
strength = 7
defence = 3
exp_give = 50
Level = 1
attacked = 0
New()
..()
startAI()
mob/proc/startAI()
var/gottarget = 0
for(var/mob/M in oview(5))
if(gottarget == 0)
if(M.client)
gottarget = 1
ai_walk_to(M)
spawn(1) startAI()
mob
proc
ai_walk_to(mob/M)
if(M.client)
if(get_dist(src,M) <= 5)
walk_to(src,M,1,5)
Hope it helps.