ID:895104
 
Keywords: mob, obj, strength
(See the best response by NNAAAAHH.)
    Energyball
icon='combomoves.dmi'
icon_state="energyball"
density = 1
Bump(B)
if(ismob(B))
var/mob/M =B
if(M == usr)
return
var/damage = 10
src<<"You attack [M]for [damage] damage!"
M<<"[src] attacks you for [damage] damage!"
M.hp -= damage
for(var/mob/Q in view(0))
step_away(M,src,Q.Strength,0)
world<< Q.Strength
del src
if(M.hp <= 0)
usr.UpdateScores()
M.icon = 'characters.dmi'
M.icon_state = "obserber"
M.P1sjoined = FALSE
M.P2sjoined = FALSE
M.Move(locate(1,10,1))
del src
world.reboot()


Problem description: So I tried a couple ways to refer to the mob creating the energy ball. I'd like to see multiple detailed ways of doing this if possible. I learn better myself from examples similar to the way I already write my code. I'm thinking one of the only ways to do this is to override new() so I'd like to see some examples.

Best response
You COULD make a variable for the objects to signify the owner of the obj, then simply make the variable reference the mob in the verb used to make said object.
My problem is involving procs and not verbs.
In response to Ncju
Procs and verbs are essentially the same thing, only procs can't be called directly by typing or clicking a verb.

What he said:
obj/bullet
var mob/owner

mob/verb/shoot()
var obj/bullet/b = new (loc)
b.owner = src


What you could also do:
//  Arguments passed for 'new type()' are passed to the newly-
// created object's New() proc, which you can override
// to give additional arguments to it
obj/bullet
var mob/owner
New(new_loc, new_owner)
owner = new_owner

mob/verb/shoot()
new /obj/bullet (loc, src)