Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Attach/Detach new "bug" or "feature"

Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
05-10-2007 12:46
I have several items that have parameters given when someone attaches...and other parameters given when someone detaches...

...it all works on

CODE


attach(key id)
{
if(id != NULL_KEY)
{
llWhisper(0, "Attaching");
}
else
{
llWhisper(0, "Detaching");
}
}



These items worked--and beautifully--until Wednesday, 5/9/07, in the afternoon. Now...the detach event--no matter how small--queues until the item is re-attached.

Anyone else running into this issue?

Any user-friendly workaround ideas?
_____________________
--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.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-10-2007 13:22
Seems to work fine to me.

Could be lag-related. What is the script performance in your sim? If it lags too much, the object may get saved/stored back in inventory before it gets a chance to run the detach event.

There's no guarantee the detach event will fire, nor how much script time the script will get once it does.
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
05-10-2007 13:40
Yea...I'm aware of that. The lag in the sim I'm working in is pretty good...and actually it seems to have been a specific glitch in a single object for some reason? We created a new object with the same script...passed it around...got everything working.

As a side note...I've found that GENERALLY one can get 6 - 8 says out of a detaching object even in high-lag situations.
_____________________
--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.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
05-10-2007 13:57
More or less seems to be related to the amount of time the script gets to run before its containing object gets garbage-collected. Even with llRemoveInventory(llGetScriptName), the script still runs for a statement or two before it expires. I don't think it will do that with llDie(), because I think llDie() sets the script to non-running immediately.

Makes me wonder what happens if you sent a link message to another script in the same object just before calling llDie() in the main script. Will the second script ever get the message and have time to process it before it gets GCed? Does lag affect that?

/me goes off to test :)
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
05-10-2007 14:13
Wow...now that would be interesting.

Lemme know the result.

I know

llWhisper()
llDie()

does get information out

but same object would be interesting.
_____________________
--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.