Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Re-reading an updated config note card

Bartiloux Desmoulins
Think Kink? Think Bart!
Join date: 27 Sep 2005
Posts: 121
05-22-2007 13:02
I am using a note card as a way of dynamically configuring a few parameters of a script I wrote. The way it's set up, when you rez the object that contains the script, it reads the first three lines of the note card and collects the needed parameters and stores them in variables in the script. My question is this...

If, once the object is rezzed, I want to change the note card, thus altering the parameter values already read by the script upon saving the updated note card in the object's inventory, is there some kind of triggered event that is raised to indicate that the note card should be re-read to get the new values?

Also, if I've already read the note card to E-O-F, how do I start the reading process over again, at the top, and read all the necessary lines of the note card?

Thank you,
Bartiloux Desmoulins
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
05-22-2007 13:08
changed(integer mask) {
if(mask & CHANGED_INVENTORY){
llResetScript();
}
}


slip that in like state_entry() or on_rez(). :) you could instead of resetting script, redirect it to an 'init' function you make to reset your script. :)
_____________________

Nyoko's Bodyoils @ Nyoko's Wears
http://slurl.com/secondlife/Centaur/126/251/734/
http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html

"i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi