ID:141885
 
Code:
timer:
        proc
timer(mob/m)
while(time)
sleep(10)
time-=1
time=250
new/mob/waves(m)


suspected time wrecker:
obj
beam_type
var/mob/owner
New(obj/bullet/m)
..()
owner=m.owner
src.loc=m.loc
src.dir=m.dir
src.special(owner)
proc
special()
missle
icon='visual.dmi'
icon_state="missle"
special()
.=..()
spawn(7) del src
/////////////////////////////Here and below.
fire
icon='visual.dmi'
icon_state="flame thrower"
special(mob/killer)
spawn(50) del src
spawn() for()
sleep(5)
for(var/mob/m in src.loc)
m.Burn(killer)
mob
proc
Burn(mob/killer)
var/i=new/obj/burn
src.overlays+=i
spawn() for(var/a=1,a<20,a++)
if(src.hitpoints<0)
return
if(src.weakness=="flame")
src.hitpoints-=20
sleep(10)
src.hitpoints-=5
src.deathcheck(killer)



Problem description:
For some reason whenever I shoot this type of weapon, it stops the counter from counting down... I tried spawning it, but I just can't see how the timer and this are connected.
Never mind, I turned the mob/timer into an object/timer and made the variables not 'mob' but simply global. I'm not sure exactly how this changes anything, I can't see how the other method couldn't have worked. I do suspect my new way is more efficient anyways, I suppose. :s

obj
time
New(mob/m)
spawn() timer()
proc
timer(mob/m)
while(global.time)
sleep(10)
world<<global.time
global.time-=1
global.time=250
new/mob/waves(m)
In response to Speedro
No need to use global., just the var will suffice.
In response to Andre-g1
Unless the time object has a time var :P