ID:1995370
 
(See the best response by Kaiochao.)
Code:
obj

Tail
icon='yoyo.dmi'
icon_state = "tail"

layer = MOB_LAYER+1

New()
..()
spawn(8)
del(src)


obj
yoyobeam
icon = 'yoyo.dmi'
icon_state = "head"
layer = 100
density = 1
Bump(A)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)
if(ismob(A))
var/mob/M = A
var/damage = 20
M.health -= damage
world <<"[M] got hit for [damage] damage!"
del (src)



Move()


var/K = new/obj/Tail(src.loc)

K:dir = src.dir
..()




obj
yoyo
verb
Shot()


var/obj/yoyobeam/K = new /obj/yoyobeam
if(src.dir == NORTH)
K.loc = locate(usr.x,usr.y+1,usr.z)
if(src.dir == SOUTH)
K.loc = locate(usr.x,usr.y-1,usr.z)
if(src.dir == EAST)
K.loc = locate(usr.x+1,usr.y,usr.z)
if(src.dir == WEST)
K.loc = locate(usr.x-1,usr.y,usr.z)
K.dir = usr.dir
K.name=usr.name

walk(K,usr.dir,2)
spawn(16)
del(K)


Problem description:
The "beam" is being shot under my character(usr.y-1) in east/west and north
The "beam" is being shot under my character(usr.y-1) in east/west and north

                if(src.dir == NORTH)
K.loc = locate(usr.x,usr.y+1,usr.z)
if(src.dir == SOUTH)
K.loc = locate(usr.x,usr.y-1,usr.z)
if(src.dir == EAST)
K.loc = locate(usr.x+1,usr.y,usr.z)
if(src.dir == WEST)
K.loc = locate(usr.x-1,usr.y,usr.z)


Look at this carefully, it's a fairly easy problem to fix.
i tryed to set(...),usr.y+1 but it didnt worked
In response to Danielkage
Best response
It should be usr.dir, right? Since src is obviously the /obj/yoyo instance, and usr is the mob of a player using the verb.

That can also be shortened to:
var/obj/yoyobeam/K = new (get_step(usr, usr.dir))
K.dir = usr.dir
// etc.
it worked, thanks kaiochao