turf
Basic
Dead_Grass
text="<font color=#666633>."
New()
var/variation=pick(".",",","'","`","´")
text="<font color=#666633>[variation]"
Entered(mob/M)
if(istype(M,/mob/))
if(!M.client)
return 0
mob
Hostile
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/P)
while(src)
if(P in oview(3))
if(P.client)
step_towards(src,P)
sleep(7)
else
step_rand(src)
sleep(5)
for(P in oview(3))
if(P.client)
break
sleep(5)
spawn(5)
Wander()
Bump(mob/M)
if(ismob(M))
if(M.client)
Fight(M)
else
return
else
return
proc/Fight()
for(var/mob/E in get_step(usr,usr.dir))
if(ismob(E))
if(src.canatk)
src.canatk=0
var/damage=round(rand(src.strength,src.strength*2))
if(damage==0||damage<=0)
E<<"The enemy's attack missed"
return
E<<output("The [src] [src.attacktext] you with its [src.weapon] for [damage] damage!","output1")
E.health-=damage
spawn(7.5) src.canatk=1
E.playerdeath(src)
Problem description:
I've tried to make all mobs with the Hostile AI (Parent type) unable to cross over dead grass, but it's not working. I'm sure my problem is really simple, but my brain has malfunctioned and I am in dire need of advice. Anybody know what's going on?