ID:269422
 
obj
fire
icon='fire.dmi'
density = 1
verb
shoot()
if(usr.dir == NORTH)
walk(src,NORTH,1)
new /obj/fire(usr)
if(usr.dir == SOUTH)
walk(src,SOUTH,1)
new /obj/fire(usr)
if(usr.dir == WEST)
walk(src,WEST,1)
new /obj/fire(usr)
if(usr.dir == EAST)
walk(src,EAST,1)
new /obj/fire(usr)


how can i make the fire disappear after 20 seconds?
sleep (200) //20 seconds
del(fire) //delete the 'fire' obj


-Ryan
that doesent compile
Xx Dark Wizard xX wrote:
obj
> fire
> icon='fire.dmi'
> density = 1
> verb
> shoot()
> if(usr.dir == NORTH)
> walk(src,NORTH,1)
> new /obj/fire(usr)
> if(usr.dir == SOUTH)
> walk(src,SOUTH,1)
> new /obj/fire(usr)
> if(usr.dir == WEST)
> walk(src,WEST,1)
> new /obj/fire(usr)
> if(usr.dir == EAST)
> walk(src,EAST,1)
> new /obj/fire(usr)

how can i make the fire disappear after 20 seconds?


it doesn't compile because everything sfter the line "fire" and before the line shoot() needs to be indented once more

--vito
In response to Vito Stolidus
*fixed*
This has nothing to do with your question, but wouldn't it be shorter this way?
walk(src,usr.dir,1)

ok, then it could happen that it moves first east and then when you move west it moves west too...
var/godir=usr.dir
walk(src,godir,1)
In response to CIB
How can i make it so the object doest fly it just fires like a beam?
In response to Xx Dark Wizard xX
obj/fire
Move()//always when the fire moves
..()
var/L=new/obj/laser(src.loc)//make a laster
L:dir=src:dir//to make the laser to a line

obj/laser
New()
..()
sleep(15)
del(src)

Of course you will need a laser icon...