ID:148247
 
Im tring to have the obj/flame have a move loop... so its like a missle. Tho its not moving when its created.

obj
flame
icon='bulllet.dmi'
icon_state="flame"
var
range=5
delay=1


proc
loop()
Move(dir) // T = space the
if(--range > 0) // decriment range
spawn(delay) loop()
else
delete()

delete()
del(src)

obj/flame/Move(atom/new_loc,dir)
for(var/mob/X in new_loc) X.CatchFire()
return ..()
Look up the walk() proc. Im sure that this is was your looking for. And instead of that

obj/flame/Move(atom/new_loc,dir)
for(var/mob/X in new_loc) X.CatchFire()
return ..()

part, you could just check bump, and see if its a mob that is allowed to 'CatchFire()'.

Hope this helps.

-GDT
In response to GoodDoggyTreat
I really whould like to use move tho... but I shall try bump.. It never seems to work for me =\
In response to GoodDoggyTreat
Bump() would be inappropriate for what he's trying to do, GDT; his Move() proc does look correct. The problem is that I don't see anywhere in his code that tells the obj to start moving, which as you said walk() would do.

There's usually a right way to do projectiles, and it's something like this:
obj/projectile
var/mob/firedby

// create with new/obj/projectile(mymob.loc, mymob)
New(newloc, mob/M)
firedby = M
walk(src, M.dir, 0)
Since the self-deletion code is already in place, I didn't put any here.

Lummox JR
In response to Lummox JR
If you see the move() proc for the obj you whould see thats how im called damege... I allready know how to shoot it I just want to use the move proc.