I have a code that is supposed to make the Monster wander and if your in range, the monster is supposed to follow you...but it doesnt work so hopefully someone can help me!
This coding is in the mobs section!
mob/New()
if(wander) walk_rand(src)
..()
This coding is in the enemies section!
New()
.=..()
spawn()
Wander()
proc/Wander()
while(src)
if (P in oview(5))
step_towards(src,P)
else
step_rand(src)
for(P in view(src))
sleep(10)
sleep(5)
spawn(5)
Wander()
I'm not too good of a coder so I don't know whats wrong with it...Someone PLEASE help me!
ID:176455
Jan 12 2003, 9:56 am
|
|
Jan 12 2003, 9:59 am
|
|
First, P isn't defined. Second, oview() has two arguments, one of which defines to usr. You want to change that to src.
|