Damage on entered? (Big atom related) in Developer Help
|
|
Code:
obj/Skills/Dragon_Fire_Technique icon='Fire.dmi' icon_state="6" mouse_drag_pointer="6" layer=91 proc Tech(mob/M) set popup_menu = 0 src=M if(M.delay) M << "<small><small><small>Your hands cannot move that fast!" return if(M.cantshoot) return if(M.chakra<=50) M << "<small><small>You need more chakra." return M.delay=1 spawn(27) M.delay=0 view() << "<b>[M] shouts:</b> Dragon Fire!!" view() << 'FBullet.wav' var/damage = 2.7*M.nin M.chakra -= 50 M.cantmove = 1 var/obj/O = new O.layer = MOB_LAYER+4 if(src.dir==EAST) O.loc=locate(src.x+1,src.y-0.5,src.z) O.icon='Dragon2.dmi' O.icon_state="Dragon2" O.dir=EAST else if(src.dir==WEST) O.loc=locate(src.x-8,src.y-0.5,src.z) O.icon = 'Dragon2.dmi' O.icon_state="Dragon2" O.dir=WEST else if(src.dir==NORTH) O.loc=locate(src.x-0.5,src.y+1,src.z) O.icon='Dragon.dmi' O.icon_state="Dragon" O.dir=NORTH else if(src.dir==SOUTH) O.loc=locate(src.x-0.5,src.y-8,src.z) O.icon='Dragon.dmi' O.icon_state="Dragon" O.dir=SOUTH spawn() for(var/mob/MM in view(O)) if(MM!=src) if(O.Entered(MM)) MM.damage(damage, M) view(src) << "<small><small><small>[MM] was hit by [src]'s Dragon Fire Technique for [damage] damage!" flick("Hurt",MM) sleep(1) spawn(17) M.cantmove = 0 del(O)
|
Problem description:
When a mob is standing under (technique's layer is bigger then player's layer) the technique/big atom, they don't receive damage. Why is that?
|
I believe what you want instead is to loop in obounds(O) instead of view(O).