Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Attachment global variables

2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
10-10-2006 13:51
Hi,

I am trying to create an attachment that allows its settings to be configured only once.

I am not sure what event occurs on teleport, sim crossing, and login and logout. Does the on_rez event get called at some point - I have searched this forum and some posts suggest that on_rez sometimes gets triggered.

Can an attachment retain its state in global variables?

If an attachment cannot store its state information in global variables, can an attachment change the value of it's own description field (llSetObjectDesc)? What if the attached object is a multi-prim object -- can it set the description of the root prim?

Thank you -2fast
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-10-2006 14:59
I'm not entirely sure I understand the problem.

You have two states, a "set up" and an "in use" state. Once it's set up, you change states and unless you let them reset the script that's it. Logins, tps etc. can't fire an on_rez event in the setup state if you're in the in use state.

For what it's worth... logging in fires on_rez and attach events, tping and changing sims fires changed events.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Kage Seraph
I Dig Giant Mecha
Join date: 3 Nov 2004
Posts: 513
10-10-2006 18:58
Couldn't the person just recompile or reset the script(s)? I'm not sure what permissions are needed to do this.
_____________________
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
10-10-2006 19:28
From: Eloise Pasteur
Once it's set up, you change states and unless you let them reset the script that's it.


Thank you Eloise - that is the information I needed.

As a followup question, what permission do I need to set on a script to prevent it from being reset? I tried a few combinations of permissions but the next owner is always able to reset the script. I know this is possible to prevent scripts from being reset since I have a few items where the scripts cannot be reset - although I apply similar permission it does not seem to work.

Thanks -2fast
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
10-10-2006 19:29
From: Kage Seraph
Couldn't the person just recompile or reset the script(s)? I'm not sure what permissions are needed to do this.


Yes...the user needs to reset the script and all settings are lost. I know it is possible to prevent users from resetting scripts but I have no idea how to do that.

-2fast
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
10-11-2006 09:44
This is one of the primary uses of my (Not Quite) Notecard Generation feature idea. I still have to create a voting proposal for this, but in the meantime feel free to leave feedback and support:

Using this feature, you would have your configuration mode spit out a configuration notecard for the creator to save and then plop into the object inventory. Done.