verb not working in Developer Help
|
|
ok whats wrong is that even when a human mob is beside the player it says the human mob isnt there so obviously im doing it wrong...heres the verb.
verb/bite() if(usr.attacking==0) var/list/L = new var/mob/Human/person/K if(K in oview(1)) for(K in oview(1)) L+=K var/mob/p = pick(L) if(p.dead==1) return spawn() src.attacking=1 flick("bite",src) var/k=rand(1,3) src.hp+=k src<<"<b>+[k]</b> hp" src.attacking=0 if(src.hp>src.mhp) src.hp=src.mhp spawn() p.attacking=1 flick("bite",p) p.hp-=rand(1,8) p.death() p.attacking=0 view(10,src)<<'bite.wav' else src<<"No humans in view!"
|
|
<code>var/mob/Human/person/K=locate() in oview(1) if(K) //...and so on</code>