MLPV2 Rez Prop Independent of Pose Item

From Second Life Wiki
Revision as of 13:23, 11 February 2014 by Chaz Longstaff (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Companion script to ~prop permanent rezzer (MASTER) script

<lsl> //~prop permanent derezzer //

//put this script in a prop that you have rezzed via the ~prop permanent rezzer (MASTER) script in MLP //when the ~prop permanent rezzer script in MLP hears a button command to derez, it informs this rezzed object of that command to derez //so this rezzed object will go away //version 1.2 by Chaz Longstaff 2014-02-09


integer ch;
integer ListenHandle;


default {

   on_rez(integer channel) {
       ch = channel;
       ListenHandle = llListen(ch,"",NULL_KEY,"");
   }
   
   
   
   listen(integer channel, string name, key object, string str) {
           list TempList2 = llParseStringKeepNulls(str,["##"],[]);
           string command = llStringTrim(llList2String(TempList2, 0),STRING_TRIM);
           string object = llStringTrim(llList2String(TempList2, 1),STRING_TRIM);
       
       
       if ( (command == "DeRez") && ( object == llGetObjectName() ) ) {
           llDie();
       }     
   }
   
   

} </lsl>