ID:141527
 
Code:
mob
verb
Meatball()
if(usr.Frozen)
return
if(usr.attacking)
return
if(usr.pk == 0)
return
if(!usr.inball)
if(usr.Chakra < 50)
usr<<"<font size = 1>Must have 50 chakra"
return
else
usr.Chakra -= 50
usr.overlays +='ball.dmi'
usr.density = 0
usr.Power = usr.Power * 1.14
usr.inball = 1


else
usr.overlays -= 'ball.dmi'
usr.density = 1
usr.Power = usr.Mpower
usr.inball=0


Problem description:

I wondering how i would make it so that if the person is in the meat ball, than whenever it is over another mob, they take damage. im stuck at the part at declaring what the mob is i tried mob in oview(0)) but it didint seem to work the way i wanted, any help?
Read this:

http://www.byond.com/members/ DreamMakers?command=view_post&post=37940

Also lookup the || operator.

What you probably want(if that jutsu is Nikudan Sensha) is to make the mob walk in it's direction and when it BUMPS a mob, subtract the health from it.
Agrey123 wrote:
im stuck at the part at declaring what the mob is i tried mob in oview(0)) but it didint seem to work the way i wanted, any help?

oview(0) doesn't make much sense, because oview() gets a list of the turfs surrounding the center (usr by default). Look up the view() proc in the DM Reference (F1 in Dream Maker).
In response to Kuraudo
oview(0)....well you could use
            for(var/mob/M in oview("range you want",usr))
if("name of projectile")
if(M.loc=="name of projectile".loc)

and then add in the rest for damaging afther if(M.loc == [...])
but if it's a ranged attack that moves Bump() makes more sence
In response to Kuraudo
Since oview(Ref,N) returns a list of atoms (obviously not just turfs) visible from/by Ref on a range of N tiles from it, you can see how it would actually make a bit of sense since looking for mobs in oview(Ref,0) will find mobs in the same tile as Ref (but not Ref itself [which view() would also find]). Just that there are of course flaws like the mob would need not to be dense for it to occupy the same space as other mobs and the code would need to be written right as well as run in the right time, etc, so that's not really the way to go about it.