ID:139489
 
Code:
mob/verb/shoot()
var/icon/bullet = new('bullet.dmi')


Problem description:
meisters.dm:36:warning: bullet: variable defined but not used

Okay, I have made the bullet that's going to fire, but How do I use Move() and Bump() in order to fire the icon in the usr direction?

i know the code will look something like:
Bump() //Just basic idea, i know this isnt completely right
if(ismob)
del src



/*projectile is the object being fired, dir is the
direction of movement, delay is the amount of time it will
stay for before deleting itself (without bumping), and
mowner is used to prevent the user from being hurt by
their own projectile*/

proc
projectile(obj/projectile,var/dir,var/delay, var, var/mowner)
projectile.owner = mowner //This var is used to prevent the user getting hurt by their own projectile
sleep(1)
walk(projectile,dir)
sleep(delay)
del(projectile)


Here is my projectile coding. Use it if you wish. An example of how it is used:
obj
neutralpaintball
icon = 'Paintballs.dmi'
icon_state = "neutral"
density = 1
objtype = "pball"
Bump(A)
if(ismob(A))
var/mob/M = A
if(M.name != src.owner)
M.hp -= 1
if(M.hp < 1)
Death(M, src)
del(src)

mob/verb/Fire()
projectile(new/obj/neutralpaintball(usr.loc), usr.dir, 20, usr.name)
In response to SadKat Gaming
Thanks!