ID:147415
 
i am haveing some problems with this missle code im trying to get it so that it shoots 2 missles at the same time in the oppisit direction, but only one moves the other missle is just created and does not move.

obj
SS12 // The laser object is for when you Shoot. It's the actual projectile.
name = ""
icon = 'Obj/Blast14.dmi'
density = 1 // It needs to be dense to Bump things.
Bump(M)
if(istype(M, /mob))
M:Hit42() // Whenever it Bumps something, it hurts it (if its a mob) and deletes itself.
sleep(1) // Add a tenth of a second for a better visual effect.
del(src)
proc
BlastMove() // This is how it moves, depending on it's icon_state.
var/turf/aturf
if(src.icon_state == "right") // If you're faced right...
aturf = locate(src.x + 1, src.y, 1) // go right.
else
aturf = locate(src.x - 1, src.y, 1) // go left.
if(src.icon_state == "left") // If you're faced left...
aturf = locate(src.x - 1, src.y, 1) // go left.
else
aturf = locate(src.x + 1, src.y, 1) // go right.
if(aturf == null) // If the spot it's going to is not really there, then we want it to delete itself.
del(src)
return
src.Move(aturf)
spawn(1) src.BlastMove()()
ok well no one is answering this so one im bumping it so people can read it again and two comeon now some has to know how to code this also i forgot to say that the code is for the game X and Zero2 the platfrom game.

~~SS10
I don't see anywhere in that code where it creates two objects facing opposite directions (or even one, for that matter) and calls that moving function.
In response to Loduwijk
To expand on Loduwijk's comment, you need to also show the code that creates the missiles and sends them on there way.