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.
ID:274006
![]() Nov 27 2011, 7:45 am (Edited on Nov 27 2011, 9:58 am)
|
|
![]() Nov 27 2011, 1:23 pm
|
|
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 |