ID:262307
 
this code wont take the hp awway from any mobs

obj
bow
icon = 'items.dmi'
icon_state = "bow"
verb

Shoot()
var/obj/arrow/A = new(usr.loc)
walk(A,usr.dir,2)
sleep(100)
del(A)
obj/arrow
icon = 'items.dmi'
icon_state = "arrow"
density = 1
Bump(mob/M)
if(ismob(M))
var/arowdmg = rand(10,20)
M.HP -= arowdmg
usr << "you shot [M] for [arowdmg] damage"
del(src)
usr does not belong on Bump(). The arrow needs to have a var telling it who its owner is.

Lummox JR
In response to Lummox JR
so the problem is the

usr <<

part of it?
In response to SSj-Naimad
SSj-Naimad wrote:
so the problem is the

usr <<

part of it?

Uhhhh I would guess yes. Like Lummox Jr said, just make a reference variable to the bow O.o or maybe not *shrug* Im not good at the whole deal with usr not putting some places than others. The worst part is I read plenty of information to tell me why not to do it.

[EDIT]
Ah ha!, take a look http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/
That should explain a little somthing. LOL notice its by the Lummox Jr as well.
In response to SSj-Naimad
SSj-Naimad wrote:
so the problem is the

usr <<

part of it?

No, but it's a problem. Basically as long as you have problems like usr abuse in your code, it's difficult to correct real bugs, so it's much better to fix this now and then tackle the problem at hand.

Lummox JR
In response to Green Lime
thanks