ID:274006
 
I'm trying to make some skills, I can make the skill walk but what can I do to know when this obj ( skill ) hits a mob?

This is what I did:

mob/verb/FireBall()
name="Fire Ball"
var/obj/skill/fire/Fireball/FB = new/obj/skill/fire/Fireball
FB .dir = usr.dir
if(FB.dir == SOUTH)
FB.loc = locate(usr.x-2,usr.y,usr.z)
if(FB.dir == NORTH)
FB.loc = locate(usr.x-2,usr.y-1,usr.z)
if(FB.dir == WEST)
FB.loc = locate(usr.x,usr.y-1,usr.z)
if(FB.dir == EAST)
FB.loc = locate(usr.x,usr.y-1,usr.z)
walk(FB,usr.dir)
sleep(9)
walk(FB,0)
del FB

If I did anything wrong, please, tell me ^^
And thanks for the help.
Look up the Bump() proc in the DM Reference. (Press F1 in Dream Maker.)
Making all those if statements will not allow you to hit people directly in-front of you. FB.loc=usr.loc should be the better approach.

And look into the Bump() proc if you wish to learn about making your fireball hitting a mob.
obj/Fireball
Bump(mob/M)
if(ismob(M))
world<<"[M] was hit!"
del src
In response to Kaigne
I did it because my Fireball icon is a big-fireball icon xD
So, if I use loc = usr.loc the icon will be strange o.o