ID:155139
 
I tried myself and still cant figure how to make 5 projectiles appear across and shoot in same direction.

                    var/obj/waterwave/A = new /obj/waterwave
if(src.dir == NORTH)
A.loc = locate(usr.x,usr.y,usr.z)
if(src.dir == SOUTH)
A.loc = locate(usr.x,usr.y,usr.z)
if(src.dir == EAST)
A.loc = locate(usr.x,usr.y,usr.z)
if(src.dir == WEST)
A.loc = locate(usr.x,usr.y,usr.z)
A.dir = usr.dir
A.name=usr.name
walk(A,usr.dir,2)
spawn(20)
del(A)

obj
waterwave
icon = 'Jutsu.dmi'
icon_state="Water"
You're creating them all under the user. Try using the x,y values to change where they appear (as was told to you in the other post you made)

Also, it's probably better to handle the deletion of the object in it's New() proc rather than in the verb itself.
In response to Lugia319
I have only got north and south to work but not east and west. I edit the x,y. East and west seem like it dont even get put in location i choose. Cant you just do x,y for me. It not right way but i know how it will be done when i return to multi projectiles.
In response to LexLuther
set A.dir before you use if() to check their direction. You're doing it backwards.
In response to LexLuther
switch(usr.dir)
if(NORTH)
A.loc = locate(src.x, src.y + 1, src.z)


A.loc = locate(get_step(usr,usr.dir))

Both bits of code do the exact same thing. They both set the location of a created object to the tile in front of them. The first uses your silly x,y,z system, the second uses (what I feel) a more efficient system of setting the location.

I suggest you expand the get_step() because of this one detail. You set the object's direction, but you never use it. You can still use the example I gave while setting the example (and I suggest you use A.dir instead of usr.dir).

The whole thing is, as was explained to you before. X and Y coordinates do what you think they do.

src.loc = locate(src.x + 2, src.y + 2, src.z)

It does exactly what you probably think it does.