ID:154783
 
Hello,

I'm working on a movement library that will also include various projectile options, and I'm running into a bit of an issue using the following code.

mob
verb
shoot()
new /mob/projectile/bullet(src)
src << output("verb called")
projectile
bullet
icon='bullet.dmi'
bound_height=3
bound_width=3
step_size=2
New(mob/M)
. = ..()
loc = locate(M.x,M.y,M.z)
walk(src,M.dir)
M << output("bullet made")


It gets created and works fine, but the main problem lies in the difficulty I am having trying to find a way to make the bullet (which is 3x3) come out the center my characters icon (which is 8x8, and has a step_size of 4). Currently, it comes from the (0,0) marker in each tile of 32.

Ideas?
Edit: Nevermind, I found out about step_x and step_y, and they were very useful. :)

step_x = M.step_x
step_y = M.step_y
In response to CauTi0N
I was having the same issue and reading through your post helped me a lot! Thanks for posting this!
In response to Yusuke13
No problem. I had a feeling that if I had this issue, another might too, and my mistake might help others learn as well. I'm glad I was right. ;)