ID:138845
 
Code:
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?

<code>Enter()</code> is when attempting to enter the contents, <code>Entered()</code> is when you have successfully entered the contents.
In response to Neimo
Thanks. It's always that little thing that ruins everything, know what I mean? >.<
In response to Shaoni
Although your original problem is apparently solved, you're not calling the default operation on the Dead_Grass/New() via ..()

I'm sure that could throw up some other miscellaneous problems, although it's possible that you could of re-written it elsewhere. If you're in doubt, you should probably ad it to the proc.
In response to El Wookie
I know I'm not calling the default, that's intended. :p So no problem there.