Code:
projectile
parent_type = /obj
var
trail
damage = 0
owner
New(turf/t,owner,dir)
src.dir = dir
src.owner = owner
. = ..()
if(src.Move(t))
walk(src,dir)
Move()
var/atom/oldloc = src.loc
. = ..()
if(.)
src.Moved(oldloc)
proc/Moved(atom/oldloc)
if(src.trail&&oldloc)
new src.trail(oldloc)
Bump(atom/obstacle)
if(istype(obstacle,/mob/combatant))
var/mob/combatant/c = obstacle
c.TakeDamage(src.damage,src.owner)
del src
Problem description:
At the end it is saying if it hits (bumps) into something and if that something is a combatant then run a TakeDamage() process that is not in the example you give and it just passes the damage of the projectile(which from this code will always be 0) and who caused that damage (I guess so it can credit them with a kill if the damage inflicted results in the person being hit's death).