ID:149661
 
I used Nadrew's missile proc and when i use the fire button
the person who used it gets a minus 5 hit points and not the target
here is the code
mob/proc/Bullet(mob/M as mob in oview(3))
set hidden=1
M.overlays+=/obj/overlays/BulletStart
sleep(2)
M.overlays-=/obj/overlays/BulletStart
sleep(1)
missile(/obj/Bullet,usr,M.loc)
var/damage=usr.Strenght
M.overlays+=/obj/overlays/BulletEnd
sleep(2)
M.overlays-=/obj/overlays/BulletEnd
src.Hp-=damage
Deathcheck()
Stimpy wrote:
I used Nadrew's missile proc and when i use the fire button
the person who used it gets a minus 5 hit points and not the target
here is the code
mob/proc/Bullet(mob/M as mob in oview(3))
set hidden=1
M.overlays+=/obj/overlays/BulletStart
sleep(2)
M.overlays-=/obj/overlays/BulletStart
sleep(1)
missile(/obj/Bullet,usr,M.loc)
var/damage=usr.Strenght
M.overlays+=/obj/overlays/BulletEnd
sleep(2)
M.overlays-=/obj/overlays/BulletEnd
src.Hp-=damage
Deathcheck()

src.Hp-=damage
should be
M.Hp-=damage
Try this:
mob/proc/Bullet(mob/M as mob in oview(3))
set hidden=1
M.overlays+=/obj/overlays/BulletStart
sleep(2)
M.overlays-=/obj/overlays/BulletStart
sleep(1)
missile(/obj/Bullet,usr,M.loc)
var/damage=usr.Strenght
M.overlays+=/obj/overlays/BulletEnd
sleep(2)
M.overlays-=/obj/overlays/BulletEnd
M.Hp-=damage
Deathcheck()

There is a change.

-Kappa the Imp