MOO-cows Mailing List Archive

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

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



On Mon, 27 Nov 1995, Darrell Berry wrote:

> 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)

Take a look at MOO2000's $room, #88.  It has a random message routine 
that only runs when ACTIVE people are in the room.  It is invoked from 
:announce[_all[_but]]()...  Whenever someone does something in the room, 
AND there are random messages set AND a previous random message task 
isn't running, then it forks one for X seconds.  The task only runs in 
active rooms (wid people talking and stuff).  I checked to see how many 
people used random messages...  about 20 rooms have this feature enabled, 
but there has never been 20 random message tasks running.

- Kipp



References:

Home | Subject Index | Thread Index