mob/var/kill = list("")
mob/proc/move()
var/mob/M
while(src)
if(M in oview(5))
if(M.name in src.kill)
walk_to(src,M,1,4)
if(M in oview(4))
step_towards(src,M)
else
sleep(15)
step_rand(src)
break
else
for(M in view(src))
break
sleep(5)
spawn(2)
src.move()
Now heres my death verb that Im using in my game:
mob/proc/Death()
if(usr.hp <= 0)
if(!src.client)
view() << "\blue [src] was slain by [usr]"
usr.exp += src.exp
usr.gold += src.gold
usr.Level()
del(src)
else
view() << "\red [usr] was slain by [src]"
usr.loc = locate(/area/start)
usr.hp = usr.mhp
usr.mp = usr.mmp
Now finally hers a simple monster code i put in:
mob/spider
icon = 'monsters.dmi'
icon_state = "spider"
hp = 6
mhp = 6
mindam = 1
maxdam = 2
str = 1
def = 1
exp = 6
New()
.=..()
spawn(1)
move()
Bump(mob/M)
if(M.client)
monattack(M)
Now heres the question:
The move code i coded is suppposed to make mobs move around, and if attacked or if they spot someone who attacked them, they attack. However they dont. They just stand there. They dont die, either. And, yes, incase your wondering, i DID make it so that when a mob attacks the monster, they are added to its enemies list. SOmeone please tell me how to fix this. Thanks in advance(again)
-----Rein-----
Lummox JR