Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How Long will a Command "wait"...

Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
12-16-2005 08:54
Say an object communicates a short string of data to another object...but that other object is currently under a long llSleep() command...

...does anyone know how long the communicated data will "remain" with the receiving script, allowing it to execute after the llSleep() expires?
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Aurael Neurocam
Will script for food
Join date: 25 Oct 2005
Posts: 267
12-16-2005 09:04
Experiment.

I'm guessing there are two answers:

1. The chat will be lost.

or

2. If the chat is buffered, the chat will sit there forever until the event can finally be triggered.
_____________________
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-16-2005 09:37
It will be added to the receiving object's 'incoming events' queue. If the object sleeps for long enough, and lots of events pile up in that queue, eventually new events will be dropped because there's no more room in the queue. But AFAIK, any event that makes it into the queue will stay in the queue until the script 'wakes up' and handles it.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
12-16-2005 11:42
That's all I needed to know Ziggy...thank you. There's only one command that is ever gonna stack...it just might stack for up to 1 hr.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-16-2005 12:09
What exactly are you doing that involves an llSleep for an hour? Try redesigning that to use a timer, and take the action when the timer event occurs. And if you receive the chat message, check and see if it's time to act on it yet, and if not, just save the message and go back to waiting for the timer to fire. I'm not sure if there's automatic queue cleanup in LSL, where it purges events that have been sitting unhandled for too long. I don't think so, but picking up the event and saving it within your script and handling it later, might be safer than sleeping and letting the event sit on the queue. I don't know :)

Of course, I don't know what you're doing, so it's possible that this approach won't work for you, or will be a lot more complicated.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
12-16-2005 12:40
llSleep takes fewer resources than llSetTimerEvent...

...at least that's my understanding.

I've got it all set though...thx.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.