ID:178550
 
Ok, I have it so when the enemy's in oview 1 of you it attacks, and it sez the code is perfect, but nothing is happening, whats goin on?

if(P in oview(1))

step_towards(src,P)
for(P in oview(1))
Eattack()
break

Eattack(mob/M in oview(1))
var/mhitper=rand(1, src.dex)
var/dodgeper=rand(1,dex)
var/mdamage = rand(1,src.strength)
usr << "[M] attacks you!"
if (mhitper >= dodgeper)
usr << sound('hit.wav')
usr << "[mdamage] damage!"
HP -= mdamage
sleep 10
else
usr << sound('wooh.wav')
usr << "They miss!"
sleep 10
usr.Death()</<></<>