mob/var
health
obj/beams/head
var/damage
icon='beams.dmi'
icon_state="head"
density=1
damage=10
Bump(mob/M)
if(ismob(M))
M.health -= damage
del(src)
New()
spawn(20)
del src
..()
obj/beams/tail
icon='beams.dmi'
icon_state="tail"
density=1
Move()
var/T = new /obj/beams/tail(src.loc)
T:dir=src.dir
T:icon_state=src.icon_state
T:icon=src.icon
..()
New()
spawn(20)
del(src)
..()
mob/verb/kamehameha()
var/fired
if(fired) return
if(usr.dir==null) return
fired=1
var/A = new /obj/beams/head(usr.loc)
var/B = new /obj/beams/tail(usr.loc)
A:dir=usr.dir
B:dir=usr.dir
if(A)
walk(A,usr.dir)
spawn(1)
walk(B,usr.dir)
spawn(19)
fired=0
/*
These are simple defaults for your project.
*/
world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default
view = 9 // show up to 6 tiles outward from center (13x13 view)
// Make objects move 8 pixels per tick when walking
mob
step_size = 4
obj
step_size = 8
Problem description:
Well the default pixel movement makes the beam act weird. like the beam goes about half a tile to the side of me. Any ideas how to fix it?
You're specifying the tile location of the target variables, but not the exact pixel location. That just requires a few more simple references and variables, but that's why your beam is off center from the player. I suggest looking up the step_x and the step_y variables to help you out. Extremely simple fix, should be really quick. It'll just require adding a little more code, I see no need to change anything. (Except the : operators...)