obj/flicker
layer = MOB_LAYER + 1
animate_movement = SYNC_STEPS
mob
var/atom/flicker/flick = new
Move()
..()
flick.loc = src.loc
Cross(atom/a)
return a.crossed(src)
atom
proc/crossed(atom/a)
return 1
obj/missile
icon = 'explosion.dmi'
New(loc, dir)
src.loc = loc
walk(src,dir,11/7,7)
spawn(30)
del(src)
crossed(mob/a)
world << "[src] has hit [a]!"
//could do damage here
flick(src, a.flick)
spawn del src
return 1
Let me know what you think of this type of design!
Note: I have purposely avoided Crossed() here. If you've ever played around with those procs, you'll realize they don't fire quite how you'd expect at first glance.
Another thing: atoms are positioned at the first argument given to new() before New() is called. You don't need to set it again, or call ..(), because initial positioning happens before New is even called.
You should also either explain why you're using 11/7 and 7, or make it customizable.
P.S. Missile