|
AeronAoife Grigges
Registered User
Join date: 17 Jan 2007
Posts: 25
|
11-18-2007 20:29
I have a color change script that brings up a menu with a list of objects to change color on. The user clicks on an item and it brings up a list of colors to choose from.
The scripts work fine as long as I'm the owner of the objects but as soon as I give it to anyone, the first menu comes up but not the second one. I've tried different perms including setting all to modify/copy/transfer for the object and the scripts, but no luck.
Anyone have an idea why this is happening?
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
11-18-2007 20:41
Could you post some code? I suspect there's an issue with starting a listener which only applies to the original owner.
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
11-18-2007 20:43
Try inserting this event handler into each state, if you have more than one:
changed( integer change ) { if( change & CHANGED_OWNER ) llResetScript(); }
I suspect there's an issue with starting a listener which only applies to the original owner. This should take care of that.
|
|
AeronAoife Grigges
Registered User
Join date: 17 Jan 2007
Posts: 25
|
11-18-2007 20:47
I'll see what I can do with that. thx.
|
|
AeronAoife Grigges
Registered User
Join date: 17 Jan 2007
Posts: 25
|
11-18-2007 23:12
that got it working. Thank you very much.
|
|
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
|
11-19-2007 01:37
Whenever a product changes hands, you should have it reset no matter the reason. The most common is that Listen() events will still be there from the previous owner - ie, llGetOwner won't work.
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
11-19-2007 04:23
From: Jana Kamachi Whenever a product changes hands, you should have it reset no matter the reason. The most common is that Listen() events will still be there from the previous owner - ie, llGetOwner won't work. Actually, llGetOwner() will work, but it's only evaluated at the time it runs. In other words, an llListen that listens to llGetOwner() will listen for the person who is the owner at that time, but it won't update to listen to the owner if it changes in the future.
|
|
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
|
11-19-2007 09:31
Thats what I meant >.>
|
|
Trevor Langdon
Second Life Resident
Join date: 20 Oct 2004
Posts: 149
|
11-19-2007 13:11
Using something like the following in the on_rez() or attach() events can reset the listen to the current owner without having to reset the script: // Setup the listener llListenRemove(iListenId); iListenId = llListen(iCHANNEL,"",llGetOwner(),"");
Something like the above should be used, rather than a script reset, when any cached variable values are desired to be retained across ownership.
|