ID:268999
 
Hmmmmm... How do I make this make a missile one square infront of the shooter, rather then on the shooter himself?
mob
verb
Missile()
var/obj/Misc/Missile/B=new(src.loc)
walk(B,src.dir,5)
sleep(30)
del(B)
have you tried changing the 5 to a 4? see if it changes where the missile starts.
In response to Twizted1
Those have nothing to do with the direction, they are the speed of the missile.
In response to Skye Reaver
Well, I solved that problem, but, how do I make it delete itself as soon as it hits the edge of the map? I dont like howw it hovers there until its time limit is over... I want it to be deleted right when it hits.
        Missile
icon_state="Small Ship"
Bump(atom/A)
world << "[A] got missiled!"
del(src)
sleep(10)
In response to Skye Reaver
I think that if Newloc (in the bullet's Move proc) is null it's trying to go off the map.

bullet_thing/Move(NewLoc,Dir)
if(!NewLoc)
world << "The bullet is trying to move to null."
del src
else
return ..()


In response to YMIHere
There's an easier way.

Use the Bump() procedure. that way you don't have to deal with breaking up the move procedure. I try to avoid messing with the move procedure unless it is unavoidable.

Bump(var/atom/blockage)
if(blockage==null)
del src
In response to Ter13
We found out yesterday in Chatters that Bump(null) isn't called... or so I thought. =\

*Edit
We being the people in Chatters at the time. >.>