Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How persistent is script state/data?

Jenni Darkwatch
Registered User
Join date: 21 Jun 2009
Posts: 25
11-16-2009 08:00
Does the script state survive, say, region restarts (scheduled or unscheduled)? More broadly, what kind of event would cause a script to reset?

Just curious, as I couldn't find any info on that.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
11-16-2009 08:06
A script state is reset when the script is reset or recompiled.

It's also reset when the script is set to "not running" AND the region is restarted or the script is taken into inventory.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
11-16-2009 08:31
A script can also be reset by another script in the same prim (llResetOtherScript()), as well as explicitly by the user (menu Tools -> Reset scripts in selection, which requires 'mod' permission on the object).
Jenni Darkwatch
Registered User
Join date: 21 Jun 2009
Posts: 25
11-16-2009 09:31
Thanks! That answers that question nicely. Learned something new :)