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"
ID:155139
![]() Sep 4 2011, 4:52 pm
|
|
I tried myself and still cant figure how to make 5 projectiles appear across and shoot in same direction.
|
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.
|
switch(usr.dir) 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. |
Also, it's probably better to handle the deletion of the object in it's New() proc rather than in the verb itself.