MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Generic "wake up when someone enters room" object



> 
> Can someone point me at a simple object which performs an action at a (set
> or random) interval _as long as there is someone in the location containing
> it_, and which sleeps otherwise (don't want to be doing ANY processing when
> there's noone around to see it)
> 

I once wrote a builtin function in C code, resume(), which did the
opposite of suspend().  When called with the args of a task id which
had been suspended, it would continue the task (or at least cause it
to be able to be started by changing the start time to be the current
time).  Of course, it checked for appropriate privledges.  If you 
were to use this you could have the object suspend() whenever the 
last object exits the room, and call resume() on enterfunc().

If you (or anyone) is interested in the code, I'll whip it up for
you.

--Nate
natem@ctdnet.acns.nwu.edu


Follow-Ups: References:

Home | Subject Index | Thread Index