Difference between revisions of "MLPV2 Rez Prop Independent of Pose Item"

From Second Life Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 32: Line 32:
          
          
          
          
         if ( (command == "DeRez") && ( object == llGetObjectName() ) ) {
         if ( (command == "DeRezAll") ||  ((command == "DeRez")&&(object == llGetObjectName())) {
             llDie();
             llDie();
         }     
         }     

Latest revision as of 21:06, 22 February 2014

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 == "DeRezAll") ||   ((command == "DeRez")&&(object == llGetObjectName()))  )   {
           llDie();
       }     
   }
   
   

} </lsl>