ID:145654
 
Code:
mob
proc
TimeStop(var/N as num,var/Time as num, var/mob/O as mob) // N as distance, O as owner, time as length
var/turf/T
var/F
var/Q
for(T in block(locate(x-N, y-N, z), locate(x+N, y+N, z)))
if(((T.x == x-N) && (T.y == y-N)))
F = /obj/Overlays/Attack/Area/CornerBL
new F (locate(x-N,y-N,z))
//Bottem Left^
else if(((T.x == x+N) && (T.y == y-N)))
F = /obj/Overlays/Attack/Area/CornerBR
new F (locate(x+N,y-N,z))
//Bottem Right^
else if(((T.x == x-N) && (T.y == y+N)))
F = /obj/Overlays/Attack/Area/CornerTL
new F (locate(x-N,y+N,z))
//Top Left^
else if(((T.x == x+N) && (T.y == y+N)))
F = /obj/Overlays/Attack/Area/CornerTR
new F (locate(x+N,y+N,z))
//Top Right^
else continue
Q = /mob/invisible
new Q (locate(x,y,z))
for(var/mob/M in oview(N))
if (M == O) continue
else
view(30) << "\red [N] Radius! Time Stop!";M.Stuck = 1;M.Action = 0;spawn(Time);M.Stuck = 0;M.Action = 1
spawn(Time)
for(var/obj/Overlays/Attack/Area/E in oview(N,Q))
del(E)


Problem description:

Well, this one got me for about a few days. At first it was deleting what was in N view of the usr, I tried setting the second argument of the oview() to a created mob, but that isn't working. Any ideas on how I can delete the created objects after "time"s length, without the usr having to be within a view?
Add them to a list when you create them, then once the time has expired delete all the objects in that list?
In response to DarkView
Sounds like a plan.